Scott Todd | 7463cb4 | 2024-07-22 16:05:15 -0700 | [diff] [blame] | 1 | # Copyright 2024 The IREE Authors |
| 2 | # |
| 3 | # Licensed under the Apache License v2.0 with LLVM Exceptions. |
| 4 | # See https://llvm.org/LICENSE.txt for license information. |
| 5 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | |
Scott Todd | f99df29 | 2024-07-24 11:28:22 -0700 | [diff] [blame] | 7 | name: CI - macOS x64 clang |
Scott Todd | 7463cb4 | 2024-07-22 16:05:15 -0700 | [diff] [blame] | 8 | |
| 9 | on: |
| 10 | schedule: |
| 11 | # Weekday mornings at 09:15 UTC = 01:15 PST (UTC - 8). |
| 12 | - cron: "15 9 * * 1-5" |
| 13 | workflow_dispatch: |
| 14 | |
| 15 | concurrency: |
| 16 | # A PR number if a pull request and otherwise the commit hash. This cancels |
| 17 | # queued and in-progress runs for the same PR (presubmit) or commit |
| 18 | # (postsubmit). The workflow name is prepended to avoid conflicts between |
| 19 | # different workflows. |
| 20 | group: ${{ github.workflow }}-${{ github.event.number || github.sha }} |
| 21 | cancel-in-progress: true |
| 22 | |
| 23 | jobs: |
Scott Todd | f99df29 | 2024-07-24 11:28:22 -0700 | [diff] [blame] | 24 | macos_x64_clang: |
Scott Todd | 7463cb4 | 2024-07-22 16:05:15 -0700 | [diff] [blame] | 25 | runs-on: macos-13 |
| 26 | env: |
| 27 | BUILD_DIR: build-macos |
| 28 | defaults: |
| 29 | run: |
| 30 | shell: bash |
| 31 | steps: |
| 32 | - name: "Checking out repository" |
Marius Brehler | b78def2 | 2024-09-06 18:53:11 +0200 | [diff] [blame] | 33 | uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 |
Scott Todd | 7463cb4 | 2024-07-22 16:05:15 -0700 | [diff] [blame] | 34 | - name: "Updating git submodules" |
| 35 | run: git submodule update --init --jobs 8 --depth 1 |
| 36 | # There may be multiple versions of Xcode and SDKs installed. |
| 37 | # Select the latest Xcode app to enable using Metal offline toolchain. |
| 38 | - name: "Update Xcode command line tools path" |
| 39 | run: | |
| 40 | sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer |
| 41 | xcrun metal --version |
| 42 | xcrun metallib --version |
| 43 | - name: "Setting up Python" |
Marius Brehler | b78def2 | 2024-09-06 18:53:11 +0200 | [diff] [blame] | 44 | uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.1.0 |
Scott Todd | 7463cb4 | 2024-07-22 16:05:15 -0700 | [diff] [blame] | 45 | with: |
| 46 | python-version: "3.10" |
| 47 | cache: "pip" |
| 48 | - name: "Installing Python packages" |
| 49 | run: pip install -r runtime/bindings/python/iree/runtime/build_requirements.txt |
| 50 | - name: "Installing requirements" |
| 51 | # We need coreutils for `realpath` used in scripts. |
| 52 | # We need bash because the default one on macOS is fairly old and lacks |
| 53 | # features we use in scripts. |
| 54 | run: brew install ninja ccache coreutils bash |
| 55 | - name: "Building IREE" |
| 56 | run: bash ./build_tools/cmake/build_all.sh "${BUILD_DIR}" |
| 57 | - name: "Testing IREE" |
| 58 | run: bash ./build_tools/cmake/ctest_all.sh "${BUILD_DIR}" |