Skip to content

Commit 7ab78eb

Browse files
committed
Add macOS to CI build matrix
1 parent a09c5a2 commit 7ab78eb

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

.github/actions/rust-build/action.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@ runs:
2222
fi
2323
cargo build
2424
- name: Enable perf_event_open and kallsyms for tests
25+
if: runner.os == 'Linux'
2526
shell: bash
2627
run: |
2728
sudo sysctl kernel.perf_event_paranoid=1
2829
sudo sysctl kernel.kptr_restrict=0
30+
- name: Raise locked-memory limit for perf ring buffers
31+
if: runner.os == 'Linux'
32+
shell: bash
33+
run: sudo prlimit --pid $$ --memlock=unlimited:unlimited
2934
- name: Run tests
3035
shell: bash
3136
env:
3237
RUSTFLAGS: "--cfg tokio_unstable"
33-
run: |
34-
# Raise locked-memory limit for large perf ring buffers
35-
sudo prlimit --pid $$ --memlock=unlimited:unlimited
36-
cargo test
38+
run: cargo test

.github/workflows/build.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ permissions:
55

66
jobs:
77
build:
8-
name: Build
9-
runs-on: ubuntu-latest
8+
name: Build (${{ matrix.os }}, ${{ matrix.toolchain }})
9+
runs-on: ${{ matrix.os }}
1010
strategy:
1111
matrix:
12-
toolchain:
13-
- stable
14-
- nightly
12+
os: [ubuntu-latest, macos-latest]
13+
toolchain: [stable, nightly]
1514
env:
1615
RUST_BACKTRACE: 1
1716
steps:

0 commit comments

Comments
 (0)