Make LeanDefinitionalEngine thread safe (#227) #882
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 | |
- 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: | |
needs: get-branch-name | |
uses: ./.github/workflows/build_and_test_drt_reusable.yml | |
with: | |
cedar_spec_ref: ${{ github.ref }} | |
cedar_policy_ref: ${{ needs.get-branch-name.outputs.branch_name }} | |
test_docker_build: | |
name: Test Docker build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
push: false | |
tags: cedar-drt:latest |