CI: Fix library name #11
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 | |
| env: | |
| # Use a project-local relative directory for the Ivy cache to make it easy to share across platforms. | |
| # We place it inside the workspace so it's identical for Linux, macOS, and Windows. | |
| IVY_CACHE_DIR: .ivy2-cache | |
| jobs: | |
| dependencies: | |
| name: Download Dependencies | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 11 | |
| distribution: 'temurin' | |
| - name: Shared Ivy Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.IVY_CACHE_DIR }} | |
| # We use a unique key for each run to ensure the cache is updated if needed, | |
| # while restoring from the most recent "ivy-shared-" cache. | |
| key: ivy-shared-${{ github.run_id }} | |
| restore-keys: | | |
| ivy-shared- | |
| enableCrossOsArchive: true | |
| - name: Install Ant | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ant | |
| - name: Download Dependencies | |
| run: ant build-dependencies | |
| macos: | |
| name: macOS (${{ matrix.arch }}, Java ${{ matrix.java-version }}) | |
| needs: dependencies | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java-version: [24] | |
| arch: [arm64] | |
| runs-on: ${{ matrix.arch == 'arm64' && 'macos-latest' || 'macos-15-intel' }} | |
| steps: | |
| - name: Install build dependencies | |
| run: | | |
| brew update | |
| brew install gperf lcov autoconf automake libtool | |
| - name: Build gmp | |
| run: brew install gmp | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK ${{ matrix.java-version }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ matrix.java-version }} | |
| distribution: 'temurin' | |
| architecture: ${{ matrix.arch }} | |
| - name: Restore Ivy Cache | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: ${{ env.IVY_CACHE_DIR }} | |
| key: ivy-shared-${{ github.run_id }} | |
| restore-keys: | | |
| ivy-shared- | |
| enableCrossOsArchive: true | |
| - name: Build Yices binaries | |
| run: | | |
| ant build-yices2-java-mac | |
| - name: Check dependencies | |
| run: otool -L downloads/yices2_java_bindings/dist/lib/libyices2java.dylib | |
| - name: Build dependencies | |
| run: ant build-dependencies | |
| - name: Build project | |
| run: ant build | |
| - name: Prepare native libraries | |
| run: | | |
| ARCH_DIR="${{ matrix.arch == 'arm64' && 'arm64-macosx' || 'x86_64-macosx' }}" | |
| SEARCH_PATH="lib/java/runtime-*/${{ matrix.arch == 'arm64' && 'arm64' || 'x64' }}" | |
| mkdir -p "lib/native/$ARCH_DIR/" | |
| find $SEARCH_PATH -name "*.dylib" -exec cp {} "lib/native/$ARCH_DIR/" \; | |
| - name: Run tests | |
| run: ant unit-tests-quick | |
| - name: Archive Test Results | |
| uses: actions/upload-artifact@v6 | |
| if: always() | |
| with: | |
| name: junit-results-macos-${{ matrix.arch }}-java${{ matrix.java-version }} | |
| path: | | |
| junit/TEST-*.xml | |
| JUnit.html | |
| hs_err_pid*.log | |
| replay_pid*.log |