| # Copyright 2024 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 x64 clang |
| |
| on: |
| schedule: |
| # Weekday mornings at 09:15 UTC = 01:15 PST (UTC - 8). |
| - cron: "15 9 * * 1-5" |
| workflow_dispatch: |
| |
| concurrency: |
| # A PR number if a pull request and otherwise the commit hash. This cancels |
| # queued and in-progress runs for the same PR (presubmit) or commit |
| # (postsubmit). The workflow name is prepended to avoid conflicts between |
| # different workflows. |
| group: ${{ github.workflow }}-${{ github.event.number || github.sha }} |
| cancel-in-progress: true |
| |
| jobs: |
| macos_x64_clang: |
| if: ${{ github.repository_owner == 'iree-org' || github.event_name != 'schedule' }} |
| runs-on: macos-13 |
| env: |
| BUILD_DIR: build-macos |
| defaults: |
| run: |
| shell: bash |
| steps: |
| - name: "Checking out repository" |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| - 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@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 |
| with: |
| python-version: "3.11" |
| cache: "pip" |
| - 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: "Testing IREE" |
| run: bash ./build_tools/cmake/ctest_all.sh "${BUILD_DIR}" |
| |
| - name: Post to Discord on Failure |
| uses: sarisia/actions-status-discord@11a0bfe3b50977e38aa2bd4a4ebd296415e83c19 # v1.15.4 |
| 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 }}" |