From 41f4a5050c80b738c45808b855be401ecff36d80 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Wed, 22 Dec 2021 16:43:05 -0500 Subject: [PATCH] CI: Add a cache for the IANA time zone database files --- .github/workflows/cmake.yml | 7 +++++++ .github/workflows/libjs-test262.yml | 8 ++++++++ Meta/Azure/Caches.yml | 10 ++++++++-- Meta/Azure/Lagom.yml | 4 ++-- Meta/Azure/Toolchain.yml | 2 +- 5 files changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 3001de16c15..84f0c10882a 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -120,8 +120,15 @@ jobs: ccache -s - name: Create build directory run: | + mkdir -p ${{ github.workspace }}/Build/${{ matrix.arch }}/TZDB mkdir -p ${{ github.workspace }}/Build/${{ matrix.arch }}/UCD mkdir -p ${{ github.workspace }}/Build/${{ matrix.arch }}/CLDR + - name: TimeZoneData cache + # TODO: Change the version to the released version when https://github.com/actions/cache/pull/489 (or 571) is merged. + uses: actions/cache@03e00da99d75a2204924908e1cca7902cafce66b + with: + path: ${{ github.workspace }}/Build/${{ matrix.arch }}/TZDB + key: TimeZoneData-${{ hashFiles('Meta/CMake/time_zone_data.cmake') }} - name: UnicodeData cache # TODO: Change the version to the released version when https://github.com/actions/cache/pull/489 (or 571) is merged. uses: actions/cache@03e00da99d75a2204924908e1cca7902cafce66b diff --git a/.github/workflows/libjs-test262.yml b/.github/workflows/libjs-test262.yml index 1e7990aa275..3fd5c5d2807 100644 --- a/.github/workflows/libjs-test262.yml +++ b/.github/workflows/libjs-test262.yml @@ -65,9 +65,17 @@ jobs: - name: Create build directory run: | + mkdir -p libjs-test262/Build/TZDB mkdir -p libjs-test262/Build/UCD mkdir -p libjs-test262/Build/CLDR + - name: TimeZoneData cache + # TODO: Change the version to the released version when https://github.com/actions/cache/pull/489 (or 571) is merged. + uses: actions/cache@03e00da99d75a2204924908e1cca7902cafce66b + with: + path: ${{ github.workspace }}/libjs-test262/Build/TZDB + key: TimeZoneData-${{ hashFiles('Meta/CMake/time_zone_data.cmake') }} + - name: UnicodeData cache # TODO: Change the version to the released version when https://github.com/actions/cache/pull/489 (or 571) is merged. uses: actions/cache@03e00da99d75a2204924908e1cca7902cafce66b diff --git a/Meta/Azure/Caches.yml b/Meta/Azure/Caches.yml index a71cf85c563..ca2d748048e 100644 --- a/Meta/Azure/Caches.yml +++ b/Meta/Azure/Caches.yml @@ -7,7 +7,7 @@ parameters: serenity_ccache_path: '' toolchain_ccache_path: '' toolchain_ccache_size: $(CCACHE_MAXSIZE) - with_unicode_caches: true + with_remote_data_caches: true steps: - script: | @@ -56,7 +56,13 @@ steps: CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -s displayName: 'Configure Serenity ccache' - - ${{ if eq(parameters.with_unicode_caches, true) }}: + - ${{ if eq(parameters.with_remote_data_caches, true) }}: + - task: Cache@2 + inputs: + key: '"time_zone_data" | Meta/CMake/time_zone_data.cmake' + path: $(Build.SourcesDirectory)/${{ parameters.build_directory }}/TZDB + displayName: 'TimeZoneData Cache' + - task: Cache@2 inputs: key: '"unicode_data" | Meta/CMake/unicode_data.cmake' diff --git a/Meta/Azure/Lagom.yml b/Meta/Azure/Lagom.yml index c9075ee916c..475ea22714b 100644 --- a/Meta/Azure/Lagom.yml +++ b/Meta/Azure/Lagom.yml @@ -39,9 +39,9 @@ jobs: build_directory: 'Meta/Lagom/Build' serenity_ccache_path: '$(SERENITY_CCACHE_DIR)' ${{ if eq(parameters.fuzzer, 'Fuzz') }}: - with_unicode_caches: false + with_remote_data_caches: false ${{ if eq(parameters.fuzzer, 'NoFuzz') }}: - with_unicode_caches: true + with_remote_data_caches: true - script: | mkdir -p Meta/Lagom/Build diff --git a/Meta/Azure/Toolchain.yml b/Meta/Azure/Toolchain.yml index 1abf363c416..02a8d5322ab 100644 --- a/Meta/Azure/Toolchain.yml +++ b/Meta/Azure/Toolchain.yml @@ -21,7 +21,7 @@ jobs: toolchain: 'clang' toolchain_ccache_path: '$(LLVM_CCACHE_DIR)' toolchain_ccache_size: '$(LLVM_CCACHE_MAXSIZE)' - with_unicode_caches: false + with_remote_data_caches: false - script: ./Toolchain/BuildClang.sh --ci displayName: Build Toolchain