-
-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (66 loc) · 1.78 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
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 0 1 * *'
name: CI
jobs:
build_and_test:
runs-on: ubuntu-20.04
strategy:
matrix:
rust: [stable, beta, nightly]
features: [
#"--features=lambda --no-default-features",
""]
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --allow-downgrades --no-install-recommends pkg-config libssl-dev
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
components: rustfmt
- uses: Swatinem/rust-cache@v1
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- name: Build and test
uses: actions-rs/cargo@v1
env:
RUST_BACKTRACE: 1
with:
command: test
args: ${{ matrix.features }} -- --nocapture
- name: Check HTTP response
if: ${{ matrix.features == '' }}
run: ./test.sh
bazel:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Mount bazel cache
uses: actions/cache@v1
with:
path: ~/.cache/bazel
key: ${{ runner.os }}-bazel-${{ hashFiles('bazel/crates.bzl') }}
restore-keys: |
${{ runner.os }}-bazel-
- name: Install Bazelisk
uses: tullyliu/[email protected]
with:
version: '1.7.5'
bazel-install-path: './.local/bin'
os: 'linux'
- name: Bazel build
run: bazel build //:dawn
- name: Bazel test
run: bazel test //:dawn_test