-
Notifications
You must be signed in to change notification settings - Fork 71
59 lines (46 loc) · 1.37 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Rust
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.51.0
- stable
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Build
run: cargo build --no-default-features
- name: Build with std
run: cargo build --no-default-features --features std
- name: Build with variable-fonts
run: cargo build --no-default-features --features variable-fonts
- name: Build with all features
run: cargo build --all-features
- name: Run tests
run: cargo test
- name: Build C API
working-directory: c-api
run: cargo build --no-default-features
- name: Build C API with variable-fonts
working-directory: c-api
run: cargo build --no-default-features --features variable-fonts
- name: Test C API
working-directory: c-api
run: |
cargo build
gcc test.c -o test -L./target/debug/ -lttfparser -Werror -fsanitize=address
env LD_LIBRARY_PATH=./target/debug/ ./test
- name: Build benches
working-directory: benches
run: cargo bench dummy # `cargo build` will not actually build it