Skip to content

CI: Populate some more #21

CI: Populate some more

CI: Populate some more #21

Workflow file for this run

# 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 -Dyices2.version=2.8.0-prerelease -Dyices.module="javasmt-yices2" -Dyices.version="5.0.1-722-g90a66d7fa" -Dyices.configuration="runtime-yices2->runtime; contrib->sources"
macos:
name: macOS (${{ matrix.arch }}, Java ${{ matrix.java-version }})
needs: dependencies
strategy:
fail-fast: false
matrix:
java-version: [21]
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: Add local Ivy repo
run: |
mkdir -p repository/org.sosy_lab/java-smt
mkdir -p repository/org.sosy_lab/javasmt-solver-yices2/arm64
mkdir -p repository/org.sosy_lab/javasmt-yices2
- name: Build Yices binaries
run: ant publish-yices2 -Dyices2.version=2.8.0-prerelease -Dyices.module="javasmt-yices2" -Dyices.version="yices2.8-prerelease" -Dyices.configuration="runtime-yices2->runtime; contrib->sources"
#- name: Show dependencies
# run: otool -L downloads/yices2_java_bindings/dist/lib/libyices2java.dylib
- name: Build project
run: |
ant -Dyices.module="javasmt-solver-yices2" -Dyices.version="2.8.0-prerelease" -Dyices.configuration="runtime-yices2->solver-yices2"
ant publish-artifacts-yices2 -Dversion=yices2.8-prerelease -Dyices.module="javasmt-solver-yices2" -Dyices.version="2.8.0-prerelease" -Dyices.configuration="runtime->solver-yices2"
ant publish -Dversion=yices-prerelease -Dyices.module="javasmt-yices2" -Dyices.version="yices2.8-prerelease" -Dyices.configuration="runtime-yices2->runtime; contrib->sources"
- 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 -Dyices.module="javasmt-yices2" -Dyices.version="yices2.8-prerelease" -Dyices.configuration="runtime-yices2->runtime; contrib->sources"
- 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