• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Rust
2
3on: [push, pull_request]
4
5jobs:
6  build:
7    runs-on: ubuntu-latest
8    steps:
9      - uses: actions/checkout@v2
10      - name: Install latest stable
11        uses: actions-rs/toolchain@v1
12        with:
13            toolchain: stable
14            components: clippy
15      - name: check nostd
16        uses: actions-rs/cargo@v1
17        with:
18          command: check
19          args: --no-default-features
20      - name: test nostd
21        uses: actions-rs/cargo@v1
22        with:
23          command: test
24          args: --no-default-features
25      - name: check constrandom
26        uses: actions-rs/cargo@v1
27        with:
28          command: check
29          args: --no-default-features --features compile-time-rng
30      - name: test constrandom
31        uses: actions-rs/cargo@v1
32        with:
33          command: test
34          args: --no-default-features --features compile-time-rng
35      - name: check
36        uses: actions-rs/cargo@v1
37        with:
38          command: check
39      - name: test
40        uses: actions-rs/cargo@v1
41        with:
42          command: test
43  nightly:
44    name: nightly
45    runs-on: ubuntu-latest
46    env:
47        RUSTFLAGS: -C target-cpu=native
48    steps:
49      - uses: actions/checkout@v2
50      - name: Install latest nightly
51        uses: actions-rs/toolchain@v1
52        with:
53            toolchain: nightly
54            override: true
55            components: clippy
56      - name: check nightly
57        uses: actions-rs/cargo@v1
58        with:
59          command: check
60      - name: test nightly
61        uses: actions-rs/cargo@v1
62        with:
63          command: test
64      - name: check serde
65        uses: actions-rs/cargo@v1
66        with:
67          command: check
68          args: --features serde
69      - name: test serde
70        uses: actions-rs/cargo@v1
71        with:
72          command: test
73          args: --features serde
74  linux_arm7:
75    name: Linux ARMv7
76    runs-on: ubuntu-latest
77    steps:
78      - uses: actions/checkout@v2
79      - uses: actions-rs/toolchain@v1
80        with:
81          toolchain: stable
82          target: armv7-unknown-linux-gnueabihf
83      - uses: actions-rs/cargo@v1
84        with:
85          command: check
86          args: --target armv7-unknown-linux-gnueabihf
87  i686-unknown-linux-gnu:
88    name: Linux i686
89    runs-on: ubuntu-latest
90    steps:
91      - uses: actions/checkout@v2
92      - uses: actions-rs/toolchain@v1
93        with:
94          toolchain: stable
95          target: i686-unknown-linux-gnu
96      - name: Install cross compile tools
97        run: sudo apt-get install -y gcc-multilib libc6-i386 libc6-dev-i386
98      - uses: actions-rs/cargo@v1
99        with:
100          command: check
101          args: --target i686-unknown-linux-gnu
102      - uses: actions-rs/cargo@v1
103        with:
104          command: test
105          args: --target i686-unknown-linux-gnu
106  x86_64-unknown-linux-gnu:
107    name: Linux x86_64 - nightly
108    runs-on: ubuntu-latest
109    env:
110        RUSTFLAGS: -C target-cpu=skylake -C target-feature=+aes
111    steps:
112      - uses: actions/checkout@v2
113      - uses: actions-rs/toolchain@v1
114        with:
115          toolchain: nightly
116          override: true
117          target: x86_64-unknown-linux-gnu
118      - uses: actions-rs/cargo@v1
119        with:
120          command: check
121          args: --target x86_64-unknown-linux-gnu
122      - uses: actions-rs/cargo@v1
123        with:
124          command: test
125          args: --target x86_64-unknown-linux-gnu
126  thumbv6m:
127    name: thumbv6m
128    runs-on: ubuntu-latest
129    steps:
130      - uses: actions/checkout@v2
131      - uses: actions-rs/toolchain@v1
132        with:
133          toolchain: stable
134          target: thumbv6m-none-eabi
135      - uses: actions-rs/cargo@v1
136        with:
137          command: check
138          args: --target thumbv6m-none-eabi --no-default-features
139  wasm32-unknown-unknown:
140    name: wasm
141    runs-on: ubuntu-latest
142    steps:
143      - uses: actions/checkout@v2
144      - uses: actions-rs/toolchain@v1
145        with:
146          toolchain: stable
147          target: wasm32-unknown-unknown
148      - uses: actions-rs/cargo@v1
149        with:
150          command: check
151          args: --target wasm32-unknown-unknown
152