Skip to content

Commit 579a3a7

Browse files
committed
ci:macos: use composite
1 parent bc8cb49 commit 579a3a7

File tree

2 files changed

+36
-18
lines changed

2 files changed

+36
-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-action
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
runs:
2+
3+
using: "composite"
4+
5+
steps:
6+
7+
- name: Install Ninja (macOS)
8+
if: runner.os == 'macOS'
9+
run: brew install ninja
10+
shell: bash
11+
12+
13+
- name: install ninja (Linux)
14+
if: runner.os == 'Linux'
15+
run: |
16+
sudo apt update
17+
sudo apt install --no-install-recommends ninja-build
18+
19+
- run: cmake --preset multi
20+
shell: bash
21+
22+
- run: cat build/CMakeFiles/CMakeConfigureLog.yaml
23+
shell: bash
24+
if: ${{ failure() }}
25+
26+
- run: cmake --build --preset release
27+
shell: bash
28+
29+
- run: cmake --build --preset release --parallel 1
30+
shell: bash
31+
if: ${{ failure() }}
32+
33+
- run: ctest --preset release
34+
shell: bash

0 commit comments

Comments
 (0)