diff --git a/.github/workflows/linux-qt5.yml b/.github/workflows/linux-qt5.yml index e5a6c26c9..042daecf4 100644 --- a/.github/workflows/linux-qt5.yml +++ b/.github/workflows/linux-qt5.yml @@ -177,10 +177,10 @@ jobs: run: | sudo apt update - - name: apt install ${{ join(matrix.compiler.apt, ', ') }}, and Qt 5.15.3 base + - name: apt install ${{ join(matrix.compiler.apt, ', ') }}, Qt 5.15.3 base, and ccache run: >- sudo apt install --yes ${{ join(matrix.compiler.apt, ' ') }} - qtbase5-dev libqt5sql5-mysql libqt5sql5-sqlite libqt5sql5-psql + qtbase5-dev libqt5sql5-mysql libqt5sql5-sqlite libqt5sql5-psql ccache # No need to use lukka/get-cmake, these images always have latest version - name: Ninja install latest version @@ -188,59 +188,6 @@ jobs: with: destination: ${{ env.TinyRunnerWorkPath }}/ninja-build - - name: Ccache initialize download - id: downloads-initialize-ccache - run: | - filename=$(basename "$URL_CCACHE_LINUX_X64") - echo "Filename=$filename" >> $GITHUB_OUTPUT - - filepath="${{ runner.temp }}/$filename" - echo "Filepath=$filepath" >> $GITHUB_OUTPUT - - hash=$(wget "$URL_CACHE_HASH_LINUX" -O- --no-verbose --quiet) - echo "Hash=$hash" >> $GITHUB_OUTPUT - env: - URL_CACHE_HASH_LINUX: ${{ secrets.URL_CACHE_HASH_LINUX }} - URL_CCACHE_LINUX_X64: ${{ secrets.URL_CCACHE_LINUX_X64 }} - - - name: Ccache restore cache (download) - uses: actions/cache@v3 - id: downloads-cache-ccache - with: - path: ${{ env.archive_filepath }} - key: ${{ runner.os }}-caches-${{ env.cache_name }}-${{ env.cache_hash }} - env: - archive_filepath: ${{ steps.downloads-initialize-ccache.outputs.Filepath }} - cache_hash: ${{ steps.downloads-initialize-ccache.outputs.Hash }} - cache_name: ccache - - - name: Ccache download - if: steps.downloads-cache-ccache.outputs.cache-hit != 'true' - run: | - wget "$URL_CCACHE_LINUX_X64" --output-document="$archive_filepath" --no-verbose - env: - archive_filepath: ${{ steps.downloads-initialize-ccache.outputs.Filepath }} - URL_CCACHE_LINUX_X64: ${{ secrets.URL_CCACHE_LINUX_X64 }} - - - name: Ccache install - run: | - echo '::group::Extract archive' - tar xJvf "$archive_filepath" --directory '${{ runner.temp }}' - echo '::endgroup::' - - echo '::group::Install' - extractedFolder=$(basename --suffix='.tar.xz' "$archive_filename") - cd "${{ runner.temp }}/$extractedFolder" - sudo make install - echo '::endgroup::' - - echo '::group::Print version' - ccache --version - echo '::endgroup::' - env: - archive_filename: ${{ steps.downloads-initialize-ccache.outputs.Filename }} - archive_filepath: ${{ steps.downloads-initialize-ccache.outputs.Filepath }} - - name: Ccache initialize id: ccache-initialize-cache run: | @@ -304,7 +251,7 @@ jobs: -S . -B ../TinyORM-builds-cmake/build-${{ matrix.compiler.key }}-cmake-debug -G Ninja - -D CMAKE_CXX_COMPILER_LAUNCHER:FILEPATH=/usr/local/bin/ccache + -D CMAKE_CXX_COMPILER_LAUNCHER:FILEPATH=ccache -D CMAKE_CXX_COMPILER:FILEPATH=${{ matrix.compiler.command }} -D CMAKE_TOOLCHAIN_FILE:FILEPATH="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -D CMAKE_DISABLE_PRECOMPILE_HEADERS:BOOL=ON diff --git a/.github/workflows/linux-qt6.yml b/.github/workflows/linux-qt6.yml index a80fced35..8783c274f 100644 --- a/.github/workflows/linux-qt6.yml +++ b/.github/workflows/linux-qt6.yml @@ -537,10 +537,10 @@ jobs: run: | sudo apt update - - name: apt install ${{ join(matrix.compiler.apt, ', ') }}, and Qt 6.2.4 base + - name: apt install ${{ join(matrix.compiler.apt, ', ') }}, Qt 6.2.4 base, and ccache run: >- sudo apt install --yes ${{ join(matrix.compiler.apt, ' ') }} - qt6-base-dev libqt6sql6-mysql libqt6sql6-sqlite libqt6sql6-psql + qt6-base-dev libqt6sql6-mysql libqt6sql6-sqlite libqt6sql6-psql ccache # No need to use lukka/get-cmake, these images always have latest version - name: Ninja install latest version @@ -548,59 +548,6 @@ jobs: with: destination: ${{ env.TinyRunnerWorkPath }}/ninja-build - - name: Ccache initialize download - id: downloads-initialize-ccache - run: | - filename=$(basename "$URL_CCACHE_LINUX_X64") - echo "Filename=$filename" >> $GITHUB_OUTPUT - - filepath="${{ runner.temp }}/$filename" - echo "Filepath=$filepath" >> $GITHUB_OUTPUT - - hash=$(wget "$URL_CACHE_HASH_LINUX" -O- --no-verbose --quiet) - echo "Hash=$hash" >> $GITHUB_OUTPUT - env: - URL_CACHE_HASH_LINUX: ${{ secrets.URL_CACHE_HASH_LINUX }} - URL_CCACHE_LINUX_X64: ${{ secrets.URL_CCACHE_LINUX_X64 }} - - - name: Ccache restore cache (download) - uses: actions/cache@v3 - id: downloads-cache-ccache - with: - path: ${{ env.archive_filepath }} - key: ${{ runner.os }}-caches-${{ env.cache_name }}-${{ env.cache_hash }} - env: - archive_filepath: ${{ steps.downloads-initialize-ccache.outputs.Filepath }} - cache_hash: ${{ steps.downloads-initialize-ccache.outputs.Hash }} - cache_name: ccache - - - name: Ccache download - if: steps.downloads-cache-ccache.outputs.cache-hit != 'true' - run: | - wget "$URL_CCACHE_LINUX_X64" --output-document="$archive_filepath" --no-verbose - env: - archive_filepath: ${{ steps.downloads-initialize-ccache.outputs.Filepath }} - URL_CCACHE_LINUX_X64: ${{ secrets.URL_CCACHE_LINUX_X64 }} - - - name: Ccache install - run: | - echo '::group::Extract archive' - tar xJvf "$archive_filepath" --directory '${{ runner.temp }}' - echo '::endgroup::' - - echo '::group::Install' - extractedFolder=$(basename --suffix='.tar.xz' "$archive_filename") - cd "${{ runner.temp }}/$extractedFolder" - sudo make install - echo '::endgroup::' - - echo '::group::Print version' - ccache --version - echo '::endgroup::' - env: - archive_filename: ${{ steps.downloads-initialize-ccache.outputs.Filename }} - archive_filepath: ${{ steps.downloads-initialize-ccache.outputs.Filepath }} - - name: Ccache initialize id: ccache-initialize-cache run: | @@ -663,7 +610,7 @@ jobs: -S . -B ../TinyORM-builds-cmake/build-${{ matrix.compiler.key }}-cmake-debug -G Ninja - -D CMAKE_CXX_COMPILER_LAUNCHER:FILEPATH=/usr/local/bin/ccache + -D CMAKE_CXX_COMPILER_LAUNCHER:FILEPATH=ccache -D CMAKE_CXX_COMPILER:FILEPATH=${{ matrix.compiler.command }} -D CMAKE_TOOLCHAIN_FILE:FILEPATH="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -D CMAKE_DISABLE_PRECOMPILE_HEADERS:BOOL=ON diff --git a/.github/workflows/vcpkg-linux.yml b/.github/workflows/vcpkg-linux.yml index abd30d0ec..7bddee3aa 100644 --- a/.github/workflows/vcpkg-linux.yml +++ b/.github/workflows/vcpkg-linux.yml @@ -95,10 +95,10 @@ jobs: run: | sudo apt update - - name: apt install g++-12 + - name: apt install g++-12 and ccache if: env.TinyIsSelfHostedRunner == 'false' run: | - sudo apt install --yes g++-12 + sudo apt install --yes g++-12 ccache # Qt5 build dependencies: https://wiki.qt.io/Building_Qt_5_from_Git - name: apt install Qt5 build dependencies @@ -315,7 +315,7 @@ jobs: - name: apt install Qt v${{ matrix.qt.version }} base (${{ join(matrix.compiler.apt, ', ') }}) if: env.TinyIsSelfHostedRunner == 'false' run: | - sudo apt install --yes ${{ join(matrix.qt.apt, ' ') }} + sudo apt install --yes ${{ join(matrix.qt.apt, ' ') }} ccache # Prepare ccache # @@ -330,62 +330,6 @@ jobs: ccacheDirPath=$(realpath '${{ runner.workspace }}/ccache') echo "CCACHE_DIR=$ccacheDirPath" >> $GITHUB_ENV - - name: Ccache initialize download - if: env.TinyIsSelfHostedRunner == 'false' - id: downloads-initialize-ccache - run: | - filename=$(basename "$URL_CCACHE_LINUX_X64") - echo "Filename=$filename" >> $GITHUB_OUTPUT - - filepath="${{ runner.temp }}/$filename" - echo "Filepath=$filepath" >> $GITHUB_OUTPUT - - hash=$(wget "$URL_CACHE_HASH_LINUX" -O- --no-verbose --quiet) - echo "Hash=$hash" >> $GITHUB_OUTPUT - env: - URL_CACHE_HASH_LINUX: ${{ secrets.URL_CACHE_HASH_LINUX }} - URL_CCACHE_LINUX_X64: ${{ secrets.URL_CCACHE_LINUX_X64 }} - - - name: Ccache restore cache (download) - if: env.TinyIsSelfHostedRunner == 'false' - uses: actions/cache@v3 - id: downloads-cache-ccache - with: - path: ${{ env.archive_filepath }} - key: ${{ runner.os }}-caches-${{ env.cache_name }}-${{ env.cache_hash }} - env: - archive_filepath: ${{ steps.downloads-initialize-ccache.outputs.Filepath }} - cache_hash: ${{ steps.downloads-initialize-ccache.outputs.Hash }} - cache_name: ccache - - - name: Ccache download - if: env.TinyIsSelfHostedRunner == 'false' && steps.downloads-cache-ccache.outputs.cache-hit != 'true' - run: | - wget "$URL_CCACHE_LINUX_X64" --output-document="$archive_filepath" --no-verbose - env: - archive_filepath: ${{ steps.downloads-initialize-ccache.outputs.Filepath }} - URL_CCACHE_LINUX_X64: ${{ secrets.URL_CCACHE_LINUX_X64 }} - - - name: Ccache install - if: env.TinyIsSelfHostedRunner == 'false' - run: | - echo '::group::Extract archive' - tar xJvf "$archive_filepath" --directory '${{ runner.temp }}' - echo '::endgroup::' - - echo '::group::Install' - extractedFolder=$(basename --suffix='.tar.xz' "$archive_filename") - cd "${{ runner.temp }}/$extractedFolder" - sudo make install - echo '::endgroup::' - - echo '::group::Print version' - ccache --version - echo '::endgroup::' - env: - archive_filename: ${{ steps.downloads-initialize-ccache.outputs.Filename }} - archive_filepath: ${{ steps.downloads-initialize-ccache.outputs.Filepath }} - - name: Ccache initialize if: env.TinyIsSelfHostedRunner == 'false' id: ccache-initialize-cache