Bump AspectJ to 1.9.20.1 #89
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build AJDT | |
on: | |
workflow_dispatch: | |
inputs: | |
testMode: | |
type: choice | |
description: Test mode | |
required: true | |
default: 'skip tests' | |
options: | |
- 'skip tests' | |
- 'run tests' | |
- 'run more tests, fail at end' | |
- 'run all tests, ignore failures' | |
push: | |
branches: | |
- '*' | |
- '!gh-pages' | |
pull_request: | |
branches: | |
- '*' | |
- '!gh-pages' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macOS-latest ] | |
# Tycho only supports LTS, other Java releases only short-term. | |
# Tycho 3 no longer supports building on JDK 11, because it contains Java 17 class files. | |
java: [ 17 ] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set Git options | |
# Check out as-is, commit Unix-style line endings | |
run: git config --global core.autocrlf input | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up cache for ~./m2/repository | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.m2/repository | |
!~/.m2/repository/org/eclipse/ajdt | |
!~/.m2/repository/org/aspectj/ajde | |
key: maven-${{ matrix.os }}-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
maven-${{ matrix.os }}-java${{ matrix.java }}- | |
maven-${{ matrix.os }}- | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: temurin | |
- name: Print tool versions | |
run: | | |
java -version | |
mvn --batch-mode --version | |
# Always run build without tests first | |
- name: Build + package (no tests) | |
run: mvn --batch-mode -Pe426 -DskipTests clean verify | |
# Then optionally run tests in one of 3 user-selected modes | |
# TODO: find a way to avoid duplication | |
- name: Run tests normally, fail normally | |
if: ${{ github.event.inputs.testMode == 'run tests' }} | |
# UI tests need frame buffer on Linux | |
uses: GabrielBB/xvfb-action@v1 | |
with: | |
run: mvn --batch-mode -Pe426 verify | |
- name: Run more tests, fail at end | |
if: ${{ github.event.inputs.testMode == 'run more tests, fail at end' }} | |
# UI tests need frame buffer on Linux | |
uses: GabrielBB/xvfb-action@v1 | |
with: | |
run: mvn --batch-mode -Pe426 --fail-at-end verify | |
- name: Run all tests, ignore failures | |
if: ${{ github.event.inputs.testMode == 'run all tests, ignore failures' }} | |
# UI tests need frame buffer on Linux | |
uses: GabrielBB/xvfb-action@v1 | |
with: | |
run: mvn --batch-mode -Pe426 -Dmaven.test.failure.ignore=true verify | |
# No matter if a preceding test run failed or not, try to generate and upload a test report | |
# TODO: these steps should only happen if at least the build without tests passed, not always | |
- name: Generate aggregate test report | |
if: always() | |
run: mvn --batch-mode -Pe426 -Daggregate=true surefire-report:report-only | |
- name: Attach aggregate test report to build | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: surefire-report-${{ matrix.os }}-java${{ matrix.java }} | |
path: target/site/surefire-report.html |