|
| 1 | +# Check that committed backward compatibility snapshots are up to date |
| 2 | +name: aws_tfhe_backward_compat_schema |
| 3 | + |
| 4 | +env: |
| 5 | + CARGO_TERM_COLOR: always |
| 6 | + ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
| 7 | + RUSTFLAGS: "-C target-cpu=native" |
| 8 | + RUST_BACKTRACE: "full" |
| 9 | + RUST_MIN_STACK: "8388608" |
| 10 | + SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }} |
| 11 | + SLACK_ICON: https://pbs.twimg.com/profile_images/1274014582265298945/OjBKP9kn_400x400.png |
| 12 | + SLACK_USERNAME: ${{ secrets.BOT_USERNAME }} |
| 13 | + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |
| 14 | + SLACKIFY_MARKDOWN: true |
| 15 | + PULL_REQUEST_MD_LINK: "" |
| 16 | + CHECKOUT_TOKEN: ${{ secrets.REPO_CHECKOUT_TOKEN || secrets.GITHUB_TOKEN }} |
| 17 | + |
| 18 | + |
| 19 | +on: |
| 20 | + # Allows you to run this workflow manually from the Actions tab as an alternative. |
| 21 | + workflow_dispatch: |
| 22 | + pull_request: |
| 23 | + |
| 24 | +permissions: |
| 25 | + contents: read |
| 26 | + |
| 27 | +# zizmor: ignore[concurrency-limits] only Zama organization members can trigger this workflow (via manual approval for PR from forks) |
| 28 | + |
| 29 | +jobs: |
| 30 | + backward-compat-schema: |
| 31 | + name: aws_tfhe_backward_compat_schema/backward-compat-schema (bpr) |
| 32 | + if: (github.event_name == 'push' && github.repository == 'zama-ai/tfhe-rs') || |
| 33 | + github.event_name != 'push' |
| 34 | + runs-on: "runs-on=${{ github.run_id }}/runner=cpu-small" |
| 35 | + concurrency: |
| 36 | + group: ${{ github.workflow_ref }}${{ github.ref == 'refs/heads/main' && github.sha || '' }} |
| 37 | + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} |
| 38 | + steps: |
| 39 | + - name: Checkout tfhe-rs |
| 40 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
| 41 | + with: |
| 42 | + persist-credentials: 'false' |
| 43 | + token: ${{ env.CHECKOUT_TOKEN }} |
| 44 | + |
| 45 | + - name: Install nightly toolchain |
| 46 | + uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # zizmor: ignore[stale-action-refs] this action doesn't create releases |
| 47 | + with: |
| 48 | + toolchain: nightly-2026-01-22 |
| 49 | + components: llvm-tools-preview, rustc-dev |
| 50 | + |
| 51 | + - name: Generate snapshots from current code |
| 52 | + run: | |
| 53 | + make backward-snapshot-head |
| 54 | +
|
| 55 | + - name: Check backward compatibility snapshots |
| 56 | + run: | |
| 57 | + make backward-snapshot-check |
| 58 | +
|
| 59 | + - name: Set pull-request URL |
| 60 | + if: ${{ failure() && github.event_name == 'pull_request' }} |
| 61 | + run: | |
| 62 | + echo "PULL_REQUEST_MD_LINK=[pull-request](${PR_BASE_URL}${PR_NUMBER}), " >> "${GITHUB_ENV}" |
| 63 | + env: |
| 64 | + PR_BASE_URL: ${{ vars.PR_BASE_URL }} |
| 65 | + PR_NUMBER: ${{ github.event.pull_request.number }} |
| 66 | + |
| 67 | + - name: Slack Notification |
| 68 | + if: ${{ failure() || (cancelled() && github.event_name != 'pull_request') }} |
| 69 | + continue-on-error: true |
| 70 | + uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 |
| 71 | + env: |
| 72 | + SLACK_COLOR: ${{ job.status }} |
| 73 | + SLACK_MESSAGE: "Backward compatibility schema check finished with status: ${{ job.status }}. Snapshots may be outdated — run `make backward-snapshot-base` and commit. (${{ env.PULL_REQUEST_MD_LINK }}[action run](${{ env.ACTION_RUN_URL }}))" |
0 commit comments