some qol changes for dev

This commit is contained in:
SoftFever
2026-03-12 00:37:24 +08:00
parent 252e98054e
commit ffe321370b
4 changed files with 76 additions and 16 deletions

View File

@@ -14,6 +14,9 @@ build-options:
CC: clang
CXX: clang++
LDFLAGS: "-fuse-ld=lld"
CCACHE_SLOPPINESS: "pch_defines,time_macros,include_file_mtime,include_file_ctime"
CCACHE_BASEDIR: "/run/build"
CCACHE_NOHASHDIR: "1"
finish-args:
- --share=ipc
- --socket=x11
@@ -130,16 +133,26 @@ modules:
BUILD_DIR: deps/build_flatpak
build-commands:
- |
CCACHE_LAUNCHER=""
if command -v ccache >/dev/null 2>&1; then
CCACHE_LAUNCHER="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
fi
cmake -S deps -B $BUILD_DIR \
-DFLATPAK=ON \
-DDEP_DOWNLOAD_DIR=/run/build/orca_deps/external-packages \
-DCMAKE_PREFIX_PATH=/app \
-DDESTDIR=/app \
-DCMAKE_INSTALL_PREFIX=/app \
$CCACHE_LAUNCHER \
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld" \
-DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=lld" \
-DCMAKE_MODULE_LINKER_FLAGS="-fuse-ld=lld"
- cmake --build $BUILD_DIR --parallel
- |
if command -v ccache >/dev/null 2>&1; then
echo "=== ccache statistics (after orca_deps) ==="
ccache -sv || ccache -s || true
fi
- rm -rf /run/build/orca_deps/external-packages
cleanup:
@@ -306,17 +319,28 @@ modules:
buildsystem: simple
build-commands:
- |
CCACHE_LAUNCHER=""
if command -v ccache >/dev/null 2>&1; then
CCACHE_LAUNCHER="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
fi
cmake . -B build_flatpak \
-DFLATPAK=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=/app \
-DCMAKE_INSTALL_PREFIX=/app \
$CCACHE_LAUNCHER \
-DSLIC3R_PCH=OFF \
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld" \
-DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=lld" \
-DCMAKE_MODULE_LINKER_FLAGS="-fuse-ld=lld"
- cmake --build build_flatpak --target OrcaSlicer -j$FLATPAK_BUILDER_N_JOBS
- ./scripts/run_gettext.sh
- cmake --build build_flatpak --target install -j$FLATPAK_BUILDER_N_JOBS
- |
if command -v ccache >/dev/null 2>&1; then
echo "=== ccache statistics (after OrcaSlicer) ==="
ccache -sv || ccache -s || true
fi
cleanup:
- /include