From 9d2a53cc7926fc472cd1bf8b5564f15608bd3495 Mon Sep 17 00:00:00 2001 From: Alexander Wagner Date: Wed, 16 Feb 2022 16:09:12 +0100 Subject: [PATCH] Use common CI patterns (#362) --- .github/actions/cross-tests/action.yml | 9 +-------- .github/workflows/sha1.yml | 11 +++-------- .github/workflows/sha2.yml | 11 +++-------- .github/workflows/sha3.yml | 11 +++-------- 4 files changed, 10 insertions(+), 32 deletions(-) diff --git a/.github/actions/cross-tests/action.yml b/.github/actions/cross-tests/action.yml index cc63225d..4ec5ab4a 100644 --- a/.github/actions/cross-tests/action.yml +++ b/.github/actions/cross-tests/action.yml @@ -20,14 +20,7 @@ runs: toolchain: ${{ inputs.rust }} target: ${{ inputs.target }} override: true - - name: Install precompiled cross - run: | - export URL=$(curl -s https://api.github.com/repos/cross-rs/cross/releases/latest | \ - jq -r '.assets[] | select(.name | contains("x86_64-unknown-linux-gnu.tar.gz")) | .browser_download_url') - wget -O /tmp/binaries.tar.gz $URL - tar -C /tmp -xzf /tmp/binaries.tar.gz - mv /tmp/cross ~/.cargo/bin - shell: bash + - uses: RustCrypto/actions/cross-install@master - run: cross test --package ${{ inputs.package }} --target ${{ inputs.target }} diff --git a/.github/workflows/sha1.yml b/.github/workflows/sha1.yml index e2852cf0..5403e3c4 100644 --- a/.github/workflows/sha1.yml +++ b/.github/workflows/sha1.yml @@ -14,19 +14,14 @@ defaults: working-directory: sha1 env: - MSRV: 1.41.0 RUSTFLAGS: "-Dwarnings" CARGO_INCREMENTAL: 0 jobs: set-msrv: - runs-on: ubuntu-latest - outputs: - msrv: ${{ steps.msrv.outputs.msrv }} - steps: - - uses: actions/checkout@v2 - - id: msrv - run: echo "::set-output name=msrv::$(echo $MSRV)" + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.41.0 # Builds for no_std platforms build: diff --git a/.github/workflows/sha2.yml b/.github/workflows/sha2.yml index 5e727dcd..9c386e54 100644 --- a/.github/workflows/sha2.yml +++ b/.github/workflows/sha2.yml @@ -14,19 +14,14 @@ defaults: working-directory: sha2 env: - MSRV: 1.41.0 RUSTFLAGS: "-Dwarnings" CARGO_INCREMENTAL: 0 jobs: set-msrv: - runs-on: ubuntu-latest - outputs: - msrv: ${{ steps.msrv.outputs.msrv }} - steps: - - uses: actions/checkout@v2 - - id: msrv - run: echo "::set-output name=msrv::$(echo $MSRV)" + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.41.0 # Builds for no_std platforms build: diff --git a/.github/workflows/sha3.yml b/.github/workflows/sha3.yml index ce17381c..f56ea35a 100644 --- a/.github/workflows/sha3.yml +++ b/.github/workflows/sha3.yml @@ -14,19 +14,14 @@ defaults: working-directory: sha3 env: - MSRV: 1.41.0 RUSTFLAGS: "-Dwarnings" CARGO_INCREMENTAL: 0 jobs: set-msrv: - runs-on: ubuntu-latest - outputs: - msrv: ${{ steps.msrv.outputs.msrv }} - steps: - - uses: actions/checkout@v2 - - id: msrv - run: echo "::set-output name=msrv::$(echo $MSRV)" + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.41.0 build: needs: set-msrv