Skip to content

feat: Cl/ci3.3

feat: Cl/ci3.3 #591

Workflow file for this run

name: CI3
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
- labeled
concurrency:
# On master the group id is the unique run_id so we get parallel runs.
# On PR's the group id is the ref_name so only 1 can run at a time.
group: ci3-${{ github.ref_name == 'master' && github.run_id || github.ref_name }}
cancel-in-progress: true
jobs:
ci:
runs-on: ubuntu-latest
# Build for both architectures, but arm is only on master.
strategy:
matrix:
include:
- arch: amd64
- arch: arm64
master_only: true
if: >
(github.event.action != 'labeled' && github.event.pull_request.draft == false) ||
(github.event.action == 'labeled' && github.event.label.name == 'trigger-workflow')
steps:
- name: Checkout
if: matrix.master_only == false || github.ref == 'refs/heads/master'
uses: actions/checkout@v3
with:
# The commit to checkout. We want our actual commit, and not the result of merging the PR to the target.
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup
if: matrix.master_only == false || github.ref == 'refs/heads/master'
run: |
# Ensure we can SSH into the spot instances we request.
mkdir -p ~/.ssh
echo ${{ secrets.BUILD_INSTANCE_SSH_KEY }} | base64 --decode > ~/.ssh/build_instance_key
chmod 600 ~/.ssh/build_instance_key
- name: Run
if: matrix.master_only == false || github.ref == 'refs/heads/master'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ARCH: ${{ matrix.arch }}
LOG_ID: ${{ github.run_id }}
run: |
./ci.sh ec2
./ci3/cache_download barretenberg-bench-results-$(git rev-parse HEAD).tar.gz
- name: Store barretenberg benchmark result
if: github.ref == 'refs/heads/master'
continue-on-error: true
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
with:
name: C++ Benchmark
tool: "googlecpp"
output-file-path: ./bench-out/bench.json
github-token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
auto-push: true
alert-threshold: "105%"
comment-on-alert: true
fail-on-alert: false
alert-comment-cc-users: "@ludamad @codygunton"
max-items-in-chart: 50