Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
7c49fa8
Add JavaSMT project template for Ivy/Ant
daniel-raffler Mar 23, 2025
0eb0775
IvyExampleProject: Copy library files for windows
daniel-raffler Mar 24, 2025
7cdb937
IvyExampleProject: Add symlinks for macOS
daniel-raffler Mar 24, 2025
aec0884
IvyExampleProject: Copy solver binaries and remove the symlinks
daniel-raffler Sep 3, 2025
f17ec99
IvyExampleProject: Update to latest JavaSMT release
daniel-raffler Sep 3, 2025
4ba869e
Update version in the Maven example
daniel-raffler May 22, 2026
e2a582e
Add a comment about excluding solvers in Maven or changing their vers…
daniel-raffler May 23, 2026
2f8e3f6
Add documentation about manually overriding solver versions in Ivy to…
daniel-raffler May 23, 2026
caf79d8
Add documentation about getting the right solver versions for Maven t…
daniel-raffler May 23, 2026
3bf58a3
Update Maven web example
daniel-raffler May 24, 2026
03f0b2d
Update Gradle example
daniel-raffler May 25, 2026
c191367
Update Kotlin Gradle example
daniel-raffler May 25, 2026
0193b70
Remove kotlin-stdlib dependency in Kotlin Gradle example
daniel-raffler May 25, 2026
d03c6ae
Use parametrized test in the Gradle example
daniel-raffler May 25, 2026
62fe096
Add missing solver tests to the Kotlin example
daniel-raffler May 25, 2026
4503a55
Rewrite test for the Kotlin example
daniel-raffler May 25, 2026
72a5ae8
Update JavaSMT version in the Ivy example project
daniel-raffler May 25, 2026
bbcd676
Add tests for the Ivy example project and make it better aligned with…
daniel-raffler May 26, 2026
b0668f4
Merge remote-tracking branch 'refs/remotes/origin/master' into 463-pr…
daniel-raffler May 26, 2026
df3d41c
Compile to Java17 in the Kotlin example
daniel-raffler May 27, 2026
ddd98fa
Print solver names while running the tests in the Kotlin example
daniel-raffler May 27, 2026
c869679
Fix macOS paths in Ivy example project
daniel-raffler May 30, 2026
b5ca507
Add support for other platforms in Ivy example project
daniel-raffler May 30, 2026
ad1a139
Add support for other platforms in example projects
daniel-raffler May 30, 2026
c511833
Merge branch 'update-maven-example' into example-project-ci
daniel-raffler May 30, 2026
bb653b9
Add CI for JavaSMT example projects
daniel-raffler May 30, 2026
7064468
Use junitlauncher to run tests in Ivy example project
daniel-raffler Jun 1, 2026
02da8c4
Rename Kotlin project to "Kotlin Gradle" in the CI for the example pr…
daniel-raffler Jun 5, 2026
4cf33a2
Use "-latest" github runners when possible
daniel-raffler Jun 5, 2026
faae96e
Download Ivy from sosy-labs
daniel-raffler Jun 5, 2026
739370d
Remove skip.download option
daniel-raffler Jun 5, 2026
034aaa3
Add missing org.junit.platform dependency to the Ivy example project
daniel-raffler Jun 5, 2026
7d06fd6
Move platform check to @BeforeEach block in project examples
daniel-raffler Jun 6, 2026
713f7b2
Report failure when running `ant test` in Ivy example projects and on…
daniel-raffler Jul 17, 2026
71db611
Move platform detection in example projects to a separate file
daniel-raffler Jul 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
298 changes: 298 additions & 0 deletions .github/workflows/example-project-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,298 @@
# 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: example-project-ci

on:
push
Comment on lines +11 to +12

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remember to change this before merging. Right now it will trigger whenever anything is pushed to github. We could restrict it to only pushes to main, or maybe even have it manually triggered (whenever we release a new version of JavaSMT)


jobs:
ivy:
name: Ivy Example Project
strategy:
fail-fast: false
matrix:
java-version: [ 21 ]
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-26-intel, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6

- name: Set up JDK ${{ matrix.java-version }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use a dependencies job as in ci.yml to set up our environment correctly, i.e. so that Java and other dependencies are present. And why don't we just extend ci.yml?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Java is fetched by actions/setup-java and we're using caches to avoid downloading the dependencies multiple times. We could try integrating it further with ci.yml, but since the examples are using various different build systems, there may not be that much overlap

In total the example-project-ci workflow takes 7-8 minutes to run, which is probably still fine, especially as we may not have to run it as often as our regular CI jobs

uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'

- name: Shared Ivy Cache
uses: actions/cache@v5
with:
path: .ivy2
# 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: Build Ivy project
run: |
cd doc/Example-Ivy-Project
ant compile

- name: Show solver table
run: |
cd doc/Example-Ivy-Project
ant run
env:
LD_PRELOAD: /usr/lib/${{ matrix.os == 'ubuntu-24.04-arm' && 'aarch64-linux-gnu' || 'x86_64-linux-gnu' }}/libstdc++.so.6

- name: Run tests
run: |
cd doc/Example-Ivy-Project
ant test
env:
LD_PRELOAD: /usr/lib/${{ matrix.os == 'ubuntu-24.04-arm' && 'aarch64-linux-gnu' || 'x86_64-linux-gnu' }}/libstdc++.so.6

- name: Upload test report
uses: actions/upload-artifact@v7
if: always()
with:
path: doc/Example-Ivy-Project/build/test-report/html/junit-noframes.html
archive: false

maven:
name: Maven Example Project
strategy:
fail-fast: false
matrix:
java-version: [ 21 ]
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025, windows-11-arm, macos-26-intel, macos-26]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'

