Skip to content

Commit

Permalink
CI: Add a cache for the IANA time zone database files
Browse files Browse the repository at this point in the history
  • Loading branch information
trflynn89 authored and linusg committed Jan 8, 2022
1 parent 8669b25 commit 41f4a50
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/libjs-test262.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions Meta/Azure/Caches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions Meta/Azure/Lagom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Meta/Azure/Toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 41f4a50

Please sign in to comment.