forked from boj-rs/basm-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (43 loc) · 1.1 KB
/
build-linux-x86_64.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
name: Check
on:
- push
- pull_request
env:
CARGO_NET_RETRY: 10
CI: 1
RUSTUP_MAX_RETRIES: 10
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal
override: true
components: clippy
- name: Install System packages
run: |
sudo apt update
sudo apt install nasm
- name: Clippy
run: cargo clippy
env:
RUSTFLAGS: "-D warnings -A clippy::missing_safety_doc"
- name: Test
run: cargo test --lib -- --test-threads 1
env:
RUSTFLAGS: ""
- name: Check C
run: |
scripts/check.sh \
"./release.sh | tee /tmp/code.c" \
"cc -w /tmp/code.c -o /tmp/bin"
- name: Check Rust
run: |
scripts/check.sh \
"./release-rs.sh | tee /tmp/code.rs" \
"rustc +stable -O -A dead-code /tmp/code.rs -o /tmp/bin"