-
Notifications
You must be signed in to change notification settings - Fork 19
69 lines (66 loc) · 2.08 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
name: Build cedar-spec
on:
pull_request:
jobs:
build_and_test_lean:
name: Build and Test Lean
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
steps:
- name: Checkout cedar-spec
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Lean
shell: bash
run: |
wget https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh
bash elan-init.sh -y
- name: Build
working-directory: ./cedar-lean
shell: bash
run: source ~/.profile && lake build Cedar
- name: Test
working-directory: ./cedar-lean
shell: bash
run: source ~/.profile && lake exe CedarUnitTests
build_and_test_drt:
name: Build and Test DRT
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
steps:
- name: Checkout cedar-spec
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Lean
shell: bash
run: |
wget https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh
bash elan-init.sh -y
- name: rustup
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: cargo fmt (cedar-policy-generators)
working-directory: ./cedar-policy-generators
run: cargo fmt --all --check
- name: cargo fmt (cedar-drt)
working-directory: ./cedar-drt
run: cargo fmt --all --check
- name: cargo fmt (cedar-drt/fuzz/)
working-directory: ./cedar-drt/fuzz
run: cargo fmt --all --check
- name: cargo rustc (cedar-policy-generators)
working-directory: ./cedar-policy-generators
run: RUSTFLAGS="-D warnings -F unsafe-code" cargo build --verbose
- name: cargo test (cedar-policy-generators)
working-directory: ./cedar-policy-generators
run: cargo test --verbose
- name: build.sh
shell: bash
run: source ~/.profile && ./build.sh