-
Notifications
You must be signed in to change notification settings - Fork 26
61 lines (55 loc) · 1.48 KB
/
main.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
name: CI
on:
push:
branches:
- master
pull_request:
jobs:
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Install Rust
run: |
rustup update stable
rustup default stable
rustup component add rustfmt
- name: Cargo fmt
run: cargo fmt --all -- --check
test:
name: Test
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, macOS]
rust: [stable, beta, nightly]
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Install Rust
shell: bash
run: |
rustup update ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
- name: Test
run: |
cargo test --all
continue-on-error: ${{ matrix.rust == 'nightly' }}
- name: Link and run an executable (Linux)
run: |
cargo run --example prototype -- --deadbeef deadbeef.o
cargo run --example prototype -- --link test test.o deadbeef.o
./test
if: ${{ matrix.os == 'linux' }}
continue-on-error: ${{ matrix.rust == 'nightly' }}
- name: Link and run an executable (Mac)
run: |
cargo run --example prototype -- --mach --deadbeef deadbeef.o
cargo run --example prototype -- --mach --link test test.o deadbeef.o
./test
if: ${{ matrix.os == 'macOS' }}
continue-on-error: ${{ matrix.rust == 'nightly' }}