| # Copyright 2025 The IREE Authors |
| # |
| # Licensed under the Apache License v2.0 with LLVM Exceptions. |
| # See https://llvm.org/LICENSE.txt for license information. |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| |
| name: CI - macOS arm64 clang |
| |
| on: |
| schedule: |
| # Weekday mornings at 09:15 UTC = 01:15 PST (UTC - 8). |
| - cron: "15 9 * * 1-5" |
| workflow_call: |
| workflow_dispatch: |
| |
| jobs: |
| macos_arm64_clang: |
| # Prevent scheduled runs in forks (only allow for iree-org or non-schedule triggers). |
| if: ${{ github.repository_owner == 'iree-org' || github.event_name != 'schedule' }} |
| runs-on: macos-14 |
| env: |
| BUILD_DIR: build-macos |
| defaults: |
| run: |
| shell: bash |
| steps: |
| - name: "Checking out repository" |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| - name: "Updating git submodules" |
| run: git submodule update --init --jobs 8 --depth 1 |
| # There may be multiple versions of Xcode and SDKs installed. |
| # Select the latest Xcode app to enable using Metal offline toolchain. |
| - name: "Update Xcode command line tools path" |
| run: | |
| sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer |
| xcrun metal --version |
| xcrun metallib --version |
| - name: "Setting up Python" |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| with: |
| python-version: "3.11" |
| cache: "pip" |
| - name: "Reclaim disk space" |
| # GitHub-hosted runners have 14GB of disk space -- reclaim some by removing SDKs |
| # we don't need. |
| run: | |
| echo "Free space before" |
| df -h |
| sudo rm -rf /Users/runner/Library/Android/sdk |
| echo "Free space after" |
| df -h |
| - name: "Installing Python packages" |
| run: pip install -r runtime/bindings/python/iree/runtime/build_requirements.txt |
| - name: "Installing requirements" |
| # We need coreutils for `realpath` used in scripts. |
| # We need bash because the default one on macOS is fairly old and lacks |
| # features we use in scripts. |
| run: brew install ninja ccache coreutils bash |
| - name: "Building IREE" |
| run: bash ./build_tools/cmake/build_all.sh "${BUILD_DIR}" |
| |
| - name: Post to Discord on Failure |
| uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0 |
| if: failure() && github.ref_name == 'main' && github.repository_owner == 'iree-org' |
| with: |
| webhook: ${{ secrets.DISCORD_WEBHOOK }} |
| description: "The ${{ github.workflow }} workflow failed" |
| url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" |