-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (57 loc) · 1.73 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
name: CI
on:
push:
paths-ignore:
- "docs/**"
jobs:
test-build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: Linux
with_profiling: true
setup_env: |
sudo apt-get update
sudo apt-get install -f -y libegl1-mesa-dev
sudo apt-get install -f -y mesa-vulkan-drivers
rustup update
- os: macos-14
name: Mac M1
with_profiling: false
setup_env: |
rustup update
- os: windows-latest
name: Windows
with_profiling: true
setup_env: |
rustup update
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Environment
run: ${{ matrix.setup_env }}
shell: bash
- name: Set up cargo nexttest
uses: taiki-e/install-action@v2
with:
tool: nextest,cargo-llvm-cov
- uses: Swatinem/rust-cache@v2
- name: rust cargo tests
if: ${{!matrix.with_profiling}}
run: |
cargo llvm-cov clean --workspace
cargo llvm-cov nextest --lcov --output-path lcov.info --status-level all --no-fail-fast
- name: rust cargo tests with profiling
if: matrix.with_profiling
run: |
cargo llvm-cov clean --workspace
cargo llvm-cov nextest --features=profile --lcov --output-path lcov.info --status-level all --no-fail-fast
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info