Skip to content

Commit 2692dc1

Browse files
ccache test1
1 parent fe67116 commit 2692dc1

1 file changed

Lines changed: 96 additions & 0 deletions

File tree

.github/workflows/cache-test.yaml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Build caches for master
2+
3+
on:
4+
push:
5+
branches:
6+
- 'new_build_image_test'
7+
8+
jobs:
9+
build_linux:
10+
strategy:
11+
matrix:
12+
configuration: [Debug, Release]
13+
compiler: [gcc-9, gcc-13, clang-16]
14+
cmake_options: [""]
15+
include:
16+
# Also include configurations that check if the code compiles without the graphics backends
17+
- configuration: Debug
18+
compiler: gcc-13
19+
cmake_options: -DFSO_BUILD_WITH_OPENGL=OFF -DFSO_BUILD_WITH_VULKAN=OFF
20+
- configuration: Release
21+
compiler: gcc-13
22+
cmake_options: -DFSO_BUILD_WITH_OPENGL=OFF -DFSO_BUILD_WITH_VULKAN=OFF
23+
name: Linux
24+
runs-on: ubuntu-latest
25+
container: ghcr.io/scp-fs2open/linux_build:sha-ab87451
26+
steps:
27+
- uses: actions/checkout@v7
28+
name: Checkout
29+
with:
30+
submodules: true
31+
- name: Set workspace as safe
32+
# This appears to be broken in current actions, so do it manually
33+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
34+
- name: ccache
35+
uses: hendrikmuhs/ccache-action@v1.2.23
36+
with:
37+
key: ${{ runner.os }}-${{ matrix.configuration }}-${{ matrix.compiler }}
38+
- name: Configure ccache
39+
run: |
40+
ccache --set-config=sloppiness=pch_defines,time_macros
41+
ccache -p
42+
43+
- name: Configure CMake
44+
env:
45+
CONFIGURATION: ${{ matrix.configuration }}
46+
COMPILER: ${{ matrix.compiler }}
47+
JOB_CMAKE_OPTIONS: ${{ matrix.cmake_options }}
48+
CCACHE_PATH: /usr/local/bin/ccache
49+
ENABLE_QTFRED: OFF
50+
run: $GITHUB_WORKSPACE/ci/linux/configure_cmake.sh
51+
- name: Compile
52+
working-directory: ./build
53+
run: ninja -k 20 all
54+
- name: Show CCache statistics
55+
run: ccache --show-stats
56+
57+
58+
build_mac:
59+
strategy:
60+
matrix:
61+
configuration: [Debug, Release]
62+
compiler: [clang]
63+
arch: [x86_64, arm64]
64+
cmake_options: [""]
65+
name: Mac
66+
runs-on: macos-latest
67+
steps:
68+
- uses: actions/checkout@v7
69+
name: Checkout
70+
with:
71+
submodules: true
72+
- name: Set workspace as safe
73+
# This appears to be broken in current actions, so do it manually
74+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
75+
- name: ccache
76+
uses: hendrikmuhs/ccache-action@v1.2.23
77+
with:
78+
key: ${{ runner.os }}-${{ matrix.configuration }}-${{ matrix.compiler }}
79+
- name: Configure ccache
80+
run: |
81+
ccache --set-config=sloppiness=pch_defines,time_macros
82+
ccache -p
83+
84+
- name: Configure CMake
85+
env:
86+
CONFIGURATION: ${{ matrix.configuration }}
87+
COMPILER: ${{ matrix.compiler }}
88+
JOB_CMAKE_OPTIONS: ${{ matrix.cmake_options }}
89+
CCACHE_PATH: /usr/local/bin/ccache
90+
ENABLE_QTFRED: OFF
91+
run: $GITHUB_WORKSPACE/ci/linux/configure_cmake.sh
92+
- name: Compile
93+
working-directory: ./build
94+
run: ninja -k 20 all
95+
- name: Show CCache statistics
96+
run: ccache --show-stats

0 commit comments

Comments
 (0)