build: Add option save-always: true

This commit is contained in:
remittor
2025-12-31 19:13:43 +03:00
parent 8c2f6fd7de
commit cfc8241f53

View File

@@ -267,6 +267,7 @@ jobs:
with: with:
path: staging_dir/host path: staging_dir/host
key: host-tools-${{ runner.os }}-${{ hashFiles('tools/**') }} key: host-tools-${{ runner.os }}-${{ hashFiles('tools/**') }}
save-always: true
restore-keys: | restore-keys: |
host-tools-${{ runner.os }}- host-tools-${{ runner.os }}-
@@ -275,13 +276,19 @@ jobs:
with: with:
path: staging_dir/toolchain-* path: staging_dir/toolchain-*
key: toolchain-${{ env.G_TARGET_ARCH }}-${{ hashFiles('toolchain/**') }} key: toolchain-${{ env.G_TARGET_ARCH }}-${{ hashFiles('toolchain/**') }}
save-always: true
restore-keys: | restore-keys: |
toolchain-${{ env.G_TARGET_ARCH }}- toolchain-${{ env.G_TARGET_ARCH }}-
- name: Monitor memory - name: Monitor memory
run: | run: |
free -h echo "Memory and swap:"
cat /proc/meminfo sudo free -h
echo
sudo swapon --show
echo
echo "Available storage:"
sudo df -h
- name: Build tools and toolchain - name: Build tools and toolchain
id: tools id: tools
@@ -290,20 +297,6 @@ jobs:
make toolchain/install -j$(nproc) make toolchain/install -j$(nproc)
echo "status=success" >> $GITHUB_OUTPUT 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
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-*
key: toolchain-${{ env.G_TARGET_ARCH }}-${{ hashFiles('toolchain/**') }}
- name: Kernel compile - name: Kernel compile
id: kernel id: kernel
if: ${{ steps.tools.outputs.status == 'success' && github.event.inputs.first_kernel_compile == 'true' && github.event.inputs.fake_build != 'true' }} if: ${{ steps.tools.outputs.status == 'success' && github.event.inputs.first_kernel_compile == 'true' && github.event.inputs.fake_build != 'true' }}
@@ -313,8 +306,13 @@ jobs:
- name: Monitor memory 2 - name: Monitor memory 2
run: | run: |
free -h echo "Memory and swap:"
cat /proc/meminfo sudo free -h
echo
sudo swapon --show
echo
echo "Available storage:"
sudo df -h
- name: Build the firmware image - name: Build the firmware image
id: compile id: compile