forked from johnthagen/min-sized-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (54 loc) · 1.62 KB
/
Copy pathbuild.yml
File metadata and controls
56 lines (54 loc) · 1.62 KB
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
name: build
on: [ push, pull_request ]
jobs:
default:
name: Default
strategy:
matrix:
platform: [ ubuntu-latest, macos-latest, windows-latest ]
toolchain: [ stable, 1.28.0, nightly ]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features
no_std:
name: no_std
strategy:
matrix:
platform: [ ubuntu-latest, macos-latest ]
toolchain: [ stable, 1.30.0, nightly ]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- name: Build
working-directory: no_std
run: cargo build --release --all-features
build_std:
name: build-std
strategy:
matrix:
project_dir: [ build_std, no_main ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Build
working-directory: ${{ matrix.project_dir }}
run: >
rustup component add rust-src;
cargo +nightly build -Z build-std=std,panic_abort --target x86_64-unknown-linux-gnu --release;
cargo +nightly build -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target x86_64-unknown-linux-gnu --release;