Skip to content

Commit 8cc4d3e

Browse files
committed
ci:macos: use composite
1 parent bc8cb49 commit 8cc4d3e

File tree

2 files changed

+37
-18
lines changed

2 files changed

+37
-18
lines changed

.github/workflows/ci_macos.yml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ on:
1616
- "**.cmake"
1717
- "**/CMakeLists.txt"
1818
- ".github/workflows/ci_macos.yml"
19+
- ".github/workflows/composite-unix/**"
1920

2021
jobs:
2122

@@ -36,21 +37,4 @@ jobs:
3637
steps:
3738
- uses: actions/checkout@v4
3839

39-
- run: brew install ninja
40-
41-
- run: sudo xcode-select --switch /Applications/Xcode_15.1.app
42-
if: ${{ matrix.c.cc == 'gcc-13' }}
43-
# https://docs.brew.sh/Xcode
44-
# https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/os/mac/xcode.rb#L20
45-
46-
- run: cmake --preset multi
47-
48-
- run: cat build/CMakeFiles/CMakeConfigureLog.yaml
49-
if: ${{ failure() }}
50-
51-
- run: cmake --build --preset release
52-
53-
- run: cmake --build --preset release --parallel 1
54-
if: ${{ failure() }}
55-
56-
- run: ctest --preset release
40+
- uses: ./.github/workflows/composite-unix
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
runs:
2+
3+
using: "composite"
4+
5+
steps:
6+
7+
- name: Install Ninja (macOS)
8+
if: runner.os == 'macOS'
9+
shell: bash
10+
run: brew install ninja
11+
12+
13+
- name: install ninja (Linux)
14+
shell: bash
15+
if: runner.os == 'Linux'
16+
run: |
17+
sudo apt update
18+
sudo apt install --no-install-recommends ninja-build
19+
20+
- run: cmake --preset multi
21+
shell: bash
22+
23+
- run: cat build/CMakeFiles/CMakeConfigureLog.yaml
24+
shell: bash
25+
if: ${{ failure() }}
26+
27+
- run: cmake --build --preset release
28+
shell: bash
29+
30+
- run: cmake --build --preset release --parallel 1
31+
shell: bash
32+
if: ${{ failure() }}
33+
34+
- run: ctest --preset release
35+
shell: bash

0 commit comments

Comments
 (0)