Skip to content

Commit 68b7a8c

Browse files
committed
Add CI
1 parent 4459bc4 commit 68b7a8c

File tree

3 files changed

+189
-0
lines changed

3 files changed

+189
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* rust-embedded/embedded-linux

.github/bors.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
block_labels = ["needs-decision"]
2+
delete_merged_branches = true
3+
required_approvals = 1
4+
status = [
5+
"CI (stable, aarch64-unknown-linux-gnu)",
6+
"CI (stable, arm-unknown-linux-gnueabi)",
7+
"CI (stable, armv7-unknown-linux-gnueabihf)",
8+
"CI (stable, i686-unknown-linux-gnu)",
9+
"CI (stable, i686-unknown-linux-musl)",
10+
"CI (stable, mips-unknown-linux-gnu)",
11+
"CI (stable, mips64-unknown-linux-gnuabi64)",
12+
"CI (stable, mips64el-unknown-linux-gnuabi64)",
13+
"CI (stable, mipsel-unknown-linux-gnu)",
14+
"CI (stable, powerpc-unknown-linux-gnu)",
15+
"CI (stable, powerpc64le-unknown-linux-gnu)",
16+
"CI (stable, s390x-unknown-linux-gnu)",
17+
"CI (stable, x86_64-unknown-linux-gnu)",
18+
"CI (stable, x86_64-unknown-linux-musl)",
19+
"CI (stable, x86_64-apple-darwin)",
20+
21+
"CI (stable, --features=async-tokio, x86_64-unknown-linux-gnu)",
22+
"CI (stable, --features=mio-evented, x86_64-unknown-linux-gnu)",
23+
24+
"CI (1.46.0, --features=async-tokio, x86_64-unknown-linux-gnu)",
25+
"CI (1.46.0, --features=mio-evented, x86_64-unknown-linux-gnu)",
26+
"CI (1.46.0, x86_64-unknown-linux-gnu)",
27+
"CI (1.46.0, x86_64-apple-darwin)",
28+
29+
"checks"
30+
]
31+
timeout_sec = 3600

.github/workflows/ci.yml

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
on:
2+
push:
3+
branches: [ staging, trying, master ]
4+
pull_request:
5+
6+
name: CI
7+
8+
env:
9+
RUSTFLAGS: '--deny warnings'
10+
11+
jobs:
12+
ci-linux:
13+
name: CI
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
rust: [stable]
18+
TARGET:
19+
- aarch64-unknown-linux-gnu
20+
- arm-unknown-linux-gnueabi
21+
- armv7-unknown-linux-gnueabihf
22+
- i686-unknown-linux-gnu
23+
- i686-unknown-linux-musl
24+
- mips-unknown-linux-gnu
25+
- mips64-unknown-linux-gnuabi64
26+
- mips64el-unknown-linux-gnuabi64
27+
- mipsel-unknown-linux-gnu
28+
- powerpc-unknown-linux-gnu
29+
# - powerpc64-unknown-linux-gnu
30+
- powerpc64le-unknown-linux-gnu
31+
- s390x-unknown-linux-gnu
32+
- x86_64-unknown-linux-gnu
33+
- x86_64-unknown-linux-musl
34+
35+
include:
36+
- rust: 1.28.0
37+
TARGET: x86_64-unknown-linux-gnu
38+
39+
# Test nightly but don't fail
40+
- rust: nightly
41+
TARGET: x86_64-unknown-linux-gnu
42+
experimental: true
43+
44+
steps:
45+
- uses: actions/checkout@v2
46+
- uses: actions-rs/toolchain@v1
47+
with:
48+
profile: minimal
49+
toolchain: ${{ matrix.rust }}
50+
target: ${{ matrix.TARGET }}
51+
override: true
52+
53+
- name: Build
54+
uses: actions-rs/cargo@v1
55+
with:
56+
command: build
57+
args: --target=${{ matrix.TARGET }}
58+
59+
- name: Test
60+
uses: actions-rs/cargo@v1
61+
with:
62+
use-cross: true
63+
command: test
64+
args: --target=${{ matrix.TARGET }}
65+
66+
ci-linux-msrv:
67+
name: CI
68+
runs-on: ubuntu-latest
69+
strategy:
70+
matrix:
71+
rust: [1.28.0]
72+
TARGET:
73+
- x86_64-unknown-linux-gnu
74+
75+
steps:
76+
- uses: actions/checkout@v2
77+
- uses: actions-rs/toolchain@v1
78+
with:
79+
profile: minimal
80+
toolchain: ${{ matrix.rust }}
81+
target: ${{ matrix.TARGET }}
82+
override: true
83+
84+
- name: Build
85+
uses: actions-rs/cargo@v1
86+
with:
87+
command: build
88+
args: --target=${{ matrix.TARGET }}
89+
90+
- name: Test
91+
uses: actions-rs/cargo@v1
92+
with:
93+
use-cross: true
94+
command: test
95+
args: --target=${{ matrix.TARGET }}
96+
97+
ci-macos:
98+
name: CI
99+
runs-on: macos-11
100+
101+
strategy:
102+
matrix:
103+
rust: [stable, 1.28.0]
104+
TARGET: [x86_64-apple-darwin]
105+
106+
steps:
107+
- uses: actions/checkout@v2
108+
109+
- uses: actions-rs/toolchain@v1
110+
with:
111+
profile: minimal
112+
toolchain: ${{ matrix.rust }}
113+
target: ${{ matrix.TARGET }}
114+
override: true
115+
116+
- uses: actions-rs/cargo@v1
117+
with:
118+
command: build
119+
args: --target=${{ matrix.TARGET }}
120+
121+
checks:
122+
runs-on: ubuntu-latest
123+
124+
steps:
125+
- uses: actions/checkout@v2
126+
- uses: actions-rs/toolchain@v1
127+
with:
128+
profile: minimal
129+
toolchain: stable
130+
components: rustfmt
131+
132+
- name: Doc
133+
uses: actions-rs/cargo@v1
134+
with:
135+
command: doc
136+
137+
- name: Formatting
138+
uses: actions-rs/cargo@v1
139+
with:
140+
command: fmt
141+
args: --all -- --check
142+
143+
clippy:
144+
runs-on: ubuntu-latest
145+
env:
146+
RUSTFLAGS: '--allow warnings'
147+
steps:
148+
- uses: actions/checkout@v2
149+
- uses: actions-rs/toolchain@v1
150+
with:
151+
profile: minimal
152+
toolchain: 1.62.0
153+
components: clippy
154+
155+
- uses: actions-rs/clippy-check@v1
156+
with:
157+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)