Unverified Commit 967049e6 authored by John DiSanti's avatar John DiSanti Committed by GitHub
Browse files

Disable incremental compilation for tier 1 tests and switch caching mechanism (#916)

parent 71fef7aa
Loading
Loading
Loading
Loading
+19 −34
Original line number Diff line number Diff line
@@ -148,13 +148,12 @@ jobs:
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v2
    - uses: actions/cache@v2
    # Pinned to the commit hash of v1.3.0
    - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641
      with:
        path: |
          ~/.cargo/registry
          ~/.cargo/git
          target
        key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
        working-directory: ${{ matrix.runtime }}/rust-runtime/
        sharedKey: ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }}
        target-dir: ../target
    - uses: actions-rs/toolchain@v1
      with:
        toolchain: ${{ env.rust_version }}
@@ -236,21 +235,17 @@ jobs:
        path: artifact
    - name: untar
      run: mkdir aws-sdk && cd aws-sdk && tar -xvf ../artifact/sdk.tar
    - uses: actions/cache@v2
    # Pinned to the commit hash of v1.3.0
    - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641
      with:
        path: |
          ~/.cargo/registry
          ~/.cargo/git
          target
        key: ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }}-${{ hashFiles('**/Cargo.toml') }}
        restore-keys: |
          ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }}-
          ${{ runner.os }}-${{ env.rust_version }}-
        sharedKey: ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }}
        target-dir: ../target
    - name: Cargo Test
      run: cargo test $(cat service-with-tests)
      working-directory: aws-sdk
      env:
        RUSTC_FORCE_INCREMENTAL: 1
        # Disable incremental compilation to reduce disk space use
        CARGO_INCREMENTAL: 0
        RUSTFLAGS: -D warnings
        # Note: the .cargo/config.toml is lost because we untar the SDK rather than checking out the repo,
        # so we have to manually restore the target directory override
@@ -261,16 +256,11 @@ jobs:
    needs: generate-sdk
    runs-on: ubuntu-latest
    steps:
    - uses: actions/cache@v2
    # Pinned to the commit hash of v1.3.0
    - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641
      with:
        path: |
          ~/.cargo/registry
          ~/.cargo/git
          target
        key: ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }}-${{ hashFiles('**/Cargo.toml') }}
        restore-keys: |
          ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }}-
          ${{ runner.os }}-${{ env.rust_version }}-
        sharedKey: ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }}
        target-dir: ../target
    - uses: actions-rs/toolchain@v1
      with:
        toolchain: ${{ env.rust_version }}
@@ -300,16 +290,11 @@ jobs:
    needs: generate-sdk
    runs-on: ubuntu-latest
    steps:
    - uses: actions/cache@v2
    # Pinned to the commit hash of v1.3.0
    - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641
      with:
        path: |
          ~/.cargo/registry
          ~/.cargo/git
          target
        key: ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }}-${{ hashFiles('**/Cargo.toml') }}
        restore-keys: |
          ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }}-
          ${{ runner.os }}-${{ env.rust_version }}-
        sharedKey: ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }}
        target-dir: ../target
    - uses: actions-rs/toolchain@v1
      with:
        toolchain: ${{ env.rust_version }}