-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (46 loc) · 1.42 KB
/
rust.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
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["*"]
jobs:
stable:
name: Build and test on stable
strategy:
matrix:
os: [ "ubuntu-22.04" ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Install mongodb
run: |
sudo cp .github/workflows/mongodb-org-7.0.gpg /usr/share/keyrings/
sudo cp .github/workflows/mongodb-org-7.0.list /etc/apt/sources.list.d/
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends mongodb-org-server
- name: Install latest stable Rust toolchain
run: |
rustup install --profile minimal stable
rustup default stable
- name: Build (tokio)
uses: actions-rs/cargo@v1
with:
command: build
args: --release --color=always --all-targets
- name: Test (tokio)
uses: actions-rs/cargo@v1
with:
command: test
args: --release --color=always
- name: Build (async-std)
uses: actions-rs/cargo@v1
with:
command: build
args: --release --color=always --no-default-features --features async-std-runtime --all-targets
- name: Test (tokio)
uses: actions-rs/cargo@v1
with:
command: test
args: --release --color=always --no-default-features --features async-std-runtime