-
Notifications
You must be signed in to change notification settings - Fork 14
89 lines (82 loc) · 2.28 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
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
name: CI
env:
CARGO_TERM_COLOR: always
FLATBUFFER_VERSION: 23.5.26
on:
push:
branches: ["main"]
pull_request:
schedule:
- cron: "32 4 * * 5"
workflow_dispatch:
jobs:
test-msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: "1.70"
profile: minimal
override: true
- name: Run check
uses: actions-rs/cargo@v1
with:
command: check
args: --all-targets -p planus -p planus-example
test-no_std:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Run check
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features --all-targets -p planus -p planus-example
test:
strategy:
matrix:
# os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
rust: [stable, beta]
# exclude:
# - os: macos-latest
# rust: beta
# - os: windows-latest
# rust: beta
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install --no-install-recommends graphviz
- uses: actions/checkout@v4.2.1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Flatbuffers binary cache
id: flatbuffers-cache
uses: actions/cache@v4
with:
path: ~/flatc
key: flatbuffers-${{ runner.os }}-${{ env.FLATBUFFER_VERSION }}
- name: Install flatbuffers
if: steps.flatbuffers-cache.outputs.cache-hit != 'true'
run: .github/workflows/build_flatbuffers.sh
- name: Copy flatbuffers binary to /usr/bin
run: sudo cp ~/flatc /usr/local/bin/
- uses: actions-rs/cargo@v1
with:
command: install
args: cargo-make
- uses: actions-rs/cargo@v1
with:
command: make
args: full-test