-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (101 loc) · 3.43 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# TODO: re-enable the whole matrix of rust toolchains once he basics of gitlab's
# ci/cd is being reproduced on github.
name: Build, Docs, Lint, & e2e-Test
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build_cargo:
name: build
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
#- beta
#- nightly
steps:
- uses: actions/checkout@v4
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: rustc --version # Print version info for debugging
- run: cargo --version # Print version info for debugging
- run: make build
test_e2e:
name: test e2e
needs: build_cargo
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
#- beta
#- nightly
steps:
- uses: actions/checkout@v4
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: rustc --version # Print version info for debugging
- run: cargo --version # Print version info for debugging
# install jj VCS, per 20241231 instructions at
# https://jj-vcs.github.io/jj/latest/install-and-setup/#cargo-binstall
- run: cargo install cargo-binstall # dep of jj VCS's isntallation
- run: cargo binstall --strategies crate-meta-data jj-cli # install jj VCS
- run: make test
test_doc:
name: rustdoc
needs: test_e2e
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
#- beta
#- nightly
steps:
- uses: actions/checkout@v4
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: rustc --version # Print version info for debugging
- run: cargo --version # Print version info for debugging
- run: make doc
test_lint:
name: lint
needs: test_e2e
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
#- beta
#- nightly
steps:
- uses: actions/checkout@v4
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: rustc --version # Print version info for debugging
- run: cargo --version # Print version info for debugging
- run: rustup component add clippy # install clippy
- run: cargo clippy --version # Print version info for debugging
- run: make lint
test_cov:
name: test code-coverage
needs: test_e2e
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
#- beta
#- nightly
steps:
- uses: actions/checkout@v4
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: rustc --version # Print version info for debugging
- run: cargo --version # Print version info for debugging
# install jj VCS, per 20241231 instructions at
# https://jj-vcs.github.io/jj/latest/install-and-setup/#cargo-binstall
- run: cargo install cargo-binstall # dep of jj VCS's isntallation
- run: cargo binstall --strategies crate-meta-data jj-cli # install jj VCS
- run: cargo binstall --strategies crate-meta-data cargo-llvm-cov # install jj VCS
- run: cargo llvm-cov --version # Print version info for debugging
# Same as test's steps, but run via code coverage instrumentor:
- run: make cov