From 0cb316891ce2702655987d83975ae070eabdae25 Mon Sep 17 00:00:00 2001 From: remittor Date: Wed, 31 Dec 2025 15:32:49 +0300 Subject: [PATCH] build: Add step "Save cache for toolchain" and "Save cache for tools" --- .github/workflows/build.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 213ce6f..6d9498c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -290,9 +290,28 @@ jobs: make toolchain/install -j$(nproc) echo "status=success" >> $GITHUB_OUTPUT + - name: Save cache for host tools + if: ${{ steps.tools.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }} + uses: actions/cache@v4 + with: + path: | + staging_dir/host + build_dir/host + staging_dir/hostpkg + build_dir/hostpkg + key: host-tools-${{ runner.os }}-${{ hashFiles('tools/**') }} + + - name: Save cache for toolchain + if: ${{ steps.tools.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }} + uses: actions/cache@v4 + with: + path: | + staging_dir/toolchain-* + build_dir/toolchain-* + key: toolchain-${{ env.G_TARGET_ARCH }}-${{ hashFiles('toolchain/**') }} + - name: Kernel compile id: kernel - continue-on-error: true if: ${{ steps.tools.outputs.status == 'success' && github.event.inputs.first_kernel_compile == 'true' && github.event.inputs.fake_build != 'true' }} run: | make target/linux/compile -j$(nproc) @@ -300,7 +319,6 @@ jobs: - name: Build the firmware image id: compile - continue-on-error: true if: steps.tools.outputs.status == 'success' env: TARGET: ${{ matrix.target }} @@ -339,7 +357,7 @@ jobs: echo "OUT_DIR=$OUT_DIR" >> $GITHUB_ENV - name: Mark firmware build failed - if: steps.compile.outcome == 'failure' + if: false # steps.compile.outcome == 'failure' run: | echo "Firmware build failed, continuing pipeline" echo "FW_BUILD_OK=0" >> $GITHUB_ENV