Skip to content

Commit 3d10e67

Browse files
authored
CI-unixish.yml: use ccache for some macos builds / cleanups (#4439)
1 parent 436b8bd commit 3d10e67

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

.github/workflows/CI-unixish.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ jobs:
6363

6464
- name: ccache
6565
uses: hendrikmuhs/ccache-action@v1.2
66-
if: contains(matrix.os, 'ubuntu')
6766
with:
6867
key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}
6968

@@ -88,7 +87,7 @@ jobs:
8887
- name: CMake build on macos (with GUI)
8988
if: contains(matrix.os, 'macos')
9089
run: |
91-
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DQt5_DIR=$(brew --prefix qt@5)/lib/cmake/Qt5
90+
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQt5_DIR=$(brew --prefix qt@5)/lib/cmake/Qt5
9291
cmake --build cmake.output -- -j$(nproc)
9392
9493
- name: Run CMake test
@@ -114,7 +113,6 @@ jobs:
114113

115114
- name: ccache
116115
uses: hendrikmuhs/ccache-action@v1.2
117-
if: contains(matrix.os, 'ubuntu')
118116
with:
119117
key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}
120118

@@ -147,7 +145,6 @@ jobs:
147145

148146
- name: ccache
149147
uses: hendrikmuhs/ccache-action@v1.2
150-
if: contains(matrix.os, 'ubuntu')
151148
with:
152149
key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}
153150

@@ -178,13 +175,12 @@ jobs:
178175
steps:
179176
- uses: actions/checkout@v2
180177

181-
# coreutils contains "g++" and "nproc"
178+
# coreutils contains "g++" (default is "c++") and "nproc"
182179
- name: Install missing software on macos
183180
if: contains(matrix.os, 'macos')
184181
run: |
185182
brew install coreutils
186183
187-
# TODO: can we use c++ instead?
188184
- name: Check syntax with NONNEG
189185
run: |
190186
ls lib/*.cpp | xargs -n 1 -P $(nproc) g++ -fsyntax-only -std=c++0x -Ilib -Iexternals -Iexternals/picojson -Iexternals/simplecpp -Iexternals/tinyxml2 -DNONNEG
@@ -277,7 +273,7 @@ jobs:
277273

278274
strategy:
279275
matrix:
280-
os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12]
276+
os: [ubuntu-20.04, ubuntu-22.04] # only needs to build on ubuntu
281277
fail-fast: false # Prefer quick result
282278

283279
runs-on: ${{ matrix.os }}
@@ -286,7 +282,6 @@ jobs:
286282
- uses: actions/checkout@v2
287283

288284
- name: Build Fuzzer
289-
if: contains(matrix.os, 'ubuntu')
290285
run: |
291286
pushd oss-fuzz
292287
make -j$(nproc) CXX=clang++ CXXFLAGS="-fsanitize=address" fuzz-client translate
@@ -305,7 +300,6 @@ jobs:
305300

306301
- name: ccache
307302
uses: hendrikmuhs/ccache-action@v1.2
308-
if: contains(matrix.os, 'ubuntu')
309303
with:
310304
key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}
311305

0 commit comments

Comments
 (0)