blob: f3022346fbb0e22d8182d9990f28f285b8d50fb7 [file] [log] [blame]
Scott Todd7463cb42024-07-22 16:05:15 -07001# 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 Toddf99df292024-07-24 11:28:22 -07007name: CI - macOS x64 clang
Scott Todd7463cb42024-07-22 16:05:15 -07008
9on:
10 schedule:
11 # Weekday mornings at 09:15 UTC = 01:15 PST (UTC - 8).
12 - cron: "15 9 * * 1-5"
13 workflow_dispatch:
14
15concurrency:
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
23jobs:
Scott Toddf99df292024-07-24 11:28:22 -070024 macos_x64_clang:
Scott Todd7463cb42024-07-22 16:05:15 -070025 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 Brehlerb78def22024-09-06 18:53:11 +020033 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Scott Todd7463cb42024-07-22 16:05:15 -070034 - 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 Brehlerb78def22024-09-06 18:53:11 +020044 uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.1.0
Scott Todd7463cb42024-07-22 16:05:15 -070045 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}"