-
Notifications
You must be signed in to change notification settings - Fork 29
109 lines (99 loc) · 3.35 KB
/
rust.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
name: Test and Build Rust
on:
push:
pull_request:
schedule:
# Check if it works with current dependencies (weekly on Wednesday 2:32 UTC)
- cron: '32 2 * * 3'
jobs:
test:
name: Test ${{ matrix.os }} ${{ matrix.toolchain }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.toolchain == 'nightly' }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
toolchain: stable
clippyargs: -D clippy::pedantic -D warnings
- os: macOS-latest
toolchain: stable
clippyargs: -D clippy::pedantic -D warnings
- os: windows-latest
toolchain: stable
clippyargs: -D clippy::pedantic -D warnings
- os: ubuntu-latest
toolchain: nightly
clippyargs: -W clippy::pedantic
# - os: ubuntu-latest
# toolchain: 1.41.1 # Debian 10 Buster
# clippyargs: -W clippy::pedantic -A unknown-lints -A clippy::unknown-clippy-lints
- os: ubuntu-latest
toolchain: 1.47.0 # Alpine 3.13
clippyargs: -W clippy::pedantic -A unknown-lints -A clippy::unknown-clippy-lints
- os: ubuntu-latest
toolchain: 1.48.0 # Debian 11 Bullseye
clippyargs: -W clippy::pedantic -A unknown-lints -A clippy::unknown-clippy-lints
steps:
- uses: actions/checkout@v2
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
components: clippy
override: true
profile: minimal
toolchain: ${{ matrix.toolchain }}
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --verbose --all-targets --all-features -- ${{ matrix.clippyargs }}
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --all-features
release:
name: Release ${{ matrix.triple }}
runs-on: ${{ matrix.os }}
needs: test
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
triple: x86_64-unknown-linux-gnu
- os: ubuntu-latest
triple: arm-unknown-linux-gnueabihf
- os: ubuntu-latest
triple: armv7-unknown-linux-gnueabihf
- os: ubuntu-latest
triple: aarch64-unknown-linux-gnu
- os: macOS-latest
triple: x86_64-apple-darwin
- os: macOS-latest
triple: aarch64-apple-darwin
- os: windows-latest
triple: x86_64-pc-windows-msvc
# https://github.com/briansmith/ring/issues/1167
# - os: windows-latest
# triple: aarch64-pc-windows-msvc
steps:
- uses: actions/checkout@v2
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
override: true
profile: minimal
target: ${{ matrix.triple }}
toolchain: stable
- name: Build release
uses: actions-rs/cargo@v1
env:
# TODO: Remove this once it's the default
SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk
with:
command: build
args: --release --verbose --all-features --target ${{ matrix.triple }}
use-cross: ${{ runner.os == 'Linux' && matrix.triple != 'x86_64-unknown-linux-gnu' }}