Skip to content

Commit 3be1b31

Browse files
committed
Use GHA instead of Travis for CI
1 parent c14abb8 commit 3be1b31

File tree

4 files changed

+92
-11
lines changed

4 files changed

+92
-11
lines changed

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
on:
2+
push:
3+
branches: [ staging, trying, master ]
4+
pull_request:
5+
6+
name: Continuous integration
7+
8+
jobs:
9+
ci-linux:
10+
runs-on: ubuntu-latest
11+
continue-on-error: ${{ matrix.experimental || false }}
12+
strategy:
13+
matrix:
14+
# All published crates must build on stable.
15+
rust: [stable, beta, 1.31.0]
16+
17+
# The default target we're compiling on and for.
18+
TARGET: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl]
19+
20+
include:
21+
# Test nightly but don't fail the build.
22+
- rust: nightly
23+
experimental: true
24+
TARGET: x86_64-unknown-linux-gnu
25+
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: actions-rs/toolchain@v1
29+
with:
30+
profile: minimal
31+
toolchain: ${{ matrix.rust }}
32+
target: ${{ matrix.TARGET }}
33+
override: true
34+
- uses: actions-rs/cargo@v1
35+
with:
36+
command: check
37+
args: --target=${{ matrix.TARGET }}
38+
- uses: actions-rs/cargo@v1
39+
with:
40+
command: build
41+
args: --target=${{ matrix.TARGET }}
42+
- uses: actions-rs/cargo@v1
43+
with:
44+
command: test
45+
args: --target=${{ matrix.TARGET }}
46+
- uses: actions-rs/cargo@v1
47+
with:
48+
command: build
49+
args: --target=${{ matrix.TARGET }} --examples

.github/workflows/clippy.yml

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

.github/workflows/rustfmt.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
on:
2+
push:
3+
branches: [ staging, trying, master ]
4+
pull_request:
5+
6+
name: Code formatting check
7+
8+
jobs:
9+
fmt:
10+
name: Rustfmt
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions-rs/toolchain@v1
15+
with:
16+
profile: minimal
17+
toolchain: stable
18+
override: true
19+
components: rustfmt
20+
- uses: actions-rs/cargo@v1
21+
with:
22+
command: fmt
23+
args: --all -- --check

.travis.yml

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

0 commit comments

Comments
 (0)