-
Notifications
You must be signed in to change notification settings - Fork 6
98 lines (89 loc) · 2.48 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: ci
on:
pull_request:
push:
branches:
- main
jobs:
test:
name: test
env:
# For some builds, we use cross to test on 32-bit and big-endian
# systems.
CARGO: cargo
# When CARGO is set to CROSS, this is set to `--target matrix.target`.
TARGET_FLAGS:
# When CARGO is set to CROSS, TARGET_DIR includes matrix.target.
TARGET_DIR: ./target
# Emit backtraces on panics.
RUST_BACKTRACE: 1
runs-on: ${{ matrix.os }}
strategy:
matrix:
build:
- stable
- macos
include:
- build: stable
os: ubuntu-18.04
rust: stable
- build: macos
os: macos-latest
rust: nightly
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install packages (Ubuntu)
if: matrix.os == 'ubuntu-18.04'
run: |
sudo bin/install-dependencies-debian.sh
- name: Install packages (macOS)
if: matrix.os == 'macos-latest'
run: |
bin/install-dependencies-macos.sh
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Show command used for Cargo
run: |
echo "cargo command is: ${{ env.CARGO }}"
echo "target flag is: ${{ env.TARGET_FLAGS }}"
- name: Build
run: ${{ env.CARGO }} build --verbose --all ${{ env.TARGET_FLAGS }}
- name: Run stateless Journey Tests
run: make stateless-journey-tests
- name: Run stateful journey tests (Ubuntu)
if: matrix.os == 'ubuntu-18.04'
run: make stateful-journey-tests
- name: Build documentation
if: matrix.os == 'ubuntu-18.04' && github.ref == 'refs/heads/master'
run: |
make lint-scripts
make docs
- name: Upload documentation to github pages
if: matrix.os == 'ubuntu-18.04'
uses: crazy-max/ghaction-github-pages@v1.4.0
with:
build_dir: doc/book
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
rustfmt-and-clippy:
name: rustfmt-and-clippy
runs-on: ubuntu-18.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt,clippy
- name: Check formatting + Clippy
run: |
cargo fmt --all -- --check
cargo clippy