diff options
author | timoreo22 <timo.oreo34@gmail.com> | 2022-05-02 10:47:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-02 10:47:28 +0200 |
commit | 25d380f051d0583c086dfaab8ff6dd63f27f6503 (patch) | |
tree | b74499c9bacbfaaad77e64fe88dc29ab4566ee74 /.github/workflows | |
parent | 546d394868b03e3a7b7a83692d2346176608d27c (diff) | |
parent | 239e4adf29e1190096a82ec81a8f29ff8ebf5713 (diff) | |
download | PrismLauncher-25d380f051d0583c086dfaab8ff6dd63f27f6503.tar.gz PrismLauncher-25d380f051d0583c086dfaab8ff6dd63f27f6503.tar.bz2 PrismLauncher-25d380f051d0583c086dfaab8ff6dd63f27f6503.zip |
Merge pull request #510 from txtsd/ccache_gha
CI Speedup [1/3]: Use ccache to speed up CI builds
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/build.yml | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57c04e21..0590b348 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,6 +62,32 @@ jobs: cmake:p ninja:p qt5:p + ccache:p + + - name: Setup ccache + if: runner.os != 'Windows' && inputs.build_type == 'Debug' + uses: hendrikmuhs/ccache-action@v1.2.1 + with: + key: ${{ matrix.os }}-${{ matrix.appimage }} + + - name: Setup ccache (Windows) + if: runner.os == 'Windows' && inputs.build_type == 'Debug' + shell: msys2 {0} + run: | + ccache --set-config=cache_dir='${{ github.workspace }}\.ccache' + ccache --set-config=max_size='500M' + ccache --set-config=compression=true + ccache -p # Show config + ccache -z # Zero stats + + - name: Retrieve ccache cache (Windows) + if: runner.os == 'Windows' && inputs.build_type == 'Debug' + uses: actions/cache@v3.0.2 + with: + path: '${{ github.workspace }}\.ccache' + key: ${{ matrix.os }}-${{ matrix.msystem }} + restore-keys: | + ${{ matrix.os }}-${{ matrix.msystem }} - name: Set short version shell: bash @@ -102,18 +128,18 @@ jobs: - name: Configure CMake (macOS) if: runner.os == 'macOS' run: | - cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DQt5_DIR=/usr/local/opt/qt@5 -DCMAKE_PREFIX_PATH=/usr/local/opt/qt@5 -DLauncher_BUILD_PLATFORM=macOS -G Ninja + cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DQt5_DIR=/usr/local/opt/qt@5 -DCMAKE_PREFIX_PATH=/usr/local/opt/qt@5 -DLauncher_BUILD_PLATFORM=macOS -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -G Ninja - name: Configure CMake (Windows) if: runner.os == 'Windows' shell: msys2 {0} run: | - cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=${{ matrix.name }} -G Ninja + cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=${{ matrix.name }} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -G Ninja - name: Configure CMake (Linux) if: runner.os == 'Linux' run: | - cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=Linux -G Ninja + cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=Linux -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -G Ninja ## # BUILD |