- name: Shared Maven Cache
uses: actions/cache@v5
with:
path: .m2/repository
# We use a unique key for each run to ensure the cache is updated if needed,
# while restoring from the most recent "maven-shared-" cache.
key: maven-shared-${{ github.run_id }}
restore-keys: |
maven-shared-
enableCrossOsArchive: true

- name: Build Maven example project
run: |
cd doc/Example-Maven-Project
mvn -DskipTests compile

- name: Show solver table
run: |
cd doc/Example-Maven-Project
mvn exec:exec
env:
LD_PRELOAD: /usr/lib/${{ matrix.os == 'ubuntu-24.04-arm' && 'aarch64-linux-gnu' || 'x86_64-linux-gnu' }}/libstdc++.so.6

- name: Run tests
run: |
cd doc/Example-Maven-Project
mvn test
env:
LD_PRELOAD: /usr/lib/${{ matrix.os == 'ubuntu-24.04-arm' && 'aarch64-linux-gnu' || 'x86_64-linux-gnu' }}/libstdc++.so.6

- name: Generate test report
run : |
cd doc/Example-Maven-Project
mvn surefire-report:report-only

- name: Upload test report
uses: actions/upload-artifact@v7
if: always()
with:
path: doc/Example-Maven-Project/target/reports/surefire.html
archive: false

web:
name: Maven Web Example Project
strategy:
fail-fast: false
matrix:
java-version: [ 21 ]
os: [ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'

- name: Shared Maven Cache
uses: actions/cache@v5
with:
path: .m2/repository
# We use a unique key for each run to ensure the cache is updated if needed,
# while restoring from the most recent "maven-shared-" cache.
key: maven-shared-${{ github.run_id }}
restore-keys: |
maven-shared-
enableCrossOsArchive: true

- name: Build Maven Web example project
run: |
cd doc/Example-Maven-Web-Project
mvn -DskipTests package

- name: Run tests
run: |
cd doc/Example-Maven-Web-Project
mvn test
env:
LD_PRELOAD: /usr/lib/${{ matrix.os == 'ubuntu-24.04-arm' && 'aarch64-linux-gnu' || 'x86_64-linux-gnu' }}/libstdc++.so.6

- name: Generate test report
run : |
cd doc/Example-Maven-Web-Project
mvn surefire-report:report-only

- name: Upload test report
uses: actions/upload-artifact@v7
if: always()
with:
path: doc/Example-Maven-Web-Project/target/reports/surefire.html
archive: false

gradle:
name: Gradle Example Project
strategy:
fail-fast: false
matrix:
java-version: [ 21 ]
os: [ ubuntu-24.04, ubuntu-24.04-arm, windows-2025, windows-11-arm, macos-26-intel, macos-26 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
architecture: ${{ matrix.arch }}

- name: Shared Maven Cache
uses: actions/cache@v5
with:
path: .m2/repository
# We use a unique key for each run to ensure the cache is updated if needed,
# while restoring from the most recent "maven-shared-" cache.
key: maven-shared-${{ github.run_id }}
restore-keys: |
maven-shared-
enableCrossOsArchive: true

- name: Install Gradle
uses: gradle/actions/setup-gradle@v6
with:
gradle-version: '9.5.1'

- name: Build Gradle example project
run: |
cd doc/Example-Gradle-Project
gradle build -x test

- name: Show solver table
run: |
cd doc/Example-Gradle-Project
gradle run
env:
LD_PRELOAD: /usr/lib/${{ matrix.os == 'ubuntu-24.04-arm' && 'aarch64-linux-gnu' || 'x86_64-linux-gnu' }}/libstdc++.so.6

- name: Run tests
run: |
cd doc/Example-Gradle-Project
gradle test
env:
LD_PRELOAD: /usr/lib/${{ matrix.os == 'ubuntu-24.04-arm' && 'aarch64-linux-gnu' || 'x86_64-linux-gnu' }}/libstdc++.so.6

- name: Upload test report
uses: actions/upload-artifact@v7
if: always()
with:
path: doc/Example-Gradle-Project/build/reports/tests/test/index.html
archive: false

kotlin:
name: Kotlin Gradle Example Project
strategy:
fail-fast: false
matrix:
java-version: [ 21 ]
os: [ ubuntu-24.04, ubuntu-24.04-arm, windows-2025, windows-11-arm, macos-26-intel, macos-26 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
architecture: ${{ matrix.arch }}

- name: Shared Maven Cache
uses: actions/cache@v5
with:
path: .m2/repository
# We use a unique key for each run to ensure the cache is updated if needed,
# while restoring from the most recent "maven-shared-" cache.
key: maven-shared-${{ github.run_id }}
restore-keys: |
maven-shared-
enableCrossOsArchive: true

- name: Install Gradle
uses: gradle/actions/setup-gradle@v6
with:
gradle-version: '9.5.1'

- name: Build Kotlin example project
run: |
cd doc/Example-Gradle-Project-Kotlin
gradle build -x test

- name: Show solver table
run: |
cd doc/Example-Gradle-Project-Kotlin
gradle run
env:
LD_PRELOAD: /usr/lib/${{ matrix.os == 'ubuntu-24.04-arm' && 'aarch64-linux-gnu' || 'x86_64-linux-gnu' }}/libstdc++.so.6

- name: Run tests
run: |
cd doc/Example-Gradle-Project-Kotlin
gradle test
env:
LD_PRELOAD: /usr/lib/${{ matrix.os == 'ubuntu-24.04-arm' && 'aarch64-linux-gnu' || 'x86_64-linux-gnu' }}/libstdc++.so.6

- name: Upload test report
uses: actions/upload-artifact@v7
if: always()
with:
path: doc/Example-Gradle-Project-Kotlin/build/reports/tests/test/index.html
archive: false
Loading
Loading