-
Notifications
You must be signed in to change notification settings - Fork 16
129 lines (122 loc) · 3.63 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Build & Test
on:
push:
branches:
- '*'
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- macos-11
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Run tests all features
run: cargo test --verbose --no-default-features --all-features
# Release
- name: Build Release
run: cargo build --release --verbose
- name: Run tests all features
run: cargo test --release --verbose --all-features
# Debug
- name: Build Debug
run: cargo build --verbose
- name: Run tests all features
run: cargo test --verbose --all-features
# RC Provider
- name: Build Debug RC provider all features
working-directory: rust_crypto_provider
run: cargo build --verbose --all-features
# Apple Silicon
- if: matrix.os == 'macos-11'
run: |
brew install pkg-config
sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
sudo xcode-select -s /Applications/Xcode_12.4.app
rustup target install aarch64-apple-darwin
rustup target install aarch64-apple-ios
- name: Build
run: cargo build --verbose
- name: Apple Silicon Build
if: matrix.os == 'macos-11'
run: |
cargo build --target aarch64-apple-darwin --tests --verbose
cargo build --release --target aarch64-apple-darwin --tests --verbose
# ARM64 iOS
- name: iOS aarch64
if: matrix.os == 'macos-11'
run: |
cargo build --target aarch64-apple-ios --tests --verbose
cargo build --release --target aarch64-apple-ios --tests --verbose
cross-build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# 32-bit Linux
- target: i686-unknown-linux-gnu
rust: stable
deps: sudo apt update && sudo apt install gcc-multilib
# wasm
- target: wasm32-unknown-unknown
rust: stable
# ARM64 Android
- target: aarch64-linux-android
rust: stable
# ARM64 iOS
- target: aarch64-apple-ios
rust: stable
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
profile: minimal
override: true
- run: ${{ matrix.deps }}
- run: cargo build --target ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }} --release
fuzz:
strategy:
fail-fast: false
matrix:
os:
- macos-11
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
- uses: actions-rs/install@v0.1
with:
crate: cargo-fuzz
version: latest
- name: Fuzz Base w/ RustCrypto
run: cargo fuzz run base -- -runs=10000
no-std-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# we use a target that lacks a pre-compiled libstd to check if any dependency is using libstd
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: thumbv7em-none-eabihf
default: true
- name: build crates in no-std mode
run: cargo check --target thumbv7em-none-eabihf
working-directory: no-std-support-check