From a6c435e3cb1e90c629daf033e67d1554be45a1e8 Mon Sep 17 00:00:00 2001 From: Jose Quintana Date: Sun, 26 Jun 2022 23:12:37 +0200 Subject: [PATCH] fix: cargo run tests & release commands on ci --- .github/workflows/devel.yml | 12 ++++++------ .github/workflows/release.yml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/devel.yml b/.github/workflows/devel.yml index f56979a..efad306 100644 --- a/.github/workflows/devel.yml +++ b/.github/workflows/devel.yml @@ -12,10 +12,10 @@ jobs: name: test runs-on: ${{ matrix.os }} env: - CARGO: cargo - # When CARGO is set to CROSS, this is set to `--target matrix.target` + CARGO_BIN: cargo + # When CARGO_BIN is set to CROSS, this is set to `--target matrix.target` TARGET_FLAGS: "" - # When CARGO is set to CROSS, TARGET_DIR includes matrix.target + # When CARGO_BIN is set to CROSS, TARGET_DIR includes matrix.target TARGET_DIR: ./target # Emit backtraces on panics RUST_BACKTRACE: 1 @@ -94,15 +94,15 @@ jobs: if: matrix.target != '' run: | cargo install cross - echo "CARGO=cross" >> $GITHUB_ENV + echo "CARGO_BIN=cross" >> $GITHUB_ENV echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV - name: Run tests - run: ${{ env.CARGO }} test --verbose + run: ${{ env.CARGO_BIN }} test --verbose - name: Build static-web-server and crates - run: ${{ env.CARGO }} build --verbose + run: ${{ env.CARGO_BIN }} build --verbose checks: name: checks diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 60c262f..00382bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,10 +39,10 @@ jobs: env: # For some builds, we use cross to test on 32-bit and big-endian # systems. - CARGO: cargo - # When CARGO is set to CROSS, this is set to `--target matrix.target`. + CARGO_BIN: cargo + # When CARGO_BIN is set to CROSS, this is set to `--target matrix.target`. TARGET_FLAGS: "" - # When CARGO is set to CROSS, TARGET_DIR includes matrix.target. + # When CARGO_BIN is set to CROSS, TARGET_DIR includes matrix.target. TARGET_DIR: ./target # Emit backtraces on panics. RUST_BACKTRACE: 1 @@ -112,18 +112,18 @@ jobs: shell: bash run: | cargo install cross - echo "CARGO=cross" >> $GITHUB_ENV + echo "CARGO_BIN=cross" >> $GITHUB_ENV echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV - name: Show command used for Cargo run: | - echo "cargo command is: ${{ env.CARGO }}" + echo "cargo command is: ${{ env.CARGO_BIN }}" echo "target flag is: ${{ env.TARGET_FLAGS }}" echo "target dir is: ${{ env.TARGET_DIR }}" - name: Build release binary - run: ${{ env.CARGO }} build --verbose --release ${{ env.TARGET_FLAGS }} + run: ${{ env.CARGO_BIN }} build --verbose --release ${{ env.TARGET_FLAGS }} - name: Strip release binary (linux and macos) if: matrix.os != 'windows-2019' && matrix.build != 'linux-arm-gnueabihf' && matrix.build != 'linux-gnu-arm64' && matrix.build != 'linux-musl-arm64' -- libgit2 1.7.2