-
Notifications
You must be signed in to change notification settings - Fork 744
58 lines (55 loc) · 1.77 KB
/
sycl-macos-build-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Reusable SYCL macOS build and test workflow
on:
workflow_call:
inputs:
build_ref:
type: string
required: false
build_cache_suffix:
type: string
required: false
default: "default"
build_cache_size:
type: string
required: false
default: 2G
build_configure_extra_args:
type: string
required: false
default: ""
permissions: read-all
jobs:
build:
name: Build
runs-on: macos-12
env:
CCACHE_DIR: $GITHUB_WORKSPACE/build_cache_${{ inputs.build_cache_suffix }}
CCACHE_MAXSIZE: ${{ inputs.build_cache_size }}
steps:
- name: Install dependencies
run: brew install ccache ninja hwloc
- uses: actions/checkout@v4
with:
ref: ${{ inputs.build_ref }}
path: src
- uses: actions/cache@v4
with:
path: build_cache_${{ inputs.build_cache_suffix }}
key: sycl-${{ runner.os }}-${{ inputs.build_cache_suffix }}-${{ github.sha }}
restore-keys: sycl-${{ runner.os }}-${{ inputs.build_cache_suffix }}-
- name: Configure
env:
ARGS: ${{ inputs.build_configure_extra_args }}
run: |
mkdir -p $CCACHE_DIR
mkdir -p $GITHUB_WORKSPACE/build
cd $GITHUB_WORKSPACE/build
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
--ci-defaults $ARGS \
--cmake-opt=-DCMAKE_C_COMPILER_LAUNCHER=ccache \
--cmake-opt=-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
--cmake-opt="-DLLVM_INSTALL_UTILS=ON" \
--cmake-opt="-DSYCL_PI_TESTS=OFF"
- name: Compile
run: cmake --build $GITHUB_WORKSPACE/build --target deploy-sycl-toolchain