Phase 3: hygiene, dependencies, readme #49
Workflow file for this run
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: Build | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| # Linux and Windows both, because path handling differs and most | |
| # consumers build on one or the other. | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest ] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: '25' | |
| - uses: gradle/actions/setup-gradle@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| - run: ./gradlew build jacocoTestReport | |
| # Confirms that something other than JMPQ3 can read what JMPQ3 wrote. | |
| # The Gradle run exported the rebuilt archives and their expected content | |
| # digests; tools/mpqref.py is an independent implementation. | |
| - name: Verify rebuilt archives with the reference implementation | |
| run: | | |
| python tools/mpqref.py selftest | |
| python tools/mpqref.py verify build/roundtrip/archives --manifest build/roundtrip/expected.tsv | |
| python tools/mpqref.py verify build/roundtrip-newcore/archives --manifest build/roundtrip-newcore/expected.tsv | |
| python tools/mpqref.py verify build/stored-encrypted/archives --manifest build/stored-encrypted/expected.tsv | |
| python tools/mpqref.py verify build/phase2/archives --manifest build/phase2/expected.tsv | |
| # Catches drift between the committed golden manifest and the fixtures. | |
| - name: Check the golden manifest is up to date | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| python tools/mpqref.py manifest src/test/resources/mpqs \ | |
| --names src/test/resources/DefaultListfile.txt \ | |
| -o /tmp/fixtures.tsv | |
| diff -u src/test/resources/golden/fixtures.tsv /tmp/fixtures.tsv | |
| - name: Upload test report | |
| if: failure() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-report-${{ matrix.os }} | |
| path: build/reports/tests/test | |
| retention-days: 7 | |
| # Telemetry, not a gate. continue-on-error as well as fail-on-error: | |
| # the latter only covers the upload, so an outage while the action fetches | |
| # its own reporter binary still failed the job -- which it did, with a 504 | |
| # from coveralls.io, on a commit whose build, tests, reference checks and | |
| # manifest check had all passed. A third-party reporting service being | |
| # down is not a reason to call this build broken. | |
| - name: Report coverage | |
| if: matrix.os == 'ubuntu-latest' | |
| continue-on-error: true | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| file: build/reports/jacoco/test/jacocoTestReport.xml | |
| format: jacoco | |
| fail-on-error: false |