-
Notifications
You must be signed in to change notification settings - Fork 26
91 lines (72 loc) · 2.37 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
name: Rust
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
jobs:
ubuntu:
runs-on: ubuntu-latest
name: ubuntu
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Cache Cargo Dependencies
uses: Swatinem/[email protected]
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
macos:
runs-on: macos-latest
name: mac os
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Cache Cargo Dependencies
uses: Swatinem/[email protected]
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
verify-msrv:
runs-on: ubuntu-latest
name: verify minimum supported rust version (ubuntu)
timeout-minutes: 30
# we are using the `cargo-msrv` app
# https://github.com/foresterre/cargo-msrv
steps:
- uses: actions/checkout@v2
- name: Install or use cached foresterre/cargo-msrv
uses: baptiste0928/cargo-install@v1
with:
crate: cargo-msrv
- name: Verify the Rustc version declared in `cargo.toml`
run: |
cargo-msrv verify
# github actions does not support big endian systems directly, but it does support QEMU.
# so we install qemu, cross-compile to sparc64, and then run the tests in an emulated sparc64.
# see https://github.com/wasm3/wasm3/blob/main/.github/workflows/tests.yml#L318
mips:
runs-on: ubuntu-20.04
name: emulated big endian mips system
timeout-minutes: 90 # todo just make tests faster wtf
# we are using the cross project for cross compilation to mips:
# https://github.com/cross-rs/cross
steps:
- uses: actions/checkout@v2
- name: Install or use cached cross-rs/cross
uses: baptiste0928/cargo-install@v1
with:
crate: cross
- name: Cache Cargo Dependencies
uses: Swatinem/[email protected]
- name: Start Docker
run: sudo systemctl start docker
- name: Cross-Compile project to mips-unknown-linux-gnu
run: |
cross build --target=mips-unknown-linux-gnu --verbose
# https://github.com/cross-rs/cross#supported-targets
- name: Cross-Run Tests in mips-unknown-linux-gnu using Qemu
run: |
cross test --target mips-unknown-linux-gnu --verbose