This repository has been archived by the owner on Jan 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
90 lines (79 loc) · 2.6 KB
/
ci.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: CI
on:
pull_request:
branches:
- master
paths-ignore:
- '.github/**'
- '.gitignore'
- 'LICENSE'
- 'README.md'
- 'miniaudio/README.md'
- 'generate-bindings.rs'
push:
branches:
- master
paths-ignore:
- '.github/**'
- '.gitignore'
- 'LICENSE'
- 'README.md'
- 'miniaudio/README.md'
- 'generate-bindings.rs'
jobs:
cargo-tests:
name: ${{ matrix.rust_channel }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
env:
CARGO_INCREMENTAL: 0
steps:
- uses: actions/checkout@v2
- name: Checkout Submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: default
override: true
components: rustfmt, clippy
- name: Cache Cargo Registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ matrix.os }}-${{ matrix.rust_channel }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
- name: Cache Cargo Index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ matrix.os }}-${{ matrix.rust_channel }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
- name: Cache Cargo Target Dir
uses: actions/cache@v1
with:
path: target
key: ${{ matrix.os }}-${{ matrix.rust_channel }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
- name: Install LLVM (Windows)
run: choco install llvm
if: matrix.os == 'windows-latest'
# Display Tool Versions:
- name: Check Tools
run: |
rustc --version
cargo --version
cargo fmt --version
cargo clippy --version
# Run Tests:
- name: Build
run: cargo build --examples --tests
- name: Test
run: cargo test -vv
- name: Check Formatting
run: cargo fmt --all -- --check
- name: Clippy Lints
run: cargo clippy --examples