-
Notifications
You must be signed in to change notification settings - Fork 57
Add GitHub Actions CI for macOS and Windows coverage (#384) #577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
anaslari23
wants to merge
11
commits into
sosy-lab:master
Choose a base branch
from
anaslari23:contribution/issue-384-macos-windows-ci
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
bce28df
Add GitHub Actions CI for multi-platform support (Issue #384)
anaslari23 98e1cc1
Ignore local SSD tools and caches
anaslari23 407eb2f
Refactor CI into separate jobs for Ubuntu, macOS, and Windows (Mainta…
anaslari23 7f8b672
Refine CI: Revert to single job matrix, fix JDK setup, and improve na…
anaslari23 405d5ac
Refactor CI into OS-specific jobs for clarity and reliability (Mainta…
anaslari23 27431ec
Update ci.yml
kfriedberger 6f009cb
Update ci.yml
kfriedberger 7febb2c
Refine CI: Add Ivy caching, use Chocolatey for Windows Ant, and ensur…
anaslari23 9da4d9f
Fix macOS solver support matrix and native-loader tests
anaslari23 73b4e3f
Fix macOS solver support and eliminate CI warnings
anaslari23 ab1e17d
Enable CVC5 on macOS in SolverContextFactoryTest
anaslari23 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,181 @@ | ||
| # 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 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,3 +75,8 @@ build.properties | |
| /downloads | ||
|
|
||
| pom.xml | ||
|
|
||
| # Local SSD Setup | ||
| .tools/ | ||
| .caches/ | ||
| env.sh | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -121,7 +121,8 @@ private boolean isSupportedOperatingSystemAndArchitecture() { | |
| return IS_LINUX && !IS_ARCH_ARM64; | ||
| case CVC5: | ||
| return (IS_LINUX && isSufficientVersionOfLibcxx("cvc5jni")) | ||
| || (IS_WINDOWS && !IS_ARCH_ARM64); | ||
| || (IS_WINDOWS && !IS_ARCH_ARM64) | ||
| || IS_MAC; | ||
| case OPENSMT: | ||
| return IS_LINUX && isSufficientVersionOfLibcxx("opensmtj"); | ||
| case BITWUZLA: | ||
|
|
@@ -231,8 +232,8 @@ private void checkVersion(SolverContext pContext) { | |
| solverName = "Z3"; | ||
| } | ||
| String optionalSuffix = "([A-Za-z0-9.,:_+\\-\\s()@]+)?"; // any string | ||
| String versionNumberRegex = | ||
| "(version\\s)?\\d+\\.\\d+(\\.\\d+)?(\\.\\d+)?"; // 2-4 numbers with dots | ||
| String versionNumberRegex = "(version\\s)?\\d+\\.\\d+(\\.\\d+)?(\\.\\d+)?"; // 2-4 numbers with | ||
| // dots | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is unrelated to this PR. |
||
| if (solverToUse() == Solvers.PRINCESS) { | ||
| versionNumberRegex = "\\d+-\\d+-\\d+"; // Princess uses date instead of version | ||
| } | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The better fix would be to generally allow Windows on arm64, because we provide already the dependency (dll) for that. We just have no CI for testing it. I had provided the exact screenshot for that.