Workflow #21
This file contains hidden or 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: CapyMOA Test and Package | |
| on: | |
| push: | |
| branches: [ master, capymoa ] | |
| pull_request: | |
| branches: [ master, capymoa ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # TODO: moa tests are sensitive to java versions https://github.com/Waikato/moa/issues/273 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'zulu' | |
| cache: maven | |
| - name: Version | |
| working-directory: ./moa | |
| run: mvn -v | |
| - name: Unit Tests | |
| working-directory: ./moa | |
| # -B: non-interactive (batch) mode | |
| # -q: quiet output | |
| run: mvn -B -q test | |
| - name: Package Jar | |
| working-directory: ./moa | |
| # -B: non-interactive (batch) mode | |
| # -DskipTests: skip tests (they were run earlier) | |
| # -Dmaven.javadoc.skip=true: skip javadoc generation | |
| # -Dlatex.skipBuild=true: skip latex documentation build this needs extra dependencies | |
| run: mvn -B package -DskipTests -Dmaven.javadoc.skip=true -Dlatex.skipBuild=true | |
| # Upload jar file as artifact | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: moa-jar | |
| path: ./moa/target/moa-*-jar-with-dependencies.jar | |
| if-no-files-found: error | |
| retention-days: 7 |