Skip to content

Improving our panic audit #510

Improving our panic audit

Improving our panic audit #510

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