Add dockerignore to 3.4.x #1212
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test cedar-spec | |
on: | |
pull_request: | |
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 }} | |
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@v4 | |
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@v4 | |
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: Prepare Rust build | |
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 Lean libraries, and build & test cedar-drt/ | |
shell: bash | |
run: source ~/.profile && ./build.sh | |
run-integration-tests: | |
needs: get-branch-name | |
uses: ./.github/workflows/run_integration_tests_reusable.yml | |
with: | |
cedar_spec_ref: ${{ github.href }} | |
cedar_integration_tests_ref: ${{ needs.get-branch-name.outputs.branch_name }} |