Cairo Update Check #59
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: Cairo Update Check | |
on: | |
workflow_dispatch: | |
inputs: | |
no_slack: | |
description: "Skip sending Slack notification on failure" | |
type: boolean | |
default: false | |
schedule: | |
- cron: '0 0 * * *' | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: software-mansion/setup-scarb@v1 | |
with: | |
scarb-version: nightly | |
cache: false | |
- name: Build xtasks | |
run: cargo build -p xtask | |
- name: Upgrade Cairo to latest main commit | |
run: | | |
CAIRO_REV=$(git ls-remote --refs "https://github.com/starkware-libs/cairo" main | awk '{print $1}') | |
echo "::notice::Checking Cairo commit: https://github.com/starkware-libs/cairo/commit/$CAIRO_REV" | |
cargo xtask upgrade cairo --rev "$CAIRO_REV" | |
- run: cargo test --profile=ci --no-fail-fast | |
notify_failed: | |
runs-on: ubuntu-latest | |
if: always() && !(inputs.no_slack) && needs.check.result == 'failure' | |
needs: check | |
steps: | |
- name: Notify the team about workflow failure | |
uses: slackapi/[email protected] | |
with: | |
webhook: ${{ secrets.SLACK_CAIRO_UPDATE_CHECK_FAILURE_WEBHOOK_URL }} | |
webhook-type: webhook-trigger | |
payload: | | |
url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" |