Skip to content

Commit e02570b

Browse files
committed
Add GitHub actions for CI
1 parent 08043cc commit e02570b

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Continuous integration
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
jobs:
15+
build:
16+
runs-on: ${{ matrix.runner_os }}
17+
strategy:
18+
matrix:
19+
target:
20+
- x86_64-unknown-linux-gnu
21+
- x86_64-apple-darwin
22+
- x86_64-pc-windows-msvc
23+
include:
24+
- target: x86_64-unknown-linux-gnu
25+
runner_os: ubuntu-latest
26+
- target: x86_64-apple-darwin
27+
runner_os: macos-latest
28+
- target: x86_64-pc-windows-msvc
29+
runner_os: windows-latest
30+
31+
steps:
32+
- name: Checkout code
33+
uses: actions/checkout@v2
34+
35+
- name: Install Rust toolchain
36+
uses: actions-rs/toolchain@v1
37+
with:
38+
profile: minimal
39+
40+
- name: Generate Cargo.lock
41+
uses: actions-rs/cargo@v1
42+
with:
43+
command: generate-lockfile
44+
45+
- name: Build tests with all features enabled
46+
uses: actions-rs/cargo@v1
47+
with:
48+
command: test
49+
args: --workspace --locked --all-features --no-run
50+
51+
- name: Run tests with all features enabled
52+
uses: actions-rs/cargo@v1
53+
with:
54+
command: test
55+
args: --workspace --locked --all-features -- --nocapture --quiet
56+
57+
- name: Build workspace documentation with all features enabled
58+
uses: actions-rs/cargo@v1
59+
with:
60+
command: doc
61+
args: --workspace --locked --all-features
62+
63+
- name: Build release with default features
64+
uses: actions-rs/cargo@v1
65+
with:
66+
command: build
67+
args: --locked --profile release

0 commit comments

Comments
 (0)