-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (54 loc) · 2.64 KB
/
macos.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: MacOS
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build_on_macos:
runs-on: macos-13
strategy:
matrix:
mode: [ Release, Debug ]
steps:
- uses: actions/checkout@v3
- name: Clone Deps
run: git submodule update --init
working-directory: ${{github.workspace}}
- name: Install LLVM
run: env HOMEBREW_NO_AUTO_UPDATE=1 brew install llvm
- name: Install Ninja
run: env HOMEBREW_NO_AUTO_UPDATE=1 brew install ninja
- name: Install SDL2
run: env HOMEBREW_NO_AUTO_UPDATE=1 brew install sdl2 sdl2_image sdl2_mixer sdl2_ttf
- name: Install icu4c
run: env HOMEBREW_NO_AUTO_UPDATE=1 brew install icu4c
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.mode}}
- name: Check CMake
run: cmake --version
- name: Configure CMake
run: PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.mode}} -G Ninja -DUSE_CCACHE=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.mode}} --verbose -j
- name: Test
working-directory: ${{github.workspace}}/build/test
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure
- name: Configure CMake with MLIR
run: PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig cmake -B ${{github.workspace}}/build3 -DCMAKE_BUILD_TYPE=${{matrix.mode}} -G Ninja -DUSE_CCACHE=ON -DPSCM_ENABLE_MLIR_CODEGEN=ON
- name: Build with MLIR
run: cmake --build ${{github.workspace}}/build3 --config ${{matrix.mode}} --verbose -j
- name: Test with MLIR
working-directory: ${{github.workspace}}/build3/test
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure
- name: Configure CMake with C++20 Modules
run: PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig CXX=/usr/local/opt/llvm/bin/clang++ CC=/usr/local/opt/llvm/bin/clang cmake -B ${{github.workspace}}/build2 -DCMAKE_BUILD_TYPE=${{matrix.mode}} -DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja -G Ninja -DUSE_CCACHE=ON -DPSCM_USE_CXX20_MODULES=ON
- name: Build with C++20 Modules
run: cmake --build ${{github.workspace}}/build2 --config ${{matrix.mode}} --verbose -j
- name: Test with C++20 Modules
working-directory: ${{github.workspace}}/build2/test
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure
- name: Build with pscm-build
run: CC=/usr/local/opt/llvm/bin/clang ${{github.workspace}}/build2/tool/pscm-build/src/pscm-build build :all