index : static-web-server.git

ascending towards madness

author Jose Quintana <joseluisquintana20@gmail.com> 2023-03-10 20:52:56.0 +00:00:00
committer Jose Quintana <joseluisquintana20@gmail.com> 2023-03-10 20:52:56.0 +00:00:00
commit
200fce08827d47b8c23850a56dbaa4f4b8d77fd8 [patch]
tree
54594975031870dd06af63f8b9444b7ccea00615
parent
7490697a03ba734ea297b55ffa56272a196760f2
download
200fce08827d47b8c23850a56dbaa4f4b8d77fd8.tar.gz

refactor: enable cargo's sparse protocol in ci

for now until rust 1.70.0

https://blog.rust-lang.org/2023/03/09/Rust-1.68.0.html#cargos-sparse-protocol

Diff

 .cirrus.yml                   |  4 ++++
 .github/workflows/devel.yml   | 12 ++++++++++--
 .github/workflows/release.yml |  2 ++
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/.cirrus.yml b/.cirrus.yml
index a5399e7..11a7c0b 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -9,6 +9,8 @@ task:
  only_if: $CIRRUS_TAG == ''
  env:
    RUSTFLAGS: -Dwarnings
    # Cargo's sparse protocol from 1.68.0 onwards
    CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  matrix:
    - name: freebsd-amd64-test
      env:
@@ -41,6 +43,8 @@ task:
  only_if: $CIRRUS_TAG != ''
  env:
    RUSTFLAGS: -Dwarnings
    # Cargo's sparse protocol from 1.68.0 onwards
    CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
    GITHUB_TOKEN: ENCRYPTED[d1766ef328d83729917d2ffb875d64c35d1c0177edf8f32e66ec464daf5c1b7b145d65fc6c044a73fffe2235d3b38349]
  matrix:
    - name: freebsd-amd64-release
diff --git a/.github/workflows/devel.yml b/.github/workflows/devel.yml
index 6b90ace..f576574 100644
--- a/.github/workflows/devel.yml
+++ b/.github/workflows/devel.yml
@@ -14,6 +14,8 @@ jobs:
    name: test
    runs-on: ${{ matrix.os }}
    env:
      # Cargo's sparse protocol from 1.68.0 onwards
      CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
      CARGO_BIN: cargo
      # When CARGO_BIN is set to CROSS, this is set to `--target matrix.target`
      TARGET_FLAGS: ""
@@ -148,11 +150,17 @@ jobs:
        echo "SKIP_TESTS=yes" >> $GITHUB_ENV

    - name: Run tests
      shell: bash
      if: env.SKIP_TESTS == ''
      run: ${{ env.CARGO_BIN }} test --verbose ${{ env.TARGET_FLAGS }}
      run: |
        if [[ "${{ matrix.build }}" == "pinned" ]]; then unset CARGO_REGISTRIES_CRATES_IO_PROTOCOL; fi
        ${{ env.CARGO_BIN }} test --verbose ${{ env.TARGET_FLAGS }}

    - name: Run build
      run: ${{ env.CARGO_BIN }} build --verbose ${{ env.TARGET_FLAGS }}
      shell: bash
      run: |
        if [[ "${{ matrix.build }}" == "pinned" ]]; then unset CARGO_REGISTRIES_CRATES_IO_PROTOCOL; fi
        ${{ env.CARGO_BIN }} build --verbose ${{ env.TARGET_FLAGS }}

  checks:
    name: checks
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index a4ad6b0..2e3bdde 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -37,6 +37,8 @@ jobs:
    needs: ['create-release']
    runs-on: ${{ matrix.os }}
    env:
      # Cargo's sparse protocol from 1.68.0 onwards
      CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
      # For some builds, we use cross to test on 32-bit and big-endian
      # systems.
      CARGO_BIN: cargo