-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.49 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
---
name: Cargo Build & Test
on: # yamllint disable-line rule:truthy
push:
branches: ["master"]
pull_request:
branches: ["master"]
env:
CARGO_TERM_COLOR: always
jobs:
build_and_test:
name: Rust project - latest
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain:
- stable
- beta
- nightly
target:
- x86_64-unknown-linux-gnu
#- aarch64-unknown-linux-gnu
#- x86_64-apple-darwin
#- armv7-unknown-linux-gnueabihf
#- arm-unknown-linux-gnueabihf
#- arm-unknown-linux-gnueabi
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install toolchain
run: |
rustup update ${{ matrix.toolchain }} && \
rustup default ${{ matrix.toolchain }} && \
rustup target add ${{ matrix.target }} --toolchain ${{ matrix.toolchain }}
- name: Install libnotify
run: |
sudo apt-get update
sudo apt-get install libnotify-dev
- name: Use cache
uses: Swatinem/rust-cache@v2
- name: Build with ${{ matrix.toolchain }} for ${{ matrix.toolchain }}
run: cargo build --verbose --target ${{ matrix.target }}
# there are no tests
#- name: Check with ${{ matrix.toolchain }}
# run: cargo check --verbose
#- name: Compile
# uses: rust-build/[email protected]
# with:
# RUSTTARGET: ${{ matrix.target }}