Skip to content

Commit

Permalink
Merge branch 'master' into fix-fieldaccess
Browse files Browse the repository at this point in the history
  • Loading branch information
Ao-senXiong authored Jan 6, 2025
2 parents eda8624 + 59d030f commit 8796e13
Show file tree
Hide file tree
Showing 67 changed files with 1,471 additions and 625 deletions.
132 changes: 104 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4.2.1
uses: gradle/actions/setup-gradle@v4.2.2

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.9.1
if: matrix.script == 'cftests-nonjunit'
uses: bazel-contrib/setup-bazel@0.10.0
if: ${{ matrix.script == 'cftests-nonjunit' }}
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
Expand All @@ -64,12 +64,24 @@ jobs:
fail-fast: true
matrix:
# No need to run 'cftests-junit-jdk21' on JDK 21.
script: ['typecheck-part1', 'typecheck-part2', 'guava', 'plume-lib', 'daikon-part1', 'daikon-part2', 'jspecify-conformance', 'jspecify-reference-checker']
script: ['typecheck-part1', 'typecheck-part2',
'guava', 'plume-lib',
'daikon-part1', 'daikon-part2',
'jspecify-conformance', 'jspecify-reference-checker',
'misc']
java_version: [21]
env:
JAVA_VERSION: ${{ matrix.java_version }}
steps:
- uses: actions/checkout@v4
if: ${{ matrix.script != 'misc' }}
with:
fetch-depth: 1
- uses: actions/checkout@v4
if: ${{ matrix.script == 'misc' }}
with:
# CI diff needs more history - 0 fetches all history.
fetch-depth: 0
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v4
with:
Expand All @@ -79,8 +91,18 @@ jobs:
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4.2.1

uses: gradle/actions/setup-gradle@v4.2.2
# Setup for misc tests
- name: Install misc dependencies
if: ${{ matrix.script == 'misc' }}
run: |
sudo apt install -y shellcheck devscripts python3-pip \
texlive-latex-base texlive-latex-extra latexmk librsvg2-bin \
autoconf dia hevea latexmk libasound2-dev rsync pdf2svg \
libcups2-dev libfontconfig1-dev libx11-dev libxext-dev \
libxrender-dev libxrandr-dev libxtst-dev libxt-dev \
texlive-font-utils texlive-fonts-recommended texlive-latex-recommended
pip install black flake8 html5validator
- name: Run test script checker/bin-devel/test-${{ matrix.script }}
run: ./checker/bin-devel/test-${{ matrix.script }}.sh

Expand All @@ -93,27 +115,81 @@ jobs:
strategy:
fail-fast: true
matrix:
# jspecify-conformance and jspecify-reference-checker only tested on JDK 21.
script: ['cftests-junit', 'cftests-nonjunit', 'cftests-junit-jdk21', 'typecheck-part1', 'typecheck-part2', 'guava', 'plume-lib', 'daikon-part1', 'daikon-part2']
# JDK 21 used by sanity before
# `jspecify-conformance` and `jspecify-reference-checker` only tested on JDK 21.
script: ['cftests-junit', 'cftests-nonjunit', 'cftests-junit-jdk21',
'typecheck-part1', 'typecheck-part2',
'guava', 'plume-lib',
'daikon-part1', 'daikon-part2',
'misc']
# JDK 21 used by `sanity` and `remainder` before.
# `experimental` versions use the $version compiler, but run on JDK 21.
java: [{version: '8', experimental: false},
{version: '11', experimental: false},
{version: '17', experimental: false},
{version: '22', experimental: true},
{version: '23-ea', experimental: true},
{version: '23', experimental: false},
{version: '24-ea', experimental: true}]
exclude:
# JDK 8 does not allow toolchains, so testing 'cftests-junit-jdk21' is unnecessary.
- script: 'cftests-junit-jdk21'
java: {version: '8'}
# Only run `typecheck*`, `guava`, and `misc` scripts on core versions,
# so exclude 11 and 17.
- script: 'typecheck-part1'
java: {version: '11'}
- script: 'typecheck-part1'
java: {version: '17'}
- script: 'typecheck-part2'
java: {version: '11'}
- script: 'typecheck-part2'
java: {version: '17'}
- script: 'guava'
java: {version: '11'}
- script: 'guava'
java: {version: '17'}
- script: 'misc'
java: {version: '11'}
- script: 'misc'
java: {version: '17'}
# At least one plume-lib project no longer works on Java 8,
# so exclude 8, 11, and 17.
- script: 'plume-lib'
java: {version: '8'}
- script: 'plume-lib'
java: {version: '11'}
- script: 'plume-lib'
java: {version: '17'}
# Daikon produces 'this-escape' compiler warnings in JDK 22+.
# Exclude all versions here and just explicitly include with JDK 17.
- script: 'daikon-part1'
- script: 'daikon-part2'
include:
- script: 'daikon-part1'
java: {version: '17', experimental: false}
- script: 'daikon-part2'
java: {version: '17', experimental: false}

