Skip to content

Commit 1cd94bb

Browse files
authored
A few more CI tests (#18)
I recently got a runtime error in martin in macos-latest runner https://github.com/maplibre/martin/actions/runs/9232099619/job/25402973412 -- trying to see if its from here ``` dyld[12895]: Library not loaded: /usr/local/opt/freetype/lib/libfreetype.6.dylib Referenced from: <6F45087B-9511-3676-8E75-D8901573A921> /Users/runner/work/martin/martin/target/martin Reason: tried: '/usr/local/opt/freetype/lib/libfreetype.6.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/freetype/lib/libfreetype.6.dylib' (no such file), '/usr/local/opt/freetype/lib/libfreetype.6.dylib' (no such file), '/usr/local/lib/libfreetype.6.dylib' (no such file), '/usr/lib/libfreetype.6.dylib' (no such file, not in dyld cache) ```
1 parent 011f994 commit 1cd94bb

File tree

2 files changed

+37
-6
lines changed

2 files changed

+37
-6
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v3
26+
uses: actions/checkout@v4
2727
- name: Check semver
2828
uses: obi1kenobi/cargo-semver-checks-action@v2
2929

@@ -32,12 +32,13 @@ jobs:
3232
runs-on: ubuntu-latest
3333
steps:
3434
- name: Checkout
35-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
36+
37+
- uses: Swatinem/rust-cache@v2
38+
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
3639

3740
- name: Report Rust version
38-
run: |
39-
rustc --version
40-
cargo --version
41+
run: rustc --version && cargo --version
4142

4243
- name: Run fmt
4344
run: cargo fmt --all -- --check
@@ -55,3 +56,33 @@ jobs:
5556
run: |
5657
cargo test --workspace --release --doc --locked
5758
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --release --no-deps
59+
60+
61+
multi-os-test:
62+
name: Test on multiple OS
63+
runs-on: ${{ matrix.os }}
64+
strategy:
65+
matrix:
66+
os:
67+
# This is not an exhaustive list of runners, just the more recent ones
68+
- ubuntu-latest
69+
- ubuntu-24.04
70+
- ubuntu-22.04
71+
- macos-latest
72+
- macos-13
73+
- macos-14 # M1 CPU
74+
- windows-latest
75+
- windows-2022
76+
77+
steps:
78+
- name: Checkout
79+
uses: actions/checkout@v4
80+
81+
- uses: Swatinem/rust-cache@v2
82+
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
83+
84+
- name: Report Rust version
85+
run: rustc --version && cargo --version
86+
87+
- name: Run tests
88+
run: cargo test --workspace --all-features --locked

pbf_font_tools/tests/integration_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ async fn test_get_font_stack() {
9999
namsan_glyph.eq(&glyph.bitmap.clone().unwrap()),
100100
"Encountered glyph where Namsan was overwritten by Open Sans."
101101
);
102-
} else if open_sans_mapping.get(&glyph.id.unwrap()).is_some() {
102+
} else if open_sans_mapping.contains_key(&glyph.id.unwrap()) {
103103
has_open_sans_glyph = true;
104104
} else {
105105
panic!("Uh, where did this glyph come from?");

0 commit comments

Comments
 (0)