Skip to content

Commit 665525d

Browse files
committed
Use GHA for CI
1 parent b34ad5e commit 665525d

File tree

4 files changed

+161
-40
lines changed

4 files changed

+161
-40
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 = 7200

.github/workflows/ci.yml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
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+
FEATURES: ["", "--features=async-tokio", "--features=mio-evented"]
19+
TARGET:
20+
- aarch64-unknown-linux-gnu
21+
- arm-unknown-linux-gnueabi
22+
- armv7-unknown-linux-gnueabihf
23+
- i686-unknown-linux-gnu
24+
- i686-unknown-linux-musl
25+
- mips-unknown-linux-gnu
26+
- mips64-unknown-linux-gnuabi64
27+
- mips64el-unknown-linux-gnuabi64
28+
- mipsel-unknown-linux-gnu
29+
- powerpc-unknown-linux-gnu
30+
# - powerpc64-unknown-linux-gnu
31+
- powerpc64le-unknown-linux-gnu
32+
- s390x-unknown-linux-gnu
33+
- x86_64-unknown-linux-gnu
34+
- x86_64-unknown-linux-musl
35+
36+
include:
37+
# MSRV
38+
- rust: 1.46.0
39+
TARGET: x86_64-unknown-linux-gnu
40+
41+
# Test nightly but don't fail
42+
- rust: nightly
43+
TARGET: x86_64-unknown-linux-gnu
44+
experimental: true
45+
46+
steps:
47+
- uses: actions/checkout@v2
48+
- uses: actions-rs/toolchain@v1
49+
with:
50+
profile: minimal
51+
toolchain: ${{ matrix.rust }}
52+
target: ${{ matrix.TARGET }}
53+
override: true
54+
55+
- name: Build
56+
uses: actions-rs/cargo@v1
57+
with:
58+
command: build
59+
args: --target=${{ matrix.TARGET }} ${{ matrix.FEATURES }}
60+
61+
- name: Test
62+
uses: actions-rs/cargo@v1
63+
with:
64+
use-cross: true
65+
command: test
66+
args: --target=${{ matrix.TARGET }} ${{ matrix.FEATURES }}
67+
68+
ci-macos:
69+
name: CI-macOS
70+
runs-on: macos-11
71+
72+
strategy:
73+
matrix:
74+
rust: [stable, 1.46.0]
75+
TARGET: [x86_64-apple-darwin]
76+
77+
steps:
78+
- uses: actions/checkout@v2
79+
80+
- uses: actions-rs/toolchain@v1
81+
with:
82+
profile: minimal
83+
toolchain: ${{ matrix.rust }}
84+
target: ${{ matrix.TARGET }}
85+
override: true
86+
87+
- uses: actions-rs/cargo@v1
88+
with:
89+
command: build
90+
args: --target=${{ matrix.TARGET }}
91+
92+
checks:
93+
runs-on: ubuntu-latest
94+
95+
steps:
96+
- uses: actions/checkout@v2
97+
- uses: actions-rs/toolchain@v1
98+
with:
99+
profile: minimal
100+
toolchain: stable
101+
components: rustfmt
102+
103+
- name: Doc
104+
uses: actions-rs/cargo@v1
105+
with:
106+
command: doc
107+
108+
- name: Formatting
109+
uses: actions-rs/cargo@v1
110+
with:
111+
command: fmt
112+
args: --all -- --check
113+
114+
clippy:
115+
runs-on: ubuntu-latest
116+
env:
117+
RUSTFLAGS: '--allow warnings'
118+
steps:
119+
- uses: actions/checkout@v2
120+
- uses: actions-rs/toolchain@v1
121+
with:
122+
profile: minimal
123+
toolchain: 1.46.0
124+
components: clippy
125+
126+
- uses: actions-rs/clippy-check@v1
127+
with:
128+
token: ${{ secrets.GITHUB_TOKEN }}
129+

.travis.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)