env:
JAVA_VERSION: ${{ matrix.java.version }}
continue-on-error: ${{ matrix.java.experimental }}
steps:
- uses: actions/checkout@v4
- name: Check out sources
uses: actions/checkout@v4
if: ${{ matrix.script != 'misc' }}
with:
fetch-depth: 1
- name: Check out sources with all history
uses: actions/checkout@v4
if: ${{ matrix.script == 'misc' }}
with:
# CI diff needs more history - 0 fetches all history.
fetch-depth: 0
- name: Set up JDK ${{ matrix.java.version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java.version }}
distribution: 'temurin'
- name: Set up JDK 21 on an experimental platform
if: matrix.java.experimental
if: ${{ matrix.java.experimental }}
uses: actions/setup-java@v4
with:
# Install JDK 21 second, to make it the default on which gradle runs.
Expand All @@ -124,11 +200,20 @@ jobs:
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4.2.1

uses: gradle/actions/setup-gradle@v4.2.2
- name: Install misc dependencies
if: ${{ matrix.script == 'misc' }}
run: |
sudo apt install -y shellcheck devscripts python3-pip \
texlive-latex-base texlive-latex-extra latexmk librsvg2-bin \
autoconf dia hevea latexmk libasound2-dev rsync pdf2svg \
libcups2-dev libfontconfig1-dev libx11-dev libxext-dev \
libxrender-dev libxrandr-dev libxtst-dev libxt-dev \
texlive-font-utils texlive-fonts-recommended texlive-latex-recommended
pip install black flake8 html5validator
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.9.1
if: matrix.script == 'cftests-nonjunit'
uses: bazel-contrib/setup-bazel@0.10.0
if: ${{ matrix.script == 'cftests-nonjunit' }}
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
Expand All @@ -139,15 +224,6 @@ jobs:

- name: Run test script checker/bin-devel/test-${{ matrix.script }}
run: ./checker/bin-devel/test-${{ matrix.script }}.sh
# TODO: it would be nicer to not run the job at all, but GH Actions does
# not allow accessing the matrix on the job-if clause. There is also no way
# for an earlier step to stop execution successfully.
#
# At least one plume-lib project no longer works on Java 8.
# Java 8 does not allow toolchains, so testing 'cftests-junit-jdk21' is unnecessary.
# Daikon produces 'this-escape' compiler warnings in JDK 22+.
if: (matrix.java.version != 8 || (matrix.script != 'plume-lib' && matrix.script != 'cftests-junit-jdk21')) &&
(matrix.java.version <= 21 || (matrix.script != 'daikon-part1' && matrix.script != 'daikon-part2'))
# Set the compiler version to use, allowing us to e.g. run Java 23 while gradle does not work
# on Java 23 yet. This only tests the compiler, it does not use that version to run the tests.
env:
Expand Down Expand Up @@ -178,10 +254,10 @@ jobs:
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4.2.1
uses: gradle/actions/setup-gradle@v4.2.2

- name: Install coreutils on MacOS
if: matrix.os == 'macos-latest'
if: ${{ matrix.os == 'macos-latest' }}
run: brew install coreutils

- name: Run test script checker/bin-devel/test-${{ matrix.script }}
Expand Down
75 changes: 0 additions & 75 deletions azure-pipelines.yml

This file was deleted.

Loading

0 comments on commit 8796e13

Please sign in to comment.