Truly independent web browser
CI: Build releases without caches
Jelle Raaijmakers1a09d0ecd5aa
diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.ymlindex b1a8d8f1ae6..7ec068f40db 100644--- a/.github/actions/build/action.yml+++ b/.github/actions/build/action.yml@@ -27,6 +27,10 @@ inputs:description: 'Access token that lets builds on master write to the vcpkg binary cache'required: falsedefault: ''+ use_caches:+ description: 'Whether to restore and save caches of downloaded files and build artifacts'+ required: false+ default: 'true'runs:using: 'composite'@@ -50,6 +54,7 @@ runs:arch: ${{ inputs.arch }}toolchain: ${{ inputs.toolchain }}build_preset: ${{ inputs.build_preset }}+ use_caches: ${{ inputs.use_caches }}# Use the compiler version for the ccache compiler hash. Otherwise, if plugins are enabled, the plugin .so files# are included in the hash. This results in clean builds on every run as the .so files are rebuilt.@@ -98,6 +103,7 @@ runs:echo "cmake_options=$CMAKE_OPTIONS" >> "$GITHUB_OUTPUT"- name: Restore Caches+ if: ${{ inputs.use_caches == 'true' }}uses: ./.github/actions/cache-restoreid: 'cache-restore'with:@@ -111,7 +117,7 @@ runs:- name: Restore the WebAssembly spec test suiteid: 'wasm-spec-tests-cache'- if: ${{ inputs.os != 'Windows' }}+ if: ${{ inputs.use_caches == 'true' && inputs.os != 'Windows' }}uses: actions/cache/restore@v6with:path: ${{ github.workspace }}/Build/caches/WasmSpecTests@@ -179,13 +185,14 @@ runs:run: cmake --install . --strip --prefix "${{ github.workspace }}/Install"- name: Save the WebAssembly spec test suite- if: ${{ github.ref == 'refs/heads/master' && inputs.os != 'Windows' && steps.wasm-spec-tests-cache.outputs.cache-hit != 'true' }}+ if: ${{ github.ref == 'refs/heads/master' && inputs.use_caches == 'true' && inputs.os != 'Windows' && steps.wasm-spec-tests-cache.outputs.cache-hit != 'true' }}uses: actions/cache/save@v6with:path: ${{ github.workspace }}/Build/caches/WasmSpecTestskey: ${{ steps.wasm-spec-tests-cache.outputs.cache-primary-key }}- name: Save Caches+ if: ${{ inputs.use_caches == 'true' }}uses: ./.github/actions/cache-savewith:arch: ${{ inputs.arch }}diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.ymlindex 1b3d16c1c5f..1472245b7d7 100644--- a/.github/actions/setup/action.yml+++ b/.github/actions/setup/action.yml@@ -22,6 +22,10 @@ inputs:description: 'When the setup is for building, set the build preset (e.g. Release)'required: falsedefault: 'Release'+ use_caches:+ description: 'Whether to restore and save caches of downloaded files'+ required: false+ default: 'true'outputs:ccache_path:description: 'Path to the ccache directory'@@ -57,7 +61,7 @@ runs:if: ${{ inputs.os != 'Linux' }}with:python-version: 3.12- cache: 'pip'+ cache: ${{ inputs.use_caches == 'true' && 'pip' || '' }}# actions/setup-python can fail to find its tool-cache pip inside job containers.- name: 'Set up Python environment'@@ -175,7 +179,7 @@ runs:- name: 'Restore wasm-tools'id: 'wasm-tools-cache'- if: ${{ inputs.type == 'build' && inputs.os != 'Linux' }}+ if: ${{ inputs.use_caches == 'true' && inputs.type == 'build' && inputs.os != 'Linux' }}uses: actions/cache/restore@v6with:path: ${{ github.workspace }}/wasm-tools@@ -211,7 +215,7 @@ runs:# Saved right after the install rather than by actions/cache's post-job step, which runs only if the whole job# succeeds — so a flaky test would keep the cache from ever being saved.- name: 'Save wasm-tools'- if: ${{ github.ref == 'refs/heads/master' && inputs.type == 'build' && inputs.os != 'Linux' && steps.wasm-tools-cache.outputs.cache-hit != 'true' }}+ if: ${{ github.ref == 'refs/heads/master' && inputs.use_caches == 'true' && inputs.type == 'build' && inputs.os != 'Linux' && steps.wasm-tools-cache.outputs.cache-hit != 'true' }}uses: actions/cache/save@v6with:path: ${{ github.workspace }}/wasm-tools@@ -224,6 +228,7 @@ runs:- name: 'Restore cargo registry'id: 'cargo-registry'+ if: ${{ inputs.use_caches == 'true' }}uses: actions/cache/restore@v6with:path: |@@ -248,7 +253,7 @@ runs:# Saved right after the fetch rather than by actions/cache's post-job step, which runs only if the whole job# succeeds — so a flaky test would keep the cache from ever being saved.- name: 'Save cargo registry'- if: ${{ github.ref == 'refs/heads/master' && steps.cargo-registry.outputs.cache-hit != 'true' }}+ if: ${{ github.ref == 'refs/heads/master' && inputs.use_caches == 'true' && steps.cargo-registry.outputs.cache-hit != 'true' }}uses: actions/cache/save@v6with:path: |diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.ymlindex f80f85296ea..415c4e924ef 100644--- a/.github/workflows/build-release.yml+++ b/.github/workflows/build-release.yml@@ -103,6 +103,7 @@ jobs:build_preset: 'Distribution'version: ${{ inputs.version }}vcpkg_cache_sas: ${{ secrets.VCPKG_CACHE_SAS }}+ use_caches: ${{ inputs.version == '' }}- name: Start PulseAudioif: ${{ matrix.os_name == 'Linux' }}@@ -279,7 +280,7 @@ jobs:build-debug-bundle: truemanifest-path: Meta/CMake/flatpak/org.ladybird.Ladybird.jsonarch: ${{ matrix.arch }}- save-cache: false+ cache: falseupload-artifact: false- name: Attest