From 4297b13ed95be042a6c34bf0ec8e1d877787b433 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Fri, 10 Jun 2022 18:20:59 +1000 Subject: [PATCH] Fix testing on Windows Signed-off-by: Jiahao XU --- .github/workflows/rust.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0ab5c628..ad99d9a5 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -42,7 +42,7 @@ jobs: output: cargo-binstall.exe archive: zip use-cross: false - test: true + test: false - target: x86_64-unknown-linux-musl os: ubuntu-latest output: cargo-binstall @@ -96,8 +96,8 @@ jobs: - name: Copy and rename utility run: cp target/${{ matrix.target }}/release/${{ matrix.output }} ${{ matrix.output }} - - name: Test - if: ${{ matrix.test }} + - name: Test (Unix) + if: ${{ matrix.test && matrix.os != 'windows-latest' }} run: | set -euxo pipefail for bin in $bins; do ./${{ matrix.output }} binstall --no-confirm $bin; done @@ -105,6 +105,12 @@ jobs: env: bins: cargo-deb cargo-llvm-cov cargo-binstall + - name: Test (Windows) + if: ${{ matrix.os == 'windows-latest' }} + run: | + ./${{ matrix.output }} binstall --no-confirm cargo-binstall + ./${{ matrix.output }} binstall --manifest-path . --no-confirm cargo-binstall + - name: Create archive (tgz, linux) if: ${{ matrix.os != 'macos-latest' && matrix.os != 'windows-latest' }} run: tar -czvf cargo-binstall-${{ matrix.target }}.tgz ${{ matrix.output }}