Add GitHub Actions CI for macOS and Windows coverage (#384) #12
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
| # This file is part of JavaSMT, | |
| # an API wrapper for a collection of SMT solvers: | |
| # https://github.com/sosy-lab/java-smt | |
| # | |
| # SPDX-FileCopyrightText: 2026 Dirk Beyer <https://www.sosy-lab.org> | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| linux: | |
| name: Linux (Java ${{ matrix.java }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java: [11, 17, 21] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: 'temurin' | |
| - name: Cache Ivy and Ant | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.ivy2/cache | |
| ~/.ant/lib | |
| key: linux-ivy-${{ hashFiles('build.xml', 'lib/ivy.xml', 'build/build-ivy.xml') }} | |
| restore-keys: | | |
| linux-ivy- | |
| - name: Install Ant | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ant | |
| - name: Build dependencies | |
| run: ant build-dependencies | |
| - name: Build project | |
| run: ant build | |
| - name: Run tests | |
| run: ant unit-tests | |
| - name: Archive Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: junit-results-linux-java${{ matrix.java }} | |
| path: | | |
| junit/TEST-*.xml | |
| JUnit.html | |
| hs_err_pid*.log | |
| replay_pid*.log | |
| macos: | |
| name: macOS (Java ${{ matrix.java }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java: [11, 17, 21] | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: 'temurin' | |
| - name: Cache Ivy and Ant | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.ivy2/cache | |
| ~/.ant/lib | |
| key: macos-ivy-${{ hashFiles('build.xml', 'lib/ivy.xml', 'build/build-ivy.xml') }} | |
| restore-keys: | | |
| macos-ivy- | |
| - name: Install Ant | |
| run: brew install ant | |
| - name: Build dependencies | |
| run: ant build-dependencies | |
| - name: Build project | |
| run: ant build | |
| - name: Prepare native libraries | |
| run: | | |
| mkdir -p lib/native/arm64-macosx/ | |
| find lib/java -name "*.dylib" -exec cp {} lib/native/arm64-macosx/ \; | |
| - name: Run tests | |
| run: ant unit-tests | |
| - name: Archive Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: junit-results-macos-java${{ matrix.java }} | |
| path: | | |
| junit/TEST-*.xml | |
| JUnit.html | |
| hs_err_pid*.log | |
| replay_pid*.log | |
| windows: | |
| name: Windows (Java ${{ matrix.java }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java: [11, 17, 21] | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: 'temurin' | |
| - name: Cache Ivy and Ant | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| C:\Users\runneradmin\.ivy2\cache | |
| C:\Users\runneradmin\.ant\lib | |
| key: windows-ivy-${{ hashFiles('build.xml', 'lib/ivy.xml', 'build/build-ivy.xml') }} | |
| restore-keys: | | |
| windows-ivy- | |
| - name: Install Ant | |
| run: choco install ant -y | |
| - name: Build dependencies | |
| run: ant build-dependencies | |
| - name: Build project | |
| run: ant build | |
| - name: Prepare native libraries | |
| shell: pwsh | |
| run: | | |
| Get-ChildItem -Path "lib/java" -Filter "*.dll" -Recurse | Copy-Item -Destination "lib/native/x86_64-windows/" -Force | |
| - name: Run tests | |
| run: ant unit-tests | |
| - name: Archive Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: junit-results-windows-java${{ matrix.java }} | |
| path: | | |
| junit/TEST-*.xml | |
| JUnit.html | |
| hs_err_pid*.log | |
| replay_pid*.log |