Set version to 1.9.22-SNAPSHOT #611
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
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Build AspectJ | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
# No automatic builds for Dependabot PRs | |
# Caveat: cannot start 'if:' expression with '!', hence '!= true' | |
if: startsWith(github.actor, 'dependabot') != true | |
strategy: | |
fail-fast: false | |
matrix: | |
# Check for available Temurin releases on https://adoptium.net/releases.html | |
java: [ 17, 21 ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: temurin | |
- name: Print tool versions | |
run: | | |
java -version | |
./mvnw -B --version | |
ant -version | |
- name: Set up cache for ~./m2/repository | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.m2/repository | |
!~/.m2/repository/org/aspectj | |
key: maven-${{ runner.os }}-java-${{ matrix.java }}-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
maven-${{ runner.os }}-java-${{ matrix.java }}- | |
maven-${{ runner.os }}- | |
maven- | |
- name: Compile + package code | |
# Also install (not just package) for subsequent build steps | |
run: ./mvnw -B --file pom.xml -DskipTests install | |
- name: Attach aspectjrt to build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: aspectjrt-java${{ matrix.java }} | |
# Binary, source, javadoc JARs + flattened POM | |
path: | | |
aspectjrt/target/aspectjrt-*.jar | |
aspectjrt/target/flattened-pom.xml | |
- name: Attach aspectjweaver to build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: aspectjweaver-java${{ matrix.java }} | |
# Binary, source, javadoc JARs + flattened POM | |
path: | | |
aspectjweaver/target/aspectjweaver-*.jar | |
aspectjweaver/target/flattened-pom.xml | |
- name: Attach aspectjtools to build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: aspectjtools-java${{ matrix.java }} | |
# Binary, source, javadoc JARs + flattened POM | |
path: | | |
aspectjtools/target/aspectjtools-*.jar | |
aspectjtools/target/flattened-pom.xml | |
- name: Create docs | |
run: ./mvnw -B --file pom.xml -DskipTests process-resources -pl docs -P create-docs | |
- name: Attach docs to build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: aspectj-docs-java${{ matrix.java }} | |
# Re-zip docs directory instead of wrapping existing distribution archive into another zip archive | |
path: aj-build/dist/docs/ | |
- name: Run Tests | |
# Tests in module ajde call Swing/AWT classes. Without frame buffer they throw | |
# HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. | |
uses: coactions/setup-xvfb@v1.0.1 | |
with: | |
run: ./mvnw -B --file pom.xml -Daspectj.tests.verbose=false verify |