-
Notifications
You must be signed in to change notification settings - Fork 91
85 lines (68 loc) · 2.09 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
name: CI
on:
push:
branches: [ "master", "staging", "trying" ]
pull_request:
branches: [ "master" ]
merge_group:
types: [checks_requested]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
continue-on-error: ${{ matrix.os == 'windows-latest' }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
with_rust: ['true', 'false']
rust_version: ['1.70', 'stable']
exclude:
- with_rust: 'false'
rust_version: 'stable'
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}, with_rust=${{ matrix.with_rust }}, rust_version=${{ matrix.rust_version }}
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Setup rustup
run: |
rustup default ${{ matrix.rust_version }}
rustup update
- name: Build
run: cargo xtask build --build-type ${{env.BUILD_TYPE}} --with-rust ${{matrix.with_rust}} --verbose true
- name: Test
run: cargo xtask test --build-type ${{env.BUILD_TYPE}}
build_with_hash:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Build
run: cargo xtask build --build-type ${{env.BUILD_TYPE}} --with-rust false --with-hash true --verbose true
- name: Test
run: cargo xtask test --build-type ${{env.BUILD_TYPE}}
coverage:
strategy:
matrix:
with_rust: ['true', 'false']
runs-on: ubuntu-latest
name: with_rust=${{ matrix.with_rust }}
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Setup rustup
run: |
rustup default nightly
rustup update
- name: Build
run: cargo xtask build --build-type Debug --with-rust ${{matrix.with_rust}} --with-coverage true --verbose true
- name: Test
run: cargo xtask test --build-type Debug
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}