Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/TESTS_ARE_FAILING_ON_ARM64.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Tests are failing on ARM64"
assignees: TomAFrench, asterite
---

The Rust tests for the Noir compiler are currently failing on ARM64.

Check the [Test (ARM64)]({{env.WORKFLOW_URL}}) workflow for details.

This issue was raised by the workflow `{{env.WORKFLOW_NAME}}`
118 changes: 118 additions & 0 deletions .github/workflows/test-rust-workspace-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Test (ARM64)

# This workflow runs the project Rust tests on a daily basis on ARM64.
# The main intention of doing this is making sure that build artifacts end up exactly
# the same as in X86, but this workflow runs all tests to also make sure everything
# works the same way on ARM64. Because of this, most of the code here is similar
# to that in test-rust-workspace.yml

on:
schedule:
# Run a check at 9 AM UTC
- cron: "0 9 * * *"

jobs:
build-test-artifacts:
name: Build test artifacts
runs-on: macos-latest
timeout-minutes: 30

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.85.0
with:
targets: aarch64-apple-darwin

- uses: Swatinem/rust-cache@v2
with:
key: aarch64-apple-darwin
cache-on-failure: true
save-if: ${{ github.event_name != 'merge_group' }}

- name: Install nextest
uses: taiki-e/install-action@v2
with:
tool: nextest@0.9.67

- name: Build and archive tests
run: cargo nextest archive --workspace --features noirc_frontend/nextest --archive-file nextest-archive-arm64.tar.zst

- name: Upload archive to workflow
uses: actions/upload-artifact@v4
with:
name: nextest-archive-arm64
path: nextest-archive-arm64.tar.zst

run-tests:
name: "Run tests (partition ${{matrix.partition}})"
runs-on: macos-latest
needs: [build-test-artifacts]
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
partition: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.85.0
with:
targets: aarch64-apple-darwin

- name: Install nextest
uses: taiki-e/install-action@v2
with:
tool: nextest@0.9.67

- name: Download archive
uses: actions/download-artifact@v4
with:
name: nextest-archive-arm64
- name: Run tests
run: |
RUST_MIN_STACK=8388608 \
cargo nextest run --archive-file nextest-archive-arm64.tar.zst \
--partition count:${{ matrix.partition }}/4 \
--no-fail-fast

# This is a job which depends on all test jobs and reports the overall status.
# This allows us to add/remove test jobs without having to update the required workflows.
tests-end:
name: Rust End
runs-on: macos-latest
# We want this job to always run (even if the dependant jobs fail) as we want this job to fail rather than skipping.
if: ${{ always() }}
needs:
- run-tests

steps:
- name: Report overall success
run: |
if [[ $FAIL == true ]]; then
exit 1
else
exit 0
fi
env:
# We treat any cancelled, skipped or failing jobs as a failure for the workflow as a whole.
FAIL: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}

- name: Checkout
if: ${{ failure() }}
uses: actions/checkout@v4

# Raise an issue if the tests failed
- name: Alert on failed publish
uses: JasonEtco/create-an-issue@v2
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WORKFLOW_NAME: ${{ github.workflow }}
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
update_existing: true
filename: .github/TESTS_ARE_FAILING_ON_ARM64.md
Loading