Skip to content

Commit 639eb0d

Browse files
committed
Use GitHub actions for CI
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
1 parent 3f0e249 commit 639eb0d

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
on: [push, pull_request]
2+
3+
name: Continuous integration
4+
5+
jobs:
6+
ci-linux:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
# All generated code should be running on stable now
11+
rust: [stable]
12+
13+
# All vendor files we want to test on stable
14+
VENDOR: [rustfmt, Atmel, Atmel, Freescale, Fujitsu, Holtek, Nordic, Nuvoton, NXP, RISC-V, SiliconLabs, Spansion, STMicro, Toshiba, Nordic]
15+
16+
# The default target we're compiling on and for
17+
TARGET: [x86_64-unknown-linux-gnu]
18+
19+
# Temporary hack as long as we use the current CI script
20+
TRAVIS_OS_NAME: [linux]
21+
22+
include:
23+
# Test MSRV
24+
- rust: 1.37.0
25+
VENDOR: Nordic
26+
TARGET: x86_64-unknown-linux-gnu
27+
TRAVIS_OS_NAME: linux
28+
29+
# Use nightly for architectures which don't support stable
30+
- rust: nightly
31+
experimental: true
32+
VENDOR: OTHER
33+
TARGET: x86_64-unknown-linux-gnu
34+
TRAVIS_OS_NAME: linux
35+
36+
# OSX
37+
- rust: stable
38+
TARGET: x86_64-apple-darwin
39+
TRAVIS_OS_NAME: osx
40+
41+
# Windows
42+
- rust: stable
43+
TARGET: x86_64-pc-windows-msvc
44+
TRAVIS_OS_NAME: windows
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+
components: rustfmt
55+
- name: Run CI script for ${{ matrix.VENDOR }} under ${{ matrix.rust }}
56+
run: TARGET=${{ matrix.TARGET }} VENDOR=${{ matrix.VENDOR }} TRAVIS_OS_NAME=${{ matrix.TRAVIS_OS_NAME }} bash ci/script.sh

.github/workflows/clippy.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on: [push, pull_request]
2+
3+
name: Clippy check
4+
jobs:
5+
clippy_check:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
- uses: actions-rs/toolchain@v1
10+
with:
11+
profile: minimal
12+
toolchain: stable
13+
override: true
14+
components: clippy
15+
- uses: actions-rs/clippy-check@v1
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)