-
Notifications
You must be signed in to change notification settings - Fork 56
235 lines (201 loc) · 6.92 KB
/
Copy pathci.yml
File metadata and controls
235 lines (201 loc) · 6.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# 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: [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: [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:
# GithubCI does not support Windows ARM64 runners with all JDKs, so we list them explicitly.
- { 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