mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Meta: Trim the CI ccache down to files used in the current build
This commit is contained in:
committed by
Tim Flynn
parent
e74b34b69e
commit
5f088f3233
16
.github/workflows/cmake.yml
vendored
16
.github/workflows/cmake.yml
vendored
@@ -156,14 +156,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Show ccache stats before build and configure
|
- name: Show ccache stats before build and configure
|
||||||
run: |
|
run: |
|
||||||
# We only have 5 GiB of cache available *in total*. Beyond that, GitHub deletes caches.
|
# Reset all ccache modification dates to a known epoch. This provides a baseline that we can prune against.
|
||||||
# Currently, we use about 130 MB for the toolchains (x86_64), and 2 ccache caches:
|
find ${{ github.workspace }}/.ccache | tac | xargs touch -a -m -d "2018-10-10T09:53:07Z"
|
||||||
# One with ALL_DEBUG (x86_64), and one with NORMAL_DEBUG (x86_64).
|
ccache -M 0
|
||||||
# Therefore, using 1.6 GB or more per cache causes disaster.
|
|
||||||
# Building from scratch fills the ccache cache from 0 to about 0.7 GB, and after compression it comes out to
|
|
||||||
# about 0.25 GB, so 3 GB (1GB after compression) should be plenty, all while comfortably fitting in the cache.
|
|
||||||
ccache -M 3000M
|
|
||||||
ccache -s
|
ccache -s
|
||||||
|
ccache -z
|
||||||
|
|
||||||
- name: Create build directory
|
- name: Create build directory
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ${{ github.workspace }}/Build/${{ matrix.arch }}
|
mkdir -p ${{ github.workspace }}/Build/${{ matrix.arch }}
|
||||||
@@ -221,6 +219,10 @@ jobs:
|
|||||||
- name: Build Serenity and Tests
|
- name: Build Serenity and Tests
|
||||||
working-directory: ${{ github.workspace }}/Build/superbuild
|
working-directory: ${{ github.workspace }}/Build/superbuild
|
||||||
run: cmake --build .
|
run: cmake --build .
|
||||||
|
|
||||||
|
- name: Prune obsolete ccache files
|
||||||
|
run: ccache --evict-older-than 1d
|
||||||
|
|
||||||
- name: Show ccache stats after build
|
- name: Show ccache stats after build
|
||||||
run: ccache -s
|
run: ccache -s
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,7 @@ parameters:
|
|||||||
download_cache_path: ''
|
download_cache_path: ''
|
||||||
ccache_version: 1 # Increment this number if CI has trouble with ccache.
|
ccache_version: 1 # Increment this number if CI has trouble with ccache.
|
||||||
serenity_ccache_path: ''
|
serenity_ccache_path: ''
|
||||||
serenity_ccache_size: '5G'
|
|
||||||
toolchain_ccache_path: ''
|
toolchain_ccache_path: ''
|
||||||
toolchain_ccache_size: $(CCACHE_MAXSIZE)
|
|
||||||
with_remote_data_caches: true
|
with_remote_data_caches: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -40,8 +38,11 @@ steps:
|
|||||||
displayName: 'Toolchain Compiler Cache'
|
displayName: 'Toolchain Compiler Cache'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
CCACHE_DIR=${{ parameters.toolchain_ccache_path }} ccache -M ${{ parameters.toolchain_ccache_size }}
|
# Reset all ccache modification dates to a known epoch. This provides a baseline that we can prune against.
|
||||||
|
find ${{ parameters.toolchain_ccache_path }} | tac | xargs touch -a -m -d "2018-10-10T09:53:07Z"
|
||||||
|
CCACHE_DIR=${{ parameters.toolchain_ccache_path }} ccache -M 0
|
||||||
CCACHE_DIR=${{ parameters.toolchain_ccache_path }} ccache -s
|
CCACHE_DIR=${{ parameters.toolchain_ccache_path }} ccache -s
|
||||||
|
CCACHE_DIR=${{ parameters.toolchain_ccache_path }} ccache -z
|
||||||
displayName: 'Configure Toolchain ccache'
|
displayName: 'Configure Toolchain ccache'
|
||||||
|
|
||||||
- ${{ if ne(parameters.serenity_ccache_path, '') }}:
|
- ${{ if ne(parameters.serenity_ccache_path, '') }}:
|
||||||
@@ -54,9 +55,11 @@ steps:
|
|||||||
displayName: 'Serenity Compiler Cache'
|
displayName: 'Serenity Compiler Cache'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -M ${{ parameters.serenity_ccache_size }}
|
# Reset all ccache modification dates to a known epoch. This provides a baseline that we can prune against.
|
||||||
CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -c
|
find ${{ parameters.serenity_ccache_path }} | tac | xargs touch -a -m -d "2018-10-10T09:53:07Z"
|
||||||
|
CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -M 0
|
||||||
CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -s
|
CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -s
|
||||||
|
CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -z
|
||||||
displayName: 'Configure Serenity ccache'
|
displayName: 'Configure Serenity ccache'
|
||||||
|
|
||||||
- ${{ if eq(parameters.with_remote_data_caches, true) }}:
|
- ${{ if eq(parameters.with_remote_data_caches, true) }}:
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ jobs:
|
|||||||
with_remote_data_caches: true
|
with_remote_data_caches: true
|
||||||
${{ if eq(parameters.os, 'macOS') }}:
|
${{ if eq(parameters.os, 'macOS') }}:
|
||||||
ccache_version: 2
|
ccache_version: 2
|
||||||
serenity_ccache_size: '2G'
|
|
||||||
|
|
||||||
- ${{ if eq(parameters.os, 'Android') }}:
|
- ${{ if eq(parameters.os, 'Android') }}:
|
||||||
- script: |
|
- script: |
|
||||||
@@ -212,6 +211,10 @@ jobs:
|
|||||||
ASAN_OPTIONS: 'strict_string_checks=1:check_initialization_order=1:strict_init_order=1:detect_stack_use_after_return=0:allocator_may_return_null=1'
|
ASAN_OPTIONS: 'strict_string_checks=1:check_initialization_order=1:strict_init_order=1:detect_stack_use_after_return=0:allocator_may_return_null=1'
|
||||||
UBSAN_OPTIONS: 'print_stacktrace=1:print_summary=1:halt_on_error=1'
|
UBSAN_OPTIONS: 'print_stacktrace=1:print_summary=1:halt_on_error=1'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
CCACHE_DIR='$(SERENITY_CCACHE_DIR)' ccache --evict-older-than 1d
|
||||||
|
displayName: 'Prune obsolete ccache files'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
CCACHE_DIR='$(SERENITY_CCACHE_DIR)' ccache -s
|
CCACHE_DIR='$(SERENITY_CCACHE_DIR)' ccache -s
|
||||||
displayName: 'Cache Stats'
|
displayName: 'Cache Stats'
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ jobs:
|
|||||||
variables:
|
variables:
|
||||||
- name: LLVM_CCACHE_DIR
|
- name: LLVM_CCACHE_DIR
|
||||||
value: $(Build.SourcesDirectory)/Toolchain/.ccache
|
value: $(Build.SourcesDirectory)/Toolchain/.ccache
|
||||||
- name: LLVM_CCACHE_MAXSIZE
|
|
||||||
value: 20GB
|
|
||||||
- name: SERENITY_CCACHE_DIR
|
- name: SERENITY_CCACHE_DIR
|
||||||
value: $(Build.SourcesDirectory)/.ccache
|
value: $(Build.SourcesDirectory)/.ccache
|
||||||
|
|
||||||
@@ -29,7 +27,6 @@ jobs:
|
|||||||
toolchain: 'clang'
|
toolchain: 'clang'
|
||||||
download_cache_path: 'Build/caches'
|
download_cache_path: 'Build/caches'
|
||||||
toolchain_ccache_path: '$(LLVM_CCACHE_DIR)'
|
toolchain_ccache_path: '$(LLVM_CCACHE_DIR)'
|
||||||
toolchain_ccache_size: '$(LLVM_CCACHE_MAXSIZE)'
|
|
||||||
serenity_ccache_path: '$(SERENITY_CCACHE_DIR)'
|
serenity_ccache_path: '$(SERENITY_CCACHE_DIR)'
|
||||||
|
|
||||||
- script: ./Toolchain/BuildClang.sh --ci
|
- script: ./Toolchain/BuildClang.sh --ci
|
||||||
@@ -126,6 +123,13 @@ jobs:
|
|||||||
artifactType: 'pipeline'
|
artifactType: 'pipeline'
|
||||||
artifactName: 'Coverage'
|
artifactName: 'Coverage'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
echo "##[section]Toolchain Cache"
|
||||||
|
CCACHE_DIR='$(LLVM_CCACHE_DIR)' ccache --evict-older-than 1d
|
||||||
|
|
||||||
|
echo "##[section]Serenity Cache"
|
||||||
|
CCACHE_DIR='$(SERENITY_CCACHE_DIR)' ccache --evict-older-than 1d
|
||||||
|
displayName: 'Prune obsolete ccache files'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
echo "##[section]Toolchain Cache"
|
echo "##[section]Toolchain Cache"
|
||||||
|
|||||||
@@ -293,8 +293,7 @@ pushd "$DIR/Build/clang"
|
|||||||
${link_lld:+"-DLLVM_ENABLE_LLD=ON"} \
|
${link_lld:+"-DLLVM_ENABLE_LLD=ON"} \
|
||||||
${dev:+"-DLLVM_CCACHE_BUILD=ON"} \
|
${dev:+"-DLLVM_CCACHE_BUILD=ON"} \
|
||||||
${ci:+"-DLLVM_CCACHE_BUILD=ON"} \
|
${ci:+"-DLLVM_CCACHE_BUILD=ON"} \
|
||||||
${ci:+"-DLLVM_CCACHE_DIR=$LLVM_CCACHE_DIR"} \
|
${ci:+"-DLLVM_CCACHE_DIR=$LLVM_CCACHE_DIR"}
|
||||||
${ci:+"-DLLVM_CCACHE_MAXSIZE=$LLVM_CCACHE_MAXSIZE"}
|
|
||||||
|
|
||||||
buildstep_ninja "llvm/build" ninja -j "$MAKEJOBS"
|
buildstep_ninja "llvm/build" ninja -j "$MAKEJOBS"
|
||||||
buildstep_ninja "llvm/install" ninja install/strip
|
buildstep_ninja "llvm/install" ninja install/strip
|
||||||
|
|||||||
Reference in New Issue
Block a user