-
Notifications
You must be signed in to change notification settings - Fork 42
48 lines (46 loc) · 1.26 KB
/
test.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
name: test
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build spec without warnings
run: ./scripts/build.sh --install
cddl:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- name: Get cddl version
run: curl -s https://crates.io/api/v1/crates/cddl | python3 -c "import sys, json; print(json.load(sys.stdin)['crate']['max_stable_version'])" | tee cddl.txt
- name: "Cache rust binaries"
uses: actions/cache@v4
id: cache-cddl
env:
cache-name: cache-cddl
with:
path: |
~/.cargo/bin/
~/.cargo/git/db/
~/.cargo/registry/cache/
~/.cargo/registry/index/
./target/
key: cddl-${{ hashFiles('cddl.txt') }}
- uses: dtolnay/rust-toolchain@stable
- name: Validate CDDL files
run: ./scripts/test.sh
- name: Archive CDDL files
uses: actions/upload-artifact@v4
with:
name: cddl
path: "*.cddl"