diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 58e41ed4..4e856173 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,6 +71,12 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v4 + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + max-size: 1500M + key: linux-native + verbose: 1 - name: Build env: LLVM_VERSION: ${{needs.prepare.outputs.LLVM_VERSION}} @@ -83,7 +89,7 @@ jobs: # Skip dynamic library dependencies that might make it harder to # run the binaries on other distros (and that have little use within # llvm-mingw). - LLVM_CMAKEFLAGS="-DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_TERMINFO=OFF -DLLDB_ENABLE_PYTHON=OFF" ./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra + LLVM_CMAKEFLAGS="-DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_TERMINFO=OFF -DLLDB_ENABLE_PYTHON=OFF" COMPILER_LAUNCHER="ccache" ./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra .github/workflows/store-version.sh install/llvm-mingw/versions.txt RUN_I686=false RUN_X86_64=false ./run-tests.sh $(pwd)/install/llvm-mingw cd install @@ -106,6 +112,12 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v4 + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + max-size: 500M + key: linux-cross-aarch64 + verbose: 1 - name: Build env: LLVM_VERSION: ${{needs.prepare.outputs.LLVM_VERSION}} @@ -113,7 +125,7 @@ jobs: SOURCE_DATE_EPOCH: ${{needs.prepare.outputs.COMMIT_DATE_UNIX}} run: | sudo apt-get update && sudo apt-get install ninja-build g++-aarch64-linux-gnu - ./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra --no-runtimes --host=aarch64-linux-gnu + COMPILER_LAUNCHER="ccache" ./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra --no-runtimes --host=aarch64-linux-gnu .github/workflows/store-version.sh install/llvm-mingw/versions.txt - uses: actions/download-artifact@v4 with: @@ -190,6 +202,12 @@ jobs: runs-on: macos-14 steps: - uses: actions/checkout@v4 + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + max-size: 750M + key: macos + verbose: 1 - name: Build env: LLVM_VERSION: ${{needs.prepare.outputs.LLVM_VERSION}} @@ -204,7 +222,7 @@ jobs: # form. Therefore, autodetection will pick them up, but linking # universal binaries fails as those libraries are unavailable in the # other (arm64) architecture form. - MACOS_REDIST=1 LLVM_CMAKEFLAGS="-DLLVM_ENABLE_ZSTD=OFF -DLLDB_ENABLE_PYTHON=OFF" ./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra + MACOS_REDIST=1 LLVM_CMAKEFLAGS="-DLLVM_ENABLE_ZSTD=OFF -DLLDB_ENABLE_PYTHON=OFF" COMPILER_LAUNCHER="ccache" ./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra .github/workflows/store-version.sh install/llvm-mingw/versions.txt RUN_I686=false RUN_X86_64=false ./run-tests.sh $(pwd)/install/llvm-mingw cd install @@ -248,7 +266,14 @@ jobs: toolchain:p cmake:p ninja:p + ccache:p - uses: actions/checkout@v4 + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + max-size: 600M + key: msys2-${{matrix.sys}} + verbose: 1 - name: Build env: LLVM_VERSION: ${{needs.prepare.outputs.LLVM_VERSION}} @@ -260,7 +285,7 @@ jobs: if [ "${{matrix.sys}}" = "mingw64" ]; then ARGS="--disable-dylib" fi - ./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra --disable-lldb $ARGS + COMPILER_LAUNCHER="ccache" ./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra --disable-lldb $ARGS .github/workflows/store-version.sh install/llvm-mingw/versions.txt ./copy-msys-dependencies.sh $(pwd)/install/llvm-mingw ${{matrix.sys}} ./run-tests.sh $(pwd)/install/llvm-mingw @@ -301,6 +326,12 @@ jobs: sudo mv llvm-mingw* /opt/llvm-mingw echo /opt/llvm-mingw/bin >> $GITHUB_PATH - uses: actions/checkout@v4 + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + max-size: 800M + key: linux-cross-windows-${{matrix.arch}} + verbose: 1 - name: Build env: LLVM_VERSION: ${{needs.prepare.outputs.LLVM_VERSION}} @@ -311,7 +342,7 @@ jobs: BUILD_DATE: ${{needs.prepare.outputs.BUILD_DATE}} run: | sudo apt-get update && sudo apt-get install autoconf-archive ninja-build - ./build-cross-tools.sh /opt/llvm-mingw $(pwd)/install/llvm-mingw ${{matrix.arch}} --with-python + COMPILER_LAUNCHER="ccache" CCACHE_COMPILERCHECK="%compiler% -v" ./build-cross-tools.sh /opt/llvm-mingw $(pwd)/install/llvm-mingw ${{matrix.arch}} --with-python .github/workflows/store-version.sh install/llvm-mingw/versions.txt cd install NAME=llvm-mingw-$TAG-${{matrix.crt}}-${{matrix.arch}}