[Test] bug fix for ccache and enhance printing messages
This commit is contained in:
parent
54db85c2f6
commit
955e49dca1
|
@ -108,11 +108,25 @@ jobs:
|
||||||
- name: ccache cache files
|
- name: ccache cache files
|
||||||
uses: actions/cache@v1.1.0
|
uses: actions/cache@v1.1.0
|
||||||
with:
|
with:
|
||||||
path: ${{runner.workspace}}/build/.ccache
|
path: .ccache
|
||||||
key: ${{ matrix.config.name }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
|
key: ${{ matrix.config.name }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ matrix.config.name }}-ccache-
|
${{ matrix.config.name }}-ccache-
|
||||||
|
|
||||||
|
# Set up the paths for ccache and control the size under 400MB
|
||||||
|
- name: Configure ccache
|
||||||
|
shell: cmake -P {0}
|
||||||
|
run: |
|
||||||
|
file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}" ccache_basedir)
|
||||||
|
set(ENV{CCACHE_BASEDIR} "${ccache_basedir}")
|
||||||
|
set(ENV{CCACHE_DIR} "${ccache_basedir}/.ccache")
|
||||||
|
set(ENV{CCACHE_COMPRESS} "true")
|
||||||
|
set(ENV{CCACHE_COMPRESSLEVEL} "6")
|
||||||
|
set(ENV{CCACHE_MAXSIZE} "400M")
|
||||||
|
|
||||||
|
execute_process(COMMAND ccache -p)
|
||||||
|
execute_process(COMMAND ccache -z)
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
# Use a bash shell so we can use the same syntax for environment variable
|
# Use a bash shell so we can use the same syntax for environment variable
|
||||||
# access regardless of the host operating system
|
# access regardless of the host operating system
|
||||||
|
@ -130,4 +144,7 @@ jobs:
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
shell: bash
|
shell: bash
|
||||||
# Execute the build. You can specify a specific target with "--target <NAME>"
|
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||||
run: cmake --build . --config $BUILD_TYPE
|
# Check the cache size and see if it is over the limit
|
||||||
|
run: |
|
||||||
|
cmake --build . --config $BUILD_TYPE
|
||||||
|
ccache -s
|
||||||
|
|
|
@ -104,6 +104,20 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ matrix.config.name }}-ccache-
|
${{ matrix.config.name }}-ccache-
|
||||||
|
|
||||||
|
# Set up the paths for ccache and control the size under 400MB
|
||||||
|
- name: Configure ccache
|
||||||
|
shell: cmake -P {0}
|
||||||
|
run: |
|
||||||
|
file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}" ccache_basedir)
|
||||||
|
set(ENV{CCACHE_BASEDIR} "${ccache_basedir}")
|
||||||
|
set(ENV{CCACHE_DIR} "${ccache_basedir}/.ccache")
|
||||||
|
set(ENV{CCACHE_COMPRESS} "true")
|
||||||
|
set(ENV{CCACHE_COMPRESSLEVEL} "6")
|
||||||
|
set(ENV{CCACHE_MAXSIZE} "400M")
|
||||||
|
|
||||||
|
execute_process(COMMAND ccache -p)
|
||||||
|
execute_process(COMMAND ccache -z)
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
# Use a bash shell so we can use the same syntax for environment variable
|
# Use a bash shell so we can use the same syntax for environment variable
|
||||||
# access regardless of the host operating system
|
# access regardless of the host operating system
|
||||||
|
@ -121,7 +135,9 @@ jobs:
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
shell: bash
|
shell: bash
|
||||||
# Execute the build. You can specify a specific target with "--target <NAME>"
|
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||||
run: cmake --build . --config $BUILD_TYPE
|
run: |
|
||||||
|
cmake --build . --config $BUILD_TYPE
|
||||||
|
ccache -s
|
||||||
|
|
||||||
- name: ${{matrix.config.name}}
|
- name: ${{matrix.config.name}}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
Loading…
Reference in New Issue