-
Notifications
You must be signed in to change notification settings - Fork 79
110 lines (103 loc) · 3.29 KB
/
build_downstream_deps.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Build Downstream Dependencies
on:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
get-branch-name:
runs-on: ubuntu-latest
steps:
- name: Get branch name
shell: bash
# The workflow is triggered by pull_request so we use `GITHUB_BASE_REF`
run: echo "branch_name=${GITHUB_BASE_REF}" >> $GITHUB_OUTPUT
id: get_branch_name
outputs:
branch_name: ${{ steps.get_branch_name.outputs.branch_name }}
cedar-drt:
name: CedarDRT
runs-on: ubuntu-latest
needs: get-branch-name
strategy:
matrix:
toolchain:
- stable
steps:
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Checkout cedar-spec
uses: actions/checkout@v3
with:
repository: cedar-policy/cedar-spec
ref: ${{ needs.get-branch-name.outputs.branch_name }}
path: ./cedar-spec
- name: checkout cedar
uses: actions/checkout@v3
with:
path: cedar-spec/cedar
- name: build cedar-drt
working-directory: cedar-spec/cedar-drt
run: RUSTFLAGS="-D warnings" cargo build
- name: build cedar-drt/fuzz
working-directory: cedar-spec/cedar-drt/fuzz
run: RUSTFLAGS="--cfg=fuzzing -D warnings" cargo build
cedar-java:
name: CedarJava
runs-on: ubuntu-latest
needs: get-branch-name
strategy:
matrix:
toolchain:
- stable
steps:
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Checkout cedar-java
uses: actions/checkout@v3
with:
repository: cedar-policy/cedar-java
ref: ${{ needs.get-branch-name.outputs.branch_name }}
path: ./cedar-java
- name: checkout cedar
uses: actions/checkout@v3
with:
path: cedar-java/cedar
- name: configure cedar-java
working-directory: cedar-java/CedarJava
shell: bash
run: bash config.sh run_int_tests
- name: build cedar-java/CedarJavaFFI
working-directory: cedar-java/CedarJavaFFI
run: RUSTFLAGS="-D warnings" cargo build
- name: build cedar-java/CedarJava
working-directory: cedar-java/CedarJava
run: export MUST_RUN_CEDAR_INTEGRATION_TESTS=1 && ./gradlew build
cedar-examples:
name: CedarExamples
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
steps:
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Checkout cedar-examples
uses: actions/checkout@v3
with:
repository: cedar-policy/cedar-examples
ref: main
path: ./cedar-examples
- name: checkout cedar
uses: actions/checkout@v3
with:
path: cedar-examples/cedar
- name: build rust-hello-world
working-directory: cedar-examples/cedar-rust-hello-world
run: |
printf "\npath = \"../cedar/cedar-policy\"" >> Cargo.toml
cargo build
cargo test
- name: build tinytodo
working-directory: cedar-examples/tinytodo
run: |
printf "\npath = \"../cedar/cedar-policy\"" >> Cargo.toml
cargo build
cargo test