-
Notifications
You must be signed in to change notification settings - Fork 16
131 lines (112 loc) · 3.33 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: ci
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
rustfmt:
runs-on: ubuntu-24.04
steps:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt
- uses: actions/checkout@v4
- run: cargo fmt -- --check
clippy:
runs-on: ubuntu-24.04
steps:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: clippy
- uses: actions/checkout@v4
- run: cargo +nightly clippy -- --deny warnings
ci:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- toolchain: stable
- toolchain: stable
features: no-std
- toolchain: stable
features: git
- toolchain: stable
features: vendored
- toolchain: 1.64.0 # MSRV no-std
features: no-std
- toolchain: 1.64.0 # MSRV
- toolchain: nightly
- toolchain: nightly
features: no-std
steps:
- run: sudo apt-get -qq install ccache libbotan-2-dev
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/ccache
key: linux-${{ matrix.toolchain }}-${{ matrix.features }}-${{ github.run_id }}
restore-keys: |
linux-${{ matrix.toolchain }}-${{ matrix.features }}
- uses: dtolnay/rust-toolchain@master
with:
target: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
- run: ./.ci/build.py ${{ matrix.features }}
ci_mac:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
include:
- toolchain: stable
features: botan3
- toolchain: stable
features: vendored
- toolchain: nightly
features: botan3
steps:
- run: brew install ccache botan
- run: ls -l /opt/homebrew/*
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
/Users/runner/Library/Caches/ccache
key: mac-${{ matrix.toolchain }}-${{ matrix.features }}-${{ github.run_id }}
restore-keys: |
mac-${{ matrix.toolchain }}-${{ matrix.features }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- run: ./.ci/build.py ${{ matrix.features }}
ci_windows:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
include:
- toolchain: stable
features: vendored
# - toolchain: nightly
steps:
- run: choco install -y sccache
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
C:/Users/runneradmin/AppData/Local/Mozilla/sccache/cache
key: windows-${{ matrix.toolchain }}-${{ matrix.features }}-${{ github.run_id }}
restore-keys: |
windows-${{ matrix.toolchain }}-${{ matrix.features }}
- uses: egor-tensin/vs-shell@v2
with:
arch: amd64
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- run: python3 ./.ci/build.py ${{ matrix.features }} --compiler-cache=sccache