index : static-web-server.git

ascending towards madness

author Jose Quintana <joseluisquintana20@gmail.com> 2022-06-26 21:12:37.0 +00:00:00
committer Jose Quintana <joseluisquintana20@gmail.com> 2022-06-26 21:12:37.0 +00:00:00
commit
a6c435e3cb1e90c629daf033e67d1554be45a1e8 [patch]
tree
7bde5f86c00749da9bac90d43e504343d9eb6d54
parent
ef7aff1dcb3e7b7cde7d14f77057a4f87c8c73ab
download
a6c435e3cb1e90c629daf033e67d1554be45a1e8.tar.gz

fix: cargo run tests & release commands on ci



Diff

 .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'