Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run CI tests directly in GitHub Actions #825

Merged
merged 35 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e445113
Run CI tests directly in GitHub Workflows
wmdietl Aug 1, 2024
050b9e1
Fix substitution
wmdietl Aug 1, 2024
9e5c2cf
Tweak scripts
wmdietl Aug 1, 2024
fafd65d
Split typecheck and try different matrix
wmdietl Aug 1, 2024
64bced5
Correctly output the version
wmdietl Aug 1, 2024
220c7cf
Disable jobs that are not on GitHub (not sure this is enough)
wmdietl Aug 1, 2024
f736f22
Actually disable jobs that are now on GitHub
wmdietl Aug 1, 2024
aaf2cd7
Update version
wmdietl Aug 1, 2024
b328378
Try using Java 21 for gradle itself
wmdietl Aug 1, 2024
96c6959
Running updateDaemonJvm doesn't work
wmdietl Aug 1, 2024
996f5c0
Also move guava and plume-lib tests to GitHub
wmdietl Aug 2, 2024
5fa745e
Test whether misc works on GitHub
wmdietl Aug 2, 2024
86abaef
Don't duplicate work on Azure
wmdietl Aug 2, 2024
d88cb01
Don't run `misc` on GitHub, it needs extra dependencies
wmdietl Aug 2, 2024
d0d76c4
Don't block `remainder` on `sanity`
wmdietl Aug 2, 2024
befa15b
Try fixes for MacOS and Windows
wmdietl Aug 5, 2024
65fb54a
Separate test that compiles on JDK 21 and runs on different JDKs
wmdietl Aug 5, 2024
e5ba6e5
Fix build
wmdietl Aug 5, 2024
997462f
Use shorter names
wmdietl Aug 5, 2024
67fab31
Make failures from different JDKs independent
wmdietl Aug 5, 2024
dc2c95d
Suppress lint warning on JDK 21+
wmdietl Aug 5, 2024
62b7703
Try to get newer JDKs to work
wmdietl Aug 5, 2024
77373a7
Setting shell to bash hopefully also works on macos
wmdietl Aug 5, 2024
db3efee
Fix syntax and handle no property given
wmdietl Aug 6, 2024
60c85ef
Fix logic and improve comments
wmdietl Aug 6, 2024
9e9de1e
Handle "-ea" in major version strings
wmdietl Aug 6, 2024
aa03317
Fix typo
wmdietl Aug 6, 2024
20a8d33
Skip plume-lib on Java 8
wmdietl Aug 6, 2024
353bd1a
Simplify runtime version checks
wmdietl Aug 6, 2024
aa2175d
Disable whole job, not just last step
wmdietl Aug 6, 2024
838417f
Fix option on Java 8
wmdietl Aug 6, 2024
3f62f31
Exclude useless test combo
wmdietl Aug 6, 2024
50c0598
Attempt different syntax
wmdietl Aug 6, 2024
69bff16
Job if clause can't access matrix
wmdietl Aug 6, 2024
b1ff23c
Fix typo
wmdietl Aug 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 149 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
name: CI tests

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
# Basic sanity tests on JDK 21.
sanity:
name: Test ${{ matrix.script }} on JDK ${{ matrix.java_version }}
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
script: ['cftests-junit', 'cftests-nonjunit']
java_version: [21]
env:
JAVA_VERSION: ${{ matrix.java_version }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java_version }}
distribution: 'temurin'

# 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/[email protected]

- name: Run test script checker/bin-devel/test-${{ matrix.script }}
run: ./checker/bin-devel/test-${{ matrix.script }}.sh

# The remaining tests for JDK 21. Separate from `sanity` to allow parallelism with `otheros`.
remainder:
name: Test ${{ matrix.script }} on JDK ${{ matrix.java_version }}
runs-on: ubuntu-latest
needs: sanity
permissions:
contents: read
strategy:
matrix:
script: ['typecheck-part1', 'typecheck-part2', 'guava', 'plume-lib', 'jspecify-conformance']
java_version: [21]
env:
JAVA_VERSION: ${{ matrix.java_version }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java_version }}
distribution: 'temurin'

# 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/[email protected]

- name: Run test script checker/bin-devel/test-${{ matrix.script }}
run: ./checker/bin-devel/test-${{ matrix.script }}.sh

otherjdks:
name: Test ${{ matrix.script }} on JDK ${{ matrix.java.version }}
runs-on: ubuntu-latest
needs: remainder
permissions:
contents: read
strategy:
matrix:
# jspecify-conformance only tested on JDK 21
script: ['cftests-junit', 'cftests-nonjunit', 'typecheck-part1', 'typecheck-part2', 'guava', 'plume-lib']
# JDK 21 used by sanity before
java: [{version: '8', experimental: false},
{version: '11', experimental: false},
{version: '17', experimental: false},
{version: '22', experimental: true},
{version: '23-ea', experimental: true},
{version: '24-ea', experimental: true}]
env:
JAVA_VERSION: ${{ matrix.java.version }}
continue-on-error: ${{ matrix.java.experimental }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java.version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java.version }}
distribution: 'temurin'

# 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/[email protected]

- name: Run test script checker/bin-devel/test-${{ matrix.script }}
run: ./checker/bin-devel/test-${{ matrix.script }}.sh

# Sanity tests on Windows and MacOS.
otheros:
name: Test ${{ matrix.script }} on JDK ${{ matrix.java_version }} on ${{ matrix.os }}
runs-on: "${{ matrix.os }}"
needs: sanity
permissions:
contents: read
strategy:
matrix:
os: ['windows-latest', 'macos-latest']
wmdietl marked this conversation as resolved.
Show resolved Hide resolved
script: ['cftests-junit']
java_version: [21]
env:
JAVA_VERSION: ${{ matrix.java_version }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java_version }}
distribution: 'temurin'

# 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/[email protected]

- name: Run test script checker/bin-devel/test-${{ matrix.script }}
run: ./checker/bin-devel/test-${{ matrix.script }}.sh

dependency-submission:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
- name: Generate and submit dependency graph
uses: gradle/actions/[email protected]

Loading
Loading