Skip to content

Commit 8007a39

Browse files
committed
More fixes to publish.yml and add linux runner
1 parent 0207609 commit 8007a39

File tree

1 file changed

+32
-14
lines changed

1 file changed

+32
-14
lines changed

.github/workflows/publish.yml

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,35 @@ on:
55

66
jobs:
77
check:
8-
# runs-on: ubuntu-latest
9-
runs-on: macos-latest
8+
runs-on: ${{ matrix.os }}
109

11-
strategy: { matrix: { project: [benchmarking-tool] } }
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os: [ubuntu-latest, macos-latest] # windows-latest,
14+
project: [benchmarking-tool]
15+
include:
16+
- os: ubuntu-latest
17+
dynamic-library: libqbdi_tracer.so
18+
- os: macos-latest
19+
dynamic-library: libqbdi_tracer.dylib
1220

1321
steps:
1422
- uses: actions/checkout@v4
1523
- uses: dtolnay/rust-toolchain@stable
1624
- uses: jwlawson/actions-setup-cmake@v2
1725
with: { cmake-version: '3.31.7' }
1826

19-
# - name: Check
20-
# run: cargo check
21-
# working-directory: ${{ matrix.project }}
27+
- name: Check
28+
run: cargo check
29+
working-directory: ${{ matrix.project }}
2230

23-
- name: Get QBDI
31+
- name: Get QBDI (linux)
32+
if: ${{ matrix.os == 'ubuntu-latest' }}
33+
run: dpkg -i QBDI-*-*-X86_64.deb
34+
35+
- name: Get QBDI (macos)
36+
if: ${{ matrix.os == 'macos-latest' }}
2437
run: |
2538
curl https://github.com/QBDI/QBDI/releases/download/v0.12.0/QBDI-0.12.0-osx-AARCH64.pkg -L > QBDI.pkg
2639
file QBDI.pkg
@@ -36,14 +49,19 @@ jobs:
3649
mv target/debug/examples/iterations .
3750
3851
bash build-qbdi.sh
39-
mv qbdi/build/libqbdi_tracer.dylib .
52+
mv 'qbdi/build/${{ matrix.dynamic-library }}' .
4053
41-
ls
42-
43-
# Test
44-
./benchmark qbdi iterations 10
45-
./benchmark qbdi iterations 100
46-
./benchmark qbdi iterations 1000
54+
- name: Run iterations
55+
working-directory: ${{ matrix.project }}
56+
run: |
57+
for i in {0..3}
58+
do
59+
i=$((10**i))
60+
61+
echo "::group::benchmark ./iterations $i"
62+
./benchmark qbdi ./iterations $i
63+
echo "::endgroup::"
64+
done
4765
4866
# - name: Lint
4967
# run: cargo clippy

0 commit comments

Comments
 (0)