diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 83ff64b89b..687aef2440 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -18,7 +18,17 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v2 + - name: Cache LLVM and Clang + id: cache-llvm + uses: actions/cache@v3 + with: + path: ./llvm + key: llvm - uses: arduino/setup-protoc@v1 + - uses: KyleMayes/install-llvm-action@v1 + with: + version: "14.0" + cached: ${{ steps.cache-llvm.outputs.cache-hit }} - name: Install toolchain uses: actions-rs/toolchain@v1 with: @@ -30,7 +40,7 @@ jobs: - name: Cleanup disk uses: curoky/cleanup-disk-action@v2.0 with: - retain: 'rust' + retain: 'rust,llvm' - name: Execute tests uses: actions-rs/cargo@v1 with: @@ -39,7 +49,7 @@ jobs: env: RUST_BACKTRACE: 1 CARGO_INCREMENTAL: 0 - RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=unwind -Zpanic_abort_tests" + RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=unwind -Zpanic_abort_tests -Clink-arg=-fuse-ld=lld" GT_S3_BUCKET: ${{ secrets.S3_BUCKET }} GT_S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }} GT_S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index be55b6beaf..44d794871d 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -47,7 +47,17 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v2 + - name: Cache LLVM and Clang + id: cache-llvm + uses: actions/cache@v3 + with: + path: ./llvm + key: llvm - uses: arduino/setup-protoc@v1 + - uses: KyleMayes/install-llvm-action@v1 + with: + version: "14.0" + cached: ${{ steps.cache-llvm.outputs.cache-hit }} - uses: actions-rs/toolchain@v1 with: profile: minimal @@ -55,11 +65,16 @@ jobs: override: true - name: Rust Cache uses: Swatinem/rust-cache@v2.0.0 + - name: Cleanup disk + uses: curoky/cleanup-disk-action@v2.0 + with: + retain: 'rust,llvm' - uses: actions-rs/cargo@v1 with: command: test args: --workspace env: + CARGO_BUILD_RUSTFLAGS: "-C link-arg=-fuse-ld=lld" RUST_BACKTRACE: 1 GT_S3_BUCKET: ${{ secrets.S3_BUCKET }} GT_S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fbcc065ec5..3ca6a05757 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,9 +33,11 @@ jobs: uses: actions/checkout@v3 - name: Cache cargo assets + id: cache uses: actions/cache@v3 with: path: | + ./llvm ~/.cargo/bin/ ~/.cargo/registry/index/ ~/.cargo/registry/cache/ @@ -51,6 +53,11 @@ jobs: sudo cp protoc/bin/protoc /usr/local/bin/ sudo cp -r protoc/include/google /usr/local/include/ + - uses: KyleMayes/install-llvm-action@v1 + with: + version: "14.0" + cached: ${{ steps.cache.outputs.cache-hit }} + - name: Install Protoc for macos if: contains(matrix.arch, 'darwin') run: | @@ -78,6 +85,8 @@ jobs: with: command: build args: ${{ matrix.opts }} --release --locked --target ${{ matrix.arch }} + env: + CARGO_BUILD_RUSTFLAGS: "-C link-arg=-fuse-ld=lld" - name: Calculate checksum and rename binary shell: bash