From ba36312864b0480193ea2181f987035afaef169e Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Tue, 27 Aug 2024 18:43:14 -0400 Subject: [PATCH] CI: Remove outdated references to Serenity vs. toolchain ccache The toolchain ccache no longer exists. Remove it and the "Serenity" prefix from remaining ccache variables. --- .github/actions/cache-restore/action.yml | 30 ++++++++++----------- .github/actions/cache-save/action.yml | 26 ++++++++---------- .github/workflows/ladybird-js-artifacts.yml | 14 ++++------ .github/workflows/lagom-template.yml | 11 ++++---- .github/workflows/nightly-android.yml | 10 +++---- 5 files changed, 41 insertions(+), 50 deletions(-) diff --git a/.github/actions/cache-restore/action.yml b/.github/actions/cache-restore/action.yml index b58fcabf205..39d87237ac9 100644 --- a/.github/actions/cache-restore/action.yml +++ b/.github/actions/cache-restore/action.yml @@ -23,8 +23,8 @@ inputs: description: 'Increment this number if CI has trouble with ccache.' required: false default: '0' - serenity_ccache_path: - description: 'Path to the SerenityOS ccache directory' + ccache_path: + description: 'Path to the ccache directory' required: false default: '' download_cache_path: @@ -33,9 +33,9 @@ inputs: default: 'caches' outputs: - serenity_ccache_primary_key: - description: 'Primary key for the Serenity ccache' - value: ${{ steps.serenity-ccache.outputs.cache-primary-key }} + ccache_primary_key: + description: 'Primary ccache key' + value: ${{ steps.ccache.outputs.cache-primary-key }} runs: using: "composite" @@ -46,27 +46,27 @@ runs: run: | echo "timestamp=$(date -u "+%Y%m%d%H%M_%S")" >> "$GITHUB_OUTPUT" - - name: 'Serenity Compiler Cache' + - name: 'Compiler Cache' uses: actions/cache/restore@v4 - id: 'serenity-ccache' - if: ${{ inputs.serenity_ccache_path != '' }} + id: 'ccache' + if: ${{ inputs.ccache_path != '' }} with: - path: ${{ inputs.serenity_ccache_path }} + path: ${{ inputs.ccache_path }} key: '"ccache" | "${{ inputs.os }}" | "${{ inputs.arch }}" | "${{ inputs.toolchain }}" | "${{ inputs.cache_key_extra }}" | "${{ inputs.ccache_version }}" | ${{ steps.date-stamp.outputs.timestamp }}' restore-keys: | "ccache" | "${{ inputs.os }}" | "${{ inputs.arch }}" | "${{ inputs.toolchain }}" | "${{ inputs.cache_key_extra }}" | "${{ inputs.ccache_version }}" - - name: 'Configure Serenity ccache' - if: ${{ inputs.serenity_ccache_path != '' }} + - name: 'Configure Compiler Cache' + if: ${{ inputs.ccache_path != '' }} shell: bash run: | - CCACHE_DIR=${{ inputs.serenity_ccache_path }} ccache -M 0 + CCACHE_DIR=${{ inputs.ccache_path }} ccache -M 0 # Reset all ccache modification dates to a known epoch. This provides a baseline that we can prune against. - find ${{ inputs.serenity_ccache_path }} | tac | xargs touch -a -m -d "2018-10-10T09:53:07Z" + find ${{ inputs.ccache_path }} | tac | xargs touch -a -m -d "2018-10-10T09:53:07Z" - CCACHE_DIR=${{ inputs.serenity_ccache_path }} ccache -s - CCACHE_DIR=${{ inputs.serenity_ccache_path }} ccache -z + CCACHE_DIR=${{ inputs.ccache_path }} ccache -s + CCACHE_DIR=${{ inputs.ccache_path }} ccache -z - name: Export vcpkg GitHub Actions cache environment variables uses: actions/github-script@v7 diff --git a/.github/actions/cache-save/action.yml b/.github/actions/cache-save/action.yml index 9be4e897974..591e5378b9e 100644 --- a/.github/actions/cache-save/action.yml +++ b/.github/actions/cache-save/action.yml @@ -7,12 +7,12 @@ inputs: description: 'Target Architecture to restore caches for' required: false default: 'x86_64' - serenity_ccache_path: - description: 'Path to the SerenityOS ccache directory' + ccache_path: + description: 'Path to the ccache directory' required: false default: '' - serenity_ccache_primary_key: - description: 'Primary key for the Serenity ccache' + ccache_primary_key: + description: 'Primary ccache key' required: false default: '' @@ -21,22 +21,18 @@ runs: steps: - name: 'Prune obsolete ccache files' shell: bash - if: ${{ inputs.serenity_ccache_path != '' }} + if: ${{ inputs.ccache_path != '' }} run: | - CCACHE_DIR=${{ inputs.serenity_ccache_path }} ccache --evict-older-than=1d + CCACHE_DIR=${{ inputs.ccache_path }} ccache --evict-older-than=1d - - name: 'Serenity Compiler Cache' + - name: 'Compiler Cache' uses: actions/cache/save@v4 - if: ${{ inputs.serenity_ccache_path != '' }} + if: ${{ inputs.ccache_path != '' }} with: - path: ${{ inputs.serenity_ccache_path }} - key: ${{ inputs.serenity_ccache_primary_key }} + path: ${{ inputs.ccache_path }} + key: ${{ inputs.ccache_primary_key }} - name: 'Cache Stats' shell: bash run: | - echo "Toolchain Compiler Cache" - CCACHE_DIR=${{ inputs.toolchain_ccache_path }} ccache -s - - echo "Serenity Compiler Cache" - CCACHE_DIR=${{ inputs.serenity_ccache_path }} ccache -s + CCACHE_DIR=${{ inputs.ccache_path }} ccache -s diff --git a/.github/workflows/ladybird-js-artifacts.yml b/.github/workflows/ladybird-js-artifacts.yml index 5dba796bf91..3cd4baa1ce8 100644 --- a/.github/workflows/ladybird-js-artifacts.yml +++ b/.github/workflows/ladybird-js-artifacts.yml @@ -4,7 +4,7 @@ on: [push] env: LADYBIRD_SOURCE_DIR: ${{ github.workspace }} - SERENITY_CCACHE_DIR: ${{ github.workspace }}/.ccache + CCACHE_DIR: ${{ github.workspace }}/.ccache VCPKG_ROOT: ${{ github.workspace }}/Toolchain/Tarballs/vcpkg VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" @@ -44,7 +44,7 @@ jobs: os: ${{ matrix.os_name }} arch: 'Lagom' cache_key_extra: 'LibJS Artifacts' - serenity_ccache_path: ${{ env.SERENITY_CCACHE_DIR }} + ccache_path: ${{ env.CCACHE_DIR }} download_cache_path: ${{ github.workspace }}/Build/caches - name: Create build directory Ubuntu @@ -56,7 +56,7 @@ jobs: -DENABLE_GUI_TARGETS=OFF if: ${{ matrix.os == 'ubuntu-22.04' }} env: - CCACHE_DIR: ${{ env.SERENITY_CCACHE_DIR }} + CCACHE_DIR: ${{ env.CCACHE_DIR }} # FIXME: Add the following flag back when vcpkg supports Universal binaries: # -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" @@ -69,23 +69,19 @@ jobs: -DCMAKE_OSX_DEPLOYMENT_TARGET="11.0" \ -DENABLE_GUI_TARGETS=OFF if: ${{ matrix.os == 'macos-14' }} - env: - CCACHE_DIR: ${{ env.SERENITY_CCACHE_DIR }} - name: Build and package js working-directory: Build run: | ninja js cpack - env: - CCACHE_DIR: ${{ env.SERENITY_CCACHE_DIR }} - name: Save Caches uses: ./.github/actions/cache-save with: arch: 'Lagom' - serenity_ccache_path: ${{ env.SERENITY_CCACHE_DIR }} - serenity_ccache_primary_key: ${{ steps.cache-restore.outputs.serenity_ccache_primary_key }} + ccache_path: ${{ env.CCACHE_DIR }} + ccache_primary_key: ${{ steps.cache-restore.outputs.ccache_primary_key }} - name: Upload js package uses: actions/upload-artifact@v4 diff --git a/.github/workflows/lagom-template.yml b/.github/workflows/lagom-template.yml index 60811e03e76..168943bee18 100644 --- a/.github/workflows/lagom-template.yml +++ b/.github/workflows/lagom-template.yml @@ -22,8 +22,8 @@ on: default: false env: - # runner.workspace = /home/runner/work/serenity - # github.workspace = /home/runner/work/serenity/serenity + # runner.workspace = /home/runner/work/ladybird + # github.workspace = /home/runner/work/ladybird/ladybird LADYBIRD_SOURCE_DIR: ${{ github.workspace }} CCACHE_DIR: ${{ github.workspace }}/.ccache VCPKG_ROOT: ${{ github.workspace }}/Toolchain/Tarballs/vcpkg @@ -91,11 +91,10 @@ jobs: arch: 'Lagom' toolchain: ${{ inputs.toolchain }} cache_key_extra: ${{ steps.build-parameters.outputs.ccache_key }} - serenity_ccache_path: ${{ env.CCACHE_DIR }} + ccache_path: ${{ env.CCACHE_DIR }} download_cache_path: ${{ github.workspace }}/Build/caches - name: Set dynamic environment variables - id: 'set-env-vars' run: | # Note: Required for vcpkg to use this compiler for its own builds. echo "CC=${{ steps.build-parameters.outputs.host_cc }}" >> "$GITHUB_ENV" @@ -172,8 +171,8 @@ jobs: uses: ./.github/actions/cache-save with: arch: 'Lagom' - serenity_ccache_path: ${{ env.CCACHE_DIR }} - serenity_ccache_primary_key: ${{ steps.cache-restore.outputs.serenity_ccache_primary_key }} + ccache_path: ${{ env.CCACHE_DIR }} + ccache_primary_key: ${{ steps.cache-restore.outputs.ccache_primary_key }} # === TEST === diff --git a/.github/workflows/nightly-android.yml b/.github/workflows/nightly-android.yml index 88ede200bdd..b610d649068 100644 --- a/.github/workflows/nightly-android.yml +++ b/.github/workflows/nightly-android.yml @@ -6,8 +6,8 @@ on: - cron: '0 0 * * *' env: - # runner.workspace = /home/runner/work/serenity - # github.workspace = /home/runner/work/serenity/serenity + # runner.workspace = /home/runner/work/ladybird + # github.workspace = /home/runner/work/ladybird/ladybird LADYBIRD_SOURCE_DIR: ${{ github.workspace }} CCACHE_DIR: ${{ github.workspace }}/.ccache VCPKG_ROOT: ${{ github.workspace }}/Toolchain/Tarballs/vcpkg @@ -54,7 +54,7 @@ jobs: os: ${{ matrix.os_name }} arch: 'Lagom' cache_key_extra: 'Nightly Android' - serenity_ccache_path: ${{ env.CCACHE_DIR }} + ccache_path: ${{ env.CCACHE_DIR }} download_cache_path: ${{ github.workspace }}/Build/caches - name: Assign Build Parameters @@ -101,5 +101,5 @@ jobs: uses: ./.github/actions/cache-save with: arch: 'Lagom' - serenity_ccache_path: ${{ env.CCACHE_DIR }} - serenity_ccache_primary_key: ${{ steps.cache-restore.outputs.serenity_ccache_primary_key }} + ccache_path: ${{ env.CCACHE_DIR }} + ccache_primary_key: ${{ steps.cache-restore.outputs.ccache_primary_key }}