Skip to content

Commit 2046b31

Browse files
committed
Update CI
1 parent f4314a7 commit 2046b31

File tree

1 file changed

+15
-147
lines changed

1 file changed

+15
-147
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
1-
on:
2-
push:
3-
pull_request:
4-
schedule:
5-
- cron: 0 0 * * 0
6-
71
name: Build
8-
9-
env:
10-
RUSTFLAGS: '--deny warnings'
2+
on: [push, pull_request]
113

124
jobs:
135
build:
14-
name: Build
15-
runs-on: ubuntu-latest
166
strategy:
177
matrix:
18-
rust: [stable, beta, nightly, 1.31.0]
19-
TARGET:
8+
rust: [stable, 1.62.0]
9+
target:
2010
- x86_64-unknown-linux-gnu
2111
- x86_64-unknown-linux-musl
2212
- arm-unknown-linux-gnueabi # Raspberry Pi 1
@@ -26,143 +16,21 @@ jobs:
2616
- thumbv7em-none-eabi
2717
- thumbv7em-none-eabihf
2818
- thumbv7m-none-eabi
29-
30-
include:
31-
# Test nightly but don't fail
32-
- rust: nightly
33-
experimental: true
34-
35-
steps:
36-
- uses: actions/checkout@v2
37-
- uses: actions-rs/toolchain@v1
38-
with:
39-
profile: minimal
40-
toolchain: ${{ matrix.rust }}
41-
target: ${{ matrix.TARGET }}
42-
override: true
43-
44-
- name: Checkout CI scripts
45-
uses: actions/checkout@v2
46-
with:
47-
repository: 'eldruin/rust-driver-ci-scripts'
48-
ref: 'master'
49-
path: 'ci'
50-
51-
- run: ./ci/patch-no-std.sh
52-
if: ${{ ! contains(matrix.TARGET, 'x86_64') }}
53-
54-
- name: Build
55-
uses: actions-rs/cargo@v1
56-
with:
57-
command: build
58-
args: --target=${{ matrix.TARGET }}
19+
uses: eldruin/rust-driver-ci-scripts/.github/workflows/build.yml@v1
20+
with:
21+
rust: ${{ matrix.rust }}
22+
target: ${{ matrix.target }}
5923

6024
checks:
61-
name: Checks
62-
runs-on: ubuntu-latest
63-
strategy:
64-
matrix:
65-
rust: [stable]
66-
TARGET:
67-
- x86_64-unknown-linux-gnu
68-
69-
steps:
70-
- uses: actions/checkout@v2
71-
- uses: actions-rs/toolchain@v1
72-
with:
73-
profile: minimal
74-
toolchain: ${{ matrix.rust }}
75-
target: ${{ matrix.TARGET }}
76-
override: true
77-
components: rustfmt
78-
79-
- name: Doc
80-
uses: actions-rs/cargo@v1
81-
with:
82-
command: doc
83-
84-
- name: Formatting
85-
uses: actions-rs/cargo@v1
86-
with:
87-
command: fmt
88-
args: --all -- --check
89-
90-
clippy:
91-
name: Clippy
92-
runs-on: ubuntu-latest
93-
strategy:
94-
matrix:
95-
rust: [1.31.0]
96-
TARGET:
97-
- x86_64-unknown-linux-gnu
98-
99-
steps:
100-
- uses: actions/checkout@v2
101-
- uses: actions-rs/toolchain@v1
102-
with:
103-
profile: minimal
104-
toolchain: ${{ matrix.rust }}
105-
target: ${{ matrix.TARGET }}
106-
override: true
107-
components: clippy
108-
109-
- name: Clippy
110-
uses: actions-rs/clippy-check@v1
111-
with:
112-
token: ${{ secrets.GITHUB_TOKEN }}
25+
uses: eldruin/rust-driver-ci-scripts/.github/workflows/check.yml@v1
26+
with:
27+
clippy-version: 1.85.1
11328

11429
test:
115-
name: Tests
116-
runs-on: ubuntu-latest
11730
strategy:
11831
matrix:
119-
rust: [stable, beta, nightly]
120-
TARGET: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl]
121-
include:
122-
- rust: nightly
123-
experimental: true
124-
steps:
125-
- uses: actions/checkout@v2
126-
- uses: actions-rs/toolchain@v1
127-
with:
128-
profile: minimal
129-
toolchain: ${{ matrix.rust }}
130-
target: ${{ matrix.TARGET }}
131-
override: true
132-
133-
- name: Test
134-
uses: actions-rs/cargo@v1
135-
with:
136-
command: test
137-
args: --target=${{ matrix.TARGET }}
138-
139-
- name: Build examples
140-
uses: actions-rs/cargo@v1
141-
if: contains(matrix.TARGET, 'x86_64')
142-
with:
143-
command: build
144-
args: --target=${{ matrix.TARGET }} --examples
145-
146-
coverage:
147-
name: Coverage
148-
runs-on: ubuntu-latest
149-
steps:
150-
- name: Checkout repository
151-
uses: actions/checkout@v2
152-
153-
- name: Install stable toolchain
154-
uses: actions-rs/toolchain@v1
155-
with:
156-
toolchain: stable
157-
override: true
158-
159-
- name: Run cargo-tarpaulin
160-
uses: actions-rs/tarpaulin@v0.1
161-
with:
162-
args: '--out Lcov -- --test-threads 1'
163-
164-
- name: upload to Coveralls
165-
uses: coverallsapp/github-action@master
166-
with:
167-
github-token: ${{ secrets.GITHUB_TOKEN }}
168-
path-to-lcov: './lcov.info'
32+
target: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl]
33+
uses: eldruin/rust-driver-ci-scripts/.github/workflows/test.yml@v1
34+
with:
35+
rust: stable
36+
target: ${{ matrix.target }}

0 commit comments

Comments
 (0)