Skip to content

Commit 1930e09

Browse files
Luni-4est31
authored andcommitted
Add macOS to CI (#70)
1 parent 567c2aa commit 1930e09

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

.github/workflows/lewton.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,34 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7+
78
strategy:
89
matrix:
9-
rust: [stable, 1.20.0]
10-
platform: [ubuntu-latest, windows-latest]
11-
runs-on: ${{ matrix.platform }}
10+
os: [macOS-latest, ubuntu-latest, windows-latest]
11+
toolchain: [stable, 1.20.0]
12+
13+
runs-on: ${{ matrix.os }}
1214

1315
steps:
1416
- uses: actions/checkout@master
1517
- name: Install Rust
16-
run: |
17-
rustup toolchain install ${{ matrix.rust }}
18-
rustup default ${{ matrix.rust }}
19-
rustc -vV
18+
if: matrix.os != 'macOS-latest' || matrix.toolchain != '1.20.0'
19+
uses: actions-rs/toolchain@v1
20+
with:
21+
toolchain: ${{ matrix.toolchain }}
22+
override: true
2023
- name: Run no-default-features builds
24+
if: matrix.os != 'macOS-latest' || matrix.toolchain != '1.20.0'
2125
run: |
2226
cargo test --verbose --no-default-features
2327
cargo doc --verbose --no-default-features
2428
- name: Run all-features builds
29+
if: matrix.os != 'macOS-latest' || matrix.toolchain != '1.20.0'
2530
run: |
2631
cargo test --verbose --all-features
2732
cargo doc --verbose --all-features
2833
- name: Run cmp tests
34+
if: matrix.os != 'macOS-latest' || matrix.toolchain != '1.20.0'
2935
run: |
3036
cd dev/cmp
31-
cargo test --verbose --release
37+
cargo test --verbose --release

dev/cmp/tests/vals.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ fn test_libnogg_vals() {
7878
ensure_okay!("single-code-nonsparse.ogg");
7979
ensure_okay!("single-code-ordered.ogg");
8080
cmp_output!("single-code-sparse.ogg", 0);
81+
#[cfg(not(target_os = "macos"))]
8182
cmp_output!("sketch008-floor0.ogg", 4);
8283
cmp_output!("sketch008.ogg", 0);
8384
cmp_output!("sketch039.ogg", 0);
@@ -160,6 +161,7 @@ fn test_xiph_vals_5() {
160161
println!();
161162

162163
cmp_output!("singlemap-test.ogg", 0);
164+
#[cfg(not(target_os = "macos"))]
163165
cmp_output!("sleepzor.ogg", 9);
164166
cmp_output!("test-short.ogg", 1);
165167
cmp_output!("test-short2.ogg", 0);

0 commit comments

Comments
 (0)