Skip to content

Commit 57dd7e9

Browse files
Define a GCC build matrix
1 parent bc65073 commit 57dd7e9

File tree

3 files changed

+47
-10
lines changed

3 files changed

+47
-10
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,24 @@ jobs:
2424
- *checkout
2525
- name: Run Build
2626
run: bash tools/earthly.sh +build-alpine --use_vcpkg=false
27+
28+
build-gcc-matrix:
29+
strategy:
30+
fail-fast: true
31+
matrix:
32+
gcc_version:
33+
- 15.2.0
34+
- 14.3.0
35+
- 13.4.0
36+
- 12.5.0
37+
use_vcpkg: ["true", "false"]
38+
runs-on: ubuntu-latest
39+
name: "Build with GCC"
40+
steps:
41+
- *checkout
42+
- name: Build
43+
run: |
44+
bash tools/earthly.sh +build-gcc \
45+
--gcc_version=${{matrix.gcc_version}} \
46+
--use_vcpkg=${{matrix.use_vcpkg}} \
47+
--test=false

Earthfile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ build-gcc:
66
ARG --required gcc_version
77
FROM $default_container_registry/gcc:$gcc_version
88
DO --pass-args +BOOTSTRAP_BUILD_INSTALL_EXPORT \
9-
--build_deps "perl pkg-config linux-libc-dev curl zip unzip"
9+
--build_deps "perl pkg-config linux-libc-dev curl zip unzip ccache" \
10+
--third_deps "libfmt-dev libboost-url1.81-dev libboost-container1.81-dev libssl-dev"
1011

1112
build-alpine:
1213
FROM $default_container_registry/alpine:3.20
@@ -154,17 +155,15 @@ BUILD:
154155
CONFIGS="Debug" \
155156
TEST_CONFIG="Debug" \
156157
USE_PMM=$__use_vcpkg \
157-
INSTALL_PREFIX=$prefix \
158+
INSTALL_PREFIX=$install_prefix \
158159
BUILD_TESTING=$__test
159-
# Build
160-
RUN $launcher cmake --build _build
161160
IF test "$install_prefix" != ""
162-
RUN cmake --install _build --prefix="$install_prefix" --config Debug
163-
RUN cmake --install _build --prefix="$install_prefix" --config Release
164-
RUN cmake --install _build --prefix="$install_prefix" --config RelWithDebInfo
161+
FOR conf IN Debug # Release RelWithDebInfo
162+
RUN $launcher make install-fast LAUNCHER='uv run --group=build' INSTALL_PREFIX=$install_prefix INSTALL_CONFIG=$conf
163+
END
165164
END
166165
IF test "$cpack_out" != ""
167-
RUN cmake -E chdir _build \
168-
cpack -B "$cpack_out" -C "Debug;Release;RelWithDebInfo" -G "STGZ;TGZ;ZIP" && \
169-
rm "$cpack_out/_CPack_Packages" -rf
166+
RUN $launcher make package-fast LAUNCHER='uv run --group=build' \
167+
CPACK_OUT="$cpack_out" \
168+
PACKAGE_CONFIGS=Debug
170169
END

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,23 @@ test-fast:
7474
$(CMAKE_RUN) -E chdir "$(BUILD_DIR)" \
7575
ctest -C $(TEST_CONFIG) -j4 --output-on-failure --progress -E CMake/\|URI/spec/
7676

77+
install: build
78+
$(MAKE) install-fast
79+
80+
INSTALL_CONFIG := Release
81+
install-fast:
82+
$(CMAKE_RUN) --install "$(BUILD_DIR)" --config "$(INSTALL_CONFIG)" --prefix="$(INSTALL_PREFIX)"
83+
84+
package: build
85+
$(MAKE) package-fast
86+
87+
CPACK_OUT := _cpack
88+
PACKAGE_CONFIGS = Debug;Release;RelWithDebInfo
89+
package-fast:
90+
$(CMAKE_RUN) -E chdir "$(BUILD_DIR)" \
91+
cpack -B "$(CPACK_OUT)" -C "$(PACKAGE_CONFIGS)" -G "STGZ;TGZ;ZIP"
92+
rm -r -- "$(CPACK_OUT)/_CPack_Packages"
93+
7794
format-check:
7895
$(PYTHON_RUN) tools/format.py --mode=check
7996

0 commit comments

Comments
 (0)