Skip to content

Commit 6087f51

Browse files
committed
ci: update Linux CI/CD to use build.zig
1 parent 8deebff commit 6087f51

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

.github/workflows/CD.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,17 @@ jobs:
1212
- name: Checkout
1313
uses: actions/checkout@v4
1414
with: { fetch-depth: 0 }
15-
- name: Install Dependencies
16-
run: |
17-
sudo apt-get update
18-
sudo apt-get install -y g++-10-multilib
15+
- uses: mlugg/setup-zig@v1
16+
with:
17+
version: 0.14.0
1918
- name: Build
2019
env:
21-
RELEASE_BUILD: 1
2220
DEMO_SIGN_PUBKEY: ${{ secrets.SAR_DEMO_SIGN_PUBKEY }}
2321
DEMO_SIGN_PRIVKEY: ${{ secrets.SAR_DEMO_SIGN_PRIVKEY }}
2422
run: make -j$(nproc)
23+
run: |
24+
zig build -Doptimize=ReleaseFast -Ddemo-sign-pubkey="$DEMO_SIGN_PUBKEY" -Ddemo-sign-privkey="$DEMO_SIGN_PRIVKEY" -Dcanary=false
25+
cp zig-out/lib/libsar.so sar.so
2526
- name: Upload Artifact
2627
uses: actions/upload-artifact@v4
2728
with:

.github/workflows/CI.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,16 @@ jobs:
2424
- name: Checkout
2525
uses: actions/checkout@v4
2626
with: { fetch-depth: 0 }
27-
- name: Install Dependencies
28-
run: |
29-
sudo apt-get update
30-
sudo apt-get install -y g++-10-multilib
27+
- uses: mlugg/setup-zig@v1
28+
with:
29+
version: 0.14.0
3130
- name: Build
3231
env:
3332
DEMO_SIGN_PUBKEY: ${{ secrets.SAR_DEMO_SIGN_PUBKEY }}
3433
DEMO_SIGN_PRIVKEY: ${{ secrets.SAR_DEMO_SIGN_PRIVKEY }}
35-
run: make -j$(nproc)
34+
run: |
35+
zig build -Doptimize=Debug -Ddemo-sign-pubkey="$DEMO_SIGN_PUBKEY" -Ddemo-sign-privkey="$DEMO_SIGN_PRIVKEY" -Dcanary=true
36+
cp zig-out/lib/libsar.so sar.so
3637
- name: Upload Artifact
3738
uses: actions/upload-artifact@v4
3839
with:

0 commit comments

Comments
 (0)