forked from Mudlet/Mudlet
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Infrastructre: reformat cache save action (Mudlet#7545)
<!-- Keep the title short & concise so anyone non-technical can understand it, the title appears in PTB changelogs --> #### Brief overview of PR changes/additions Reformat cache save action to use the recommended https://github.com/actions/cache/tree/main/save#always-save-cache way #### Motivation for adding to Mudlet Removing a build warning #### Other info (issues closed, discussion etc) --------- Co-authored-by: Vadim Peretokin <[email protected]>
- Loading branch information
Showing
2 changed files
with
29 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,17 +76,16 @@ jobs: | |
modules: ${{ startsWith(matrix.qt, '6') && 'qt5compat qtmultimedia' || '' }} | ||
|
||
- name: Restore Boost cache | ||
uses: actions/cache@v4 | ||
id: cache-boost | ||
id: restore-boost | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ${{env.BOOST_ROOT}} | ||
key: boost | ||
|
||
- name: Install Boost | ||
if: steps.cache-boost.outputs.cache-hit != 'true' | ||
if: steps.restore-boost.outputs.cache-hit != 'true' | ||
run: | | ||
if [ "$OS" == "Windows_NT" ]; then | ||
# fix up paths to be forward slashes consistently | ||
BOOST_ROOT=$(echo $BOOST_ROOT | sed 's/\\/\//g') | ||
fi | ||
mkdir -p $BOOST_ROOT | ||
|
@@ -97,6 +96,12 @@ jobs: | |
rm -rf boost_*/* download.tar.bz2 download.tar | ||
shell: bash | ||
|
||
- name: Save Boost cache | ||
if: steps.restore-boost.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: ${{env.BOOST_ROOT}} | ||
key: ${{ steps.restore-boost.outputs.cache-primary-key }} | ||
|
||
- name: Use CMake 3.30.3 | ||
uses: lukka/[email protected] | ||
|
@@ -256,13 +261,13 @@ jobs: | |
echo "WITH_3DMAPPER=no" >> $GITHUB_ENV | ||
echo "WITH_FONTS=no" >> $GITHUB_ENV | ||
- name: restore ccache | ||
uses: actions/cache@v4 | ||
- name: Restore ccache | ||
id: restore-ccache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ${{runner.workspace}}/ccache | ||
key: ccache-${{matrix.os}}-${{matrix.compiler}}-${{matrix.qt}}-${{ github.sha }} | ||
restore-keys: ccache-${{matrix.os}}-${{matrix.compiler}}-${{matrix.qt}} | ||
save-always: true | ||
|
||
- name: (Linux) Set build info | ||
if: runner.os == 'Linux' | ||
|
@@ -297,15 +302,20 @@ jobs: | |
cmakeListsTxtPath: '${{github.workspace}}/CMakeLists.txt' | ||
useVcpkgToolchainFile: true | ||
buildDirectory: '${{runner.workspace}}/b/ninja' | ||
# enable for a debug build (1/2) | ||
# buildWithCMakeArgs: --config RelWithDebInfo | ||
cmakeAppendedArgs: >- | ||
-G Ninja | ||
-DCMAKE_PREFIX_PATH=${{ env.QT_PREFIX != '' && env.QT_PREFIX || env.MINGW_BASE_DIR }} | ||
-DVCPKG_APPLOCAL_DEPS=OFF | ||
env: | ||
NINJA_STATUS: '[%f/%t %o/sec] ' | ||
|
||
- name: Save ccache | ||
if: always() && steps.restore-ccache.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: ${{runner.workspace}}/ccache | ||
key: ${{ steps.restore-ccache.outputs.cache-primary-key }} | ||
|
||
- name: Upload GitHub Actions artifact of vcpkg build logs | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
|
@@ -321,13 +331,6 @@ jobs: | |
working-directory: '${{runner.workspace}}/b/ninja' | ||
run: ctest --output-on-failure | ||
|
||
- name: restore Luarocks for packaging | ||
uses: actions/cache@v4 | ||
with: | ||
path: $HOME/.luarocks | ||
key: ccache-${{matrix.os}}-${{matrix.compiler}}-${{hashFiles('.github/workflows/build-mudlet.yml')}} | ||
restore-keys: ccache-${{matrix.os}}-${{matrix.compiler}}- | ||
|
||
- name: install dependencies for packaging/tests | ||
if: matrix.deploy == 'deploy' || matrix.run_tests == 'true' | ||
run: | | ||
|