fix: rename field/parameter to not hide each other. #238
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 ] | |
| 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 | |
| linux: | |
| name: Linux (${{ matrix.arch }}, Java ${{ matrix.java-version }}) | |
| needs: dependencies | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java-version: [11, 17, 21, 24] | |
| arch: [x64, arm64] | |
| runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} | |
| steps: | |
| - 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: 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-quick | |
| env: | |
| # MathSAT5 needs this to find the correct libstdc++ version, as Temurin JDKs ship a too-new version. | |
| LD_PRELOAD: /usr/lib/${{ matrix.arch == 'arm64' && 'aarch64-linux-gnu' || 'x86_64-linux-gnu' }}/libstdc++.so.6 | |
| - name: Archive Test Results | |
| uses: actions/upload-artifact@v6 | |
| if: always() | |
| with: | |
| name: junit-results-linux-${{ matrix.arch }}-java${{ matrix.java-version }} | |
| path: | | |
| junit/TEST-*.xml | |
| JUnit.html | |
| hs_err_pid*.log | |
| replay_pid*.log | |
| macos: | |
| name: macOS (${{ matrix.arch }}, Java ${{ matrix.java-version }}) | |
| needs: dependencies | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java-version: [11, 17, 21, 24] | |
| arch: [x64, arm64] | |
| runs-on: ${{ matrix.arch == 'arm64' && 'macos-latest' || 'macos-15-intel' }} | |
| steps: | |
| - 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: Install Ant | |
| run: brew install ant | |
| - 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 | |
| windows: | |
| name: Windows (${{ matrix.arch }}, Java ${{ matrix.java-version }}) | |
| needs: dependencies | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { arch: x64, java-version: 11 } | |
| - { arch: x64, java-version: 17 } | |
| - { arch: x64, java-version: 21 } | |
| - { arch: x64, java-version: 24 } | |
| - { arch: arm64, java-version: 21 } | |
| - { arch: arm64, java-version: 23 } | |
| runs-on: ${{ matrix.arch == 'arm64' && 'windows-11-arm' || 'windows-latest' }} | |
| steps: | |
| - 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: 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: | | |
| $archDir = if ("${{ matrix.arch }}" -eq "arm64") { "arm64-windows" } else { "x86_64-windows" } | |
| $searchPath = "lib/java/runtime-*/" + $(if ("${{ matrix.arch }}" -eq "arm64") { "arm64" } else { "x64" }) | |
| Get-ChildItem -Path $searchPath -Filter "*.dll" -Recurse | Copy-Item -Destination "lib/native/$archDir/" -Force | |
| - name: Run tests | |
| run: ant unit-tests-quick | |
| - name: Archive Test Results | |
| uses: actions/upload-artifact@v6 | |
| if: always() | |
| with: | |
| name: junit-results-windows-${{ matrix.arch }}-java${{ matrix.java-version }} | |
| path: | | |
| junit/TEST-*.xml | |
| JUnit.html | |
| hs_err_pid*.log | |
| replay_pid*.log |