Skip to content

Commit 18aed86

Browse files
ci: fasten build process
1 parent 5d50080 commit 18aed86

File tree

3 files changed

+36
-6
lines changed

3 files changed

+36
-6
lines changed

.github/workflows/generate-docs.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
generate:
11-
runs-on: windows-2025
11+
runs-on: windows-latest
1212
permissions:
1313
contents: write
1414

@@ -32,11 +32,41 @@ jobs:
3232
restore-keys: |
3333
Windows-sccache-
3434
35+
- name: Restore configure artifacts cache
36+
id: restore-configure-cache
37+
uses: actions/cache/restore@v5
38+
with:
39+
path: |
40+
build/RelWithDebInfo/.llvm
41+
build/RelWithDebInfo/include
42+
build/RelWithDebInfo/_deps
43+
build/RelWithDebInfo/*.tar.*
44+
key: >-
45+
Windows-configure-RelWithDebInfo-${{
46+
hashFiles('pixi.lock', 'pixi.toml', '**/CMakeLists.txt', 'cmake/**/*.cmake')
47+
}}-${{ github.sha }}
48+
restore-keys: |
49+
Windows-configure-RelWithDebInfo-${{ hashFiles('pixi.lock', 'pixi.toml', '**/CMakeLists.txt', 'cmake/**/*.cmake') }}-
50+
3551
- name: Start sccache
3652
run: sccache --start-server
3753

54+
- name: Configure
55+
run: pixi run cmake-config
56+
57+
- name: Save configure artifacts cache
58+
if: success()
59+
uses: actions/cache/save@v5
60+
with:
61+
path: |
62+
build/RelWithDebInfo/.llvm
63+
build/RelWithDebInfo/include
64+
build/RelWithDebInfo/_deps
65+
build/RelWithDebInfo/*.tar.*
66+
key: ${{ steps.restore-configure-cache.outputs.cache-primary-key }}
67+
3868
- name: Build
39-
run: pixi run build
69+
run: pixi run cmake-build
4070

4171
- name: Generate documentation
4272
run: |

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ endif()
4343
set(CLORE_ENABLE_IPO OFF)
4444
set(CLORE_USE_LTO_ARTIFACT OFF)
4545
if(CLORE_ENABLE_LTO)
46-
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
47-
message(STATUS "Interprocedural optimization disabled for Debug builds.")
48-
else()
46+
if(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
4947
check_ipo_supported(RESULT CLORE_IPO_SUPPORTED OUTPUT CLORE_IPO_ERROR LANGUAGES C CXX)
5048
if(CLORE_IPO_SUPPORTED)
5149
set(CLORE_ENABLE_IPO ON)
@@ -54,6 +52,8 @@ if(CLORE_ENABLE_LTO)
5452
else()
5553
message(WARNING "LTO requested but IPO is not supported by the active toolchain: ${CLORE_IPO_ERROR}")
5654
endif()
55+
else()
56+
message(STATUS "Interprocedural optimization disabled for non-RelWithDebInfo builds.")
5757
endif()
5858
endif()
5959

pixi.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ cmake -B build/{{ type }} -G Ninja \
6161

6262
[feature.build.tasks.cmake-build]
6363
args = [{ arg = "type", default = "RelWithDebInfo" }]
64-
cmd = "cmake --build build/{{ type }}"
64+
cmd = "cmake --build build/{{ type }} --parallel"
6565

6666
[feature.build.tasks.build]
6767
args = [{ arg = "type", default = "RelWithDebInfo" }]

0 commit comments

Comments
 (0)