refactor oopsla2024-benchmarks #438
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 & Test Examples | |
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 }} | |
java-hello-world: | |
needs: get-branch-name | |
uses: ./.github/workflows/build_java_hello_world_reusable.yml | |
with: | |
cedar_java_ref: refs/heads/${{ needs.get-branch-name.outputs.branch_name }} | |
cedar_examples_ref: ${{ github.href }} | |
run-example-use-cases: | |
needs: get-branch-name | |
uses: ./.github/workflows/run_example_use_cases_reusable.yml | |
with: | |
cedar_policy_ref: refs/heads/${{ needs.get-branch-name.outputs.branch_name }} | |
cedar_examples_ref: ${{ github.href }} | |
rust-hello-world: | |
needs: get-branch-name | |
uses: ./.github/workflows/build_rust_hello_world_reusable.yml | |
with: | |
cedar_policy_ref: refs/heads/${{ needs.get-branch-name.outputs.branch_name }} | |
cedar_examples_ref: ${{ github.href }} | |
wasm-example: | |
needs: get-branch-name | |
uses: ./.github/workflows/build_wasm_example_reusable.yml | |
with: | |
cedar_policy_ref: refs/heads/${{ needs.get-branch-name.outputs.branch_name }} | |
cedar_examples_ref: ${{ github.href }} | |
tinytodo: | |
needs: get-branch-name | |
uses: ./.github/workflows/build_tiny_todo_reusable.yml | |
with: | |
cedar_policy_ref: refs/heads/${{ needs.get-branch-name.outputs.branch_name }} | |
cedar_examples_ref: ${{ github.href }} | |
tinytodo-go: | |
uses: ./.github/workflows/build_tiny_todo_go_reusable.yml | |
with: | |
cedar_examples_ref: ${{ github.href }} | |
build_and_run_oopsla_benchmarks: | |
name: OOPSLA2024 benchmarks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout cedar-examples | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
push: false | |
context: oopsla2024-benchmarks | |
file: oopsla2024-benchmarks/Dockerfile | |
tags: cedar-benchmarks:latest | |
load: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Run benchmarks inside Docker container | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: cedar-benchmarks:latest | |
# run a small run, that completes fast, but will still make sure things work properly | |
run: cargo run --release -- bench --app gdrive,github,tiny-todo,gdrive-templates,github-templates --engine cedar,open-fga,rego,cedar-opt --num-hierarchies 3 --num-requests 3 --num-entities 1,2,3 |