mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
Merge 5412176a43 into 23da49ee5b
This commit is contained in:
commit
ca4665a81d
2 changed files with 15 additions and 3 deletions
|
|
@ -277,6 +277,11 @@ echo "::endgroup::"
|
||||||
if [[ $USE_CCACHE ]]; then
|
if [[ $USE_CCACHE ]]; then
|
||||||
if [[ $CCACHE_EVICTION_AGE ]]; then
|
if [[ $CCACHE_EVICTION_AGE ]]; then
|
||||||
echo "::group::evict ccache files older than $CCACHE_EVICTION_AGE"
|
echo "::group::evict ccache files older than $CCACHE_EVICTION_AGE"
|
||||||
|
ccache_dir=$(ccache --get-config cache_dir)
|
||||||
|
mapfile -t timestamps < <(find "$ccache_dir" -name CACHEDIR.TAG -prune -o -type f -printf '%T+\n' | sort)
|
||||||
|
filecount=${#timestamps[@]}
|
||||||
|
oldest_file=${timestamps[0]}
|
||||||
|
echo "the oldest file before deletion is from $oldest_file out of $filecount files in $ccache_dir"
|
||||||
ccache --evict-older-than "$CCACHE_EVICTION_AGE"
|
ccache --evict-older-than "$CCACHE_EVICTION_AGE"
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
13
.github/workflows/desktop-build.yml
vendored
13
.github/workflows/desktop-build.yml
vendored
|
|
@ -175,10 +175,17 @@ jobs:
|
||||||
- name: Build debug and test
|
- name: Build debug and test
|
||||||
if: matrix.test != 'skip'
|
if: matrix.test != 'skip'
|
||||||
shell: bash
|
shell: bash
|
||||||
|
env:
|
||||||
|
package: '${{matrix.package}}'
|
||||||
run: |
|
run: |
|
||||||
source .ci/docker.sh
|
source .ci/docker.sh
|
||||||
RUN --server --debug --test --ccache "$CCACHE_SIZE" \
|
args=()
|
||||||
--cmake-generator "$CMAKE_GENERATOR"
|
if [[ $GITHUB_REF == "refs/heads/master" && $package == "skip" ]]; then
|
||||||
|
args+=(--evict-ccache "$CCACHE_EVICTION_AGE")
|
||||||
|
fi
|
||||||
|
args+=(--ccache "$CCACHE_SIZE")
|
||||||
|
args+=(--cmake-generator "$CMAKE_GENERATOR")
|
||||||
|
RUN --server --debug --test "${args[@]}"
|
||||||
|
|
||||||
- name: Build release package
|
- name: Build release package
|
||||||
id: build
|
id: build
|
||||||
|
|
@ -442,6 +449,7 @@ jobs:
|
||||||
CMAKE_GENERATOR: ${{matrix.cmake_generator}}
|
CMAKE_GENERATOR: ${{matrix.cmake_generator}}
|
||||||
CMAKE_GENERATOR_PLATFORM: ${{matrix.cmake_generator_platform}}
|
CMAKE_GENERATOR_PLATFORM: ${{matrix.cmake_generator_platform}}
|
||||||
USE_CCACHE: ${{matrix.use_ccache}}
|
USE_CCACHE: ${{matrix.use_ccache}}
|
||||||
|
CCACHE_EVICTION_AGE: ${{github.ref == 'refs/heads/master' && matrix.ccache_eviction_age || ''}}
|
||||||
VCPKG_DISABLE_METRICS: 1
|
VCPKG_DISABLE_METRICS: 1
|
||||||
VCPKG_BINARY_SOURCES: 'clear;files,${{ steps.vcpkg-cache.outputs.path }},readwrite'
|
VCPKG_BINARY_SOURCES: 'clear;files,${{ steps.vcpkg-cache.outputs.path }},readwrite'
|
||||||
# macOS-specific environment variables, will be ignored on Windows
|
# macOS-specific environment variables, will be ignored on Windows
|
||||||
|
|
@ -451,7 +459,6 @@ jobs:
|
||||||
MACOS_CI_KEYCHAIN_PWD: ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}
|
MACOS_CI_KEYCHAIN_PWD: ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}
|
||||||
DEVELOPER_DIR: '/Applications/Xcode_${{matrix.xcode}}.app/Contents/Developer'
|
DEVELOPER_DIR: '/Applications/Xcode_${{matrix.xcode}}.app/Contents/Developer'
|
||||||
TARGET_MACOS_VERSION: ${{ matrix.override_target }}
|
TARGET_MACOS_VERSION: ${{ matrix.override_target }}
|
||||||
CCACHE_EVICTION_AGE: ${{ matrix.ccache_eviction_age }}
|
|
||||||
run: .ci/compile.sh --server --test --vcpkg
|
run: .ci/compile.sh --server --test --vcpkg
|
||||||
|
|
||||||
# Delete used cache to emulate a ccache update. See https://github.com/actions/cache/issues/342
|
# Delete used cache to emulate a ccache update. See https://github.com/actions/cache/issues/342
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue