+ runs-on: ubuntu-latest
+
+ steps:
+ # Setup
+ - uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
+ with:
+ github_token: "${{ secrets.github_token }}"
+
+ - name: rust-toolchain
+ uses: actions-rs/toolchain@v1.0.3
+ with:
+ toolchain: nightly
+ target: x86_64-unknown-linux-gnu
+ profile: minimal
+
+ - name: Checkout
+ uses: actions/checkout@v2.0.0
+
+ - name: Run cargo update
+ run: cargo update
+
+ - name: Cache cargo dir
+ uses: actions/cache@v1
+ with:
+ path: ~/.cargo
+ key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-x86_64-unknown-linux-gnu
+
+ - name: Master Toolchain Setup
+ run: bash setup-toolchain.sh
+
+ # Run
+ - name: Build Integration Test
+ run: cargo test --test integration --features integration --no-run
+
+ # Upload
+ - name: Extract Binaries
+ run: |
+ DIR=$CARGO_TARGET_DIR/debug
+ rm $DIR/deps/integration-*.d
+ mv $DIR/deps/integration-* $DIR/integration
+ find $DIR ! -executable -o -type d ! -path $DIR | xargs rm -rf
+ rm -rf $CARGO_TARGET_DIR/release
+
+ - name: Upload Binaries
+ uses: actions/upload-artifact@v1
+ with:
+ name: target
+ path: target
+
+ # Cleanup
+ - name: Run cargo-cache --autoclean
+ run: |
+ cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache
+ cargo cache
+ integration:
+ needs: integration_build