Skip to content

Commit

Permalink
feat(ci): ensure building passes on macos (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexicon226 authored Jan 16, 2025
1 parent 9977fa4 commit 63544d0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 11 deletions.
44 changes: 35 additions & 9 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,28 @@ jobs:
- name: check style
run: python scripts/style.py --check src

build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3

- name: setup-zig
uses: mlugg/setup-zig@v1
with:
version: 0.13.0

# GitHub's CI runners for macos seem to alternate between using a x86 and an ARM machine
# which is annoying to handle and results in them having invalid hardware info configurations
# on the virtual machine. This leads to incorrect feature detection and the CI is flaky.
#
# If we at some point setup a self-hosted MacOS runner, we could work around the issue and
# enable full testing on MacOS!
- name: build
run: |
zig build -Dtarget=x86_64-linux -Dcpu=x86_64_v4
zig build -Dtarget=aarch64-macos -Dcpu=apple_m3
test:
strategy:
matrix:
Expand All @@ -45,8 +67,6 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: setup-zig
uses: mlugg/setup-zig@v1
Expand All @@ -56,7 +76,7 @@ jobs:
- name: test
run: |
zig build test -Denable-tsan=true
zig build test -Denable-tsan=true -Dblockstore=hashmap -Dfilter=ledger
zig build test -Denable-tsan=true -Dblockstore=hashmap -Dfilter="ledger"
kcov_test:
strategy:
Expand Down Expand Up @@ -104,15 +124,15 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: setup-zig
uses: mlugg/setup-zig@v1
with:
version: 0.13.0

- name: build release
run: zig build -Doptimize=ReleaseSafe

- name: run gossip
run: bash scripts/gossip_test.sh 120 # in seconds

Expand All @@ -125,14 +145,15 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: setup zig
uses: mlugg/setup-zig@v1
with:
version: 0.13.0

- name: build
run: zig build -Doptimize=ReleaseSafe -Dno-run fuzz

- name: run
run: ./zig-out/bin/fuzz gossip_service 19 10000

Expand All @@ -145,14 +166,18 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v2

with:
submodules: recursive

- name: setup zig
uses: mlugg/setup-zig@v1
with:
version: 0.13.0

- name: build
run: zig build -Doptimize=ReleaseSafe -Dno-run fuzz

- name: run
run: ./zig-out/bin/fuzz gossip_table 19 100000

Expand All @@ -165,14 +190,15 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: setup zig
uses: mlugg/setup-zig@v1
with:
version: 0.13.0

- name: build
run: zig build -Doptimize=ReleaseSafe -Dno-run fuzz

- name: run
run: ./zig-out/bin/fuzz allocators 19 10000

Expand Down
4 changes: 2 additions & 2 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
.hash = "12207766d25ba350d6e2f2153fc74a2b3ff204224e1c08adf211cd9e400075033898",
},
.lsquic = .{
.url = "https://github.com/Syndica/lsquic/archive/7c34f2472f390482dffada7a65b8231f6b5b3a3b.tar.gz",
.hash = "1220ff572d14b18d9774a298db0b8aeb046800039ccc8e10646992b074e26ea4c38a",
.url = "https://github.com/Syndica/lsquic/archive/ed6ced0cbc6447f7135a32db491e398debdf8af7.tar.gz",
.hash = "12207247a06ac1e7f4ddd6f0fbca4bcdcdf78655432a07928a96c8ec456bdfca71e3",
},
.xev = .{
.url = "https://github.com/mitchellh/libxev/archive/b8d1d93e5c899b27abbaa7df23b496c3e6a178c7.tar.gz",
Expand Down

0 comments on commit 63544d0

Please sign in to comment.