From 2936f2c3f1332b7288046312a7f30e0c3511896d Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Thu, 14 Jul 2022 21:32:59 +1000 Subject: [PATCH 1/2] Build cargo-binstall in debug mode for PR Signed-off-by: Jiahao XU --- .github/workflows/build-and-integration-tests.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build-and-integration-tests.yml b/.github/workflows/build-and-integration-tests.yml index 394fc546..3121a336 100644 --- a/.github/workflows/build-and-integration-tests.yml +++ b/.github/workflows/build-and-integration-tests.yml @@ -88,11 +88,20 @@ jobs: - name: Build release uses: actions-rs/cargo@v1 + if: ${{ startsWith(github.ref, 'refs/tags/v') }} with: command: build args: --target ${{ matrix.target }} --release use-cross: ${{ matrix.use-cross }} + - name: Build debug + uses: actions-rs/cargo@v1 + if: ${{ ! startsWith(github.ref, 'refs/tags/v') }} + with: + command: build + args: --target ${{ matrix.target }} + use-cross: ${{ matrix.use-cross }} + - name: Copy and rename utility run: cp target/${{ matrix.target }}/release/${{ matrix.output }} ${{ matrix.output }} From 9f914a3c8411ed7b3b8ae846add166402e2e31ca Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Thu, 14 Jul 2022 21:41:32 +1000 Subject: [PATCH 2/2] Fix integration test: Copy from `debug` for PR Signed-off-by: Jiahao XU --- .github/workflows/build-and-integration-tests.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-and-integration-tests.yml b/.github/workflows/build-and-integration-tests.yml index 3121a336..e94bd47c 100644 --- a/.github/workflows/build-and-integration-tests.yml +++ b/.github/workflows/build-and-integration-tests.yml @@ -103,8 +103,13 @@ jobs: use-cross: ${{ matrix.use-cross }} - name: Copy and rename utility + if: ${{ startsWith(github.ref, 'refs/tags/v') }} run: cp target/${{ matrix.target }}/release/${{ matrix.output }} ${{ matrix.output }} + - name: Copy and rename utility + if: ${{ ! startsWith(github.ref, 'refs/tags/v') }} + run: cp target/${{ matrix.target }}/debug/${{ matrix.output }} ${{ matrix.output }} + - name: Test (Unix) if: ${{ matrix.test && matrix.os != 'windows-latest' }} run: ./ci-scripts/run_tests_unix.sh ${{ matrix.output }}