From cf7d55f25fb6cf9b676826faabac9dc0c6020282 Mon Sep 17 00:00:00 2001 From: DaMandal0rian <3614052+DaMandal0rian@users.noreply.github.com> Date: Tue, 16 Jan 2024 18:33:51 +0300 Subject: [PATCH] Update release.yml --- .github/workflows/ci-tests.yml | 68 ++-------------------------------- .github/workflows/release.yml | 46 +++++++++++------------ 2 files changed, 25 insertions(+), 89 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index f67e632f..7f197017 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -16,6 +16,8 @@ on: required: true default: false type: boolean + merge_group: + types: [checks_requested] env: # Not needed in CI, should make things a bit faster @@ -32,39 +34,7 @@ jobs: strategy: fail-fast: false matrix: - build: - - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "ubuntu-20.04-x86-64"]' || '"ubuntu-20.04"') }} - target: x86_64-unknown-linux-gnu - suffix: ubuntu-x86_64-skylake-${{ github.ref_name }} - rustflags: "-C target-cpu=skylake" - - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "ubuntu-20.04-x86-64"]' || '"ubuntu-20.04"') }} - target: x86_64-unknown-linux-gnu - suffix: ubuntu-x86_64-v2-${{ github.ref_name }} - rustflags: "-C target-cpu=x86-64-v2 -C target-feature=+aes" - - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "ubuntu-20.04-x86-64"]' || '"ubuntu-20.04"') }} - target: aarch64-unknown-linux-gnu - suffix: ubuntu-aarch64-${{ github.ref_name }} - # TODO: AES flag is such that we have decent performance on ARMv8, remove once `aes` crate bumps MSRV to - # at least 1.61: https://github.com/RustCrypto/block-ciphers/issues/373 - rustflags: "-C linker=aarch64-linux-gnu-gcc --cfg aes_armv8" - - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "macos-12-arm64"]' || '"macos-12"') }} - target: aarch64-apple-darwin - suffix: macos-aarch64-${{ github.ref_name }} - # TODO: AES flag is such that we have decent performance on ARMv8, remove once `aes` crate bumps MSRV to - # at least 1.61: https://github.com/RustCrypto/block-ciphers/issues/373 - rustflags: "--cfg aes_armv8" - - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "macos-12-arm64"]' || '"macos-12"') }} - target: x86_64-apple-darwin - suffix: macos-x86_64-${{ github.ref_name }} - rustflags: "" - - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "windows-server-2022-x86-64"]' || '"windows-2022"') }} - target: x86_64-pc-windows-msvc - suffix: windows-x86_64-skylake-${{ github.ref_name }} - rustflags: "-C target-cpu=skylake" - - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "windows-server-2022-x86-64"]' || '"windows-2022"') }} - target: x86_64-pc-windows-msvc - suffix: windows-x86_64-v2-${{ github.ref_name }} - rustflags: "-C target-cpu=x86-64-v2 -C target-feature=+aes" + os: ${{ fromJson(github.repository_owner == 'subspace' && '[["self-hosted", "ubuntu-20.04-x86-64"], ["self-hosted", "macos-12-arm64"], ["self-hosted", "windows-server-2022-x86-64"]]' || '["ubuntu-20.04", "macos-12", "windows-2022"]') }} run-all: - ${{ inputs.test-macos-and-windows == true || github.ref == 'refs/heads/main' }} exclude: # exclude macos-12 and windows-2022 when the condition is false @@ -73,7 +43,7 @@ jobs: - run-all: false os: windows-2022 - runs-on: ${{ matrix.build.os }} + runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0 @@ -102,36 +72,6 @@ jobs: # May not exist on self-hosted runners continue-on-error: true - - name: AArch64 cross-compile packages - run: | - FLAVOR="$(lsb_release -sc)" - - sudo tee /etc/apt/sources.list.d/arm64.list <> $GITHUB_ENV - if: matrix.build.target == 'aarch64-unknown-linux-gnu' - - name: cargo fmt uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f6117f1c..a2858d44 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,42 +17,38 @@ jobs: strategy: matrix: build: - - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "ubuntu-20.04-x86-64"]' || 'ubuntu-20.04') }} + - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "ubuntu-20.04-x86-64"]' || '"ubuntu-20.04"') }} target: x86_64-unknown-linux-gnu - production_target: target/x86_64-unknown-linux-gnu/production - suffix: ubuntu-x86_64-v2-${{ github.ref_name }} - rustflags: "-C target-cpu=x86-64-v2" - - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "ubuntu-20.04-x86-64"]' || 'ubuntu-20.04') }} - target: x86_64-unknown-linux-gnu - production_target: target/x86_64-unknown-linux-gnu/production suffix: ubuntu-x86_64-skylake-${{ github.ref_name }} rustflags: "-C target-cpu=skylake" - - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "ubuntu-20.04-x86-64"]' || 'ubuntu-20.04') }} + - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "ubuntu-20.04-x86-64"]' || '"ubuntu-20.04"') }} + target: x86_64-unknown-linux-gnu + suffix: ubuntu-x86_64-v2-${{ github.ref_name }} + rustflags: "-C target-cpu=x86-64-v2 -C target-feature=+aes" + - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "ubuntu-20.04-x86-64"]' || '"ubuntu-20.04"') }} target: aarch64-unknown-linux-gnu - production_target: target/aarch64-unknown-linux-gnu/aarch64linux suffix: ubuntu-aarch64-${{ github.ref_name }} - rustflags: "-C linker=aarch64-linux-gnu-gcc" - - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "macos-12-arm64"]' || 'macos-12') }} - target: x86_64-apple-darwin - production_target: target/x86_64-apple-darwin/production - suffix: macos-x86_64-${{ github.ref_name }} - rustflags: "" - - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "macos-12-arm64"]' || 'macos-12') }} + # TODO: AES flag is such that we have decent performance on ARMv8, remove once `aes` crate bumps MSRV to + # at least 1.61: https://github.com/RustCrypto/block-ciphers/issues/373 + rustflags: "-C linker=aarch64-linux-gnu-gcc --cfg aes_armv8" + - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "macos-12-arm64"]' || '"macos-12"') }} target: aarch64-apple-darwin - production_target: target/aarch64-apple-darwin/production suffix: macos-aarch64-${{ github.ref_name }} + # TODO: AES flag is such that we have decent performance on ARMv8, remove once `aes` crate bumps MSRV to + # at least 1.61: https://github.com/RustCrypto/block-ciphers/issues/373 + rustflags: "--cfg aes_armv8" + - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "macos-12-arm64"]' || '"macos-12"') }} + target: x86_64-apple-darwin + suffix: macos-x86_64-${{ github.ref_name }} rustflags: "" - - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "windows-server-2022-x86-64"]' || 'windows-2022') }} - target: x86_64-pc-windows-msvc - production_target: target/x86_64-pc-windows-msvc/production - suffix: windows-x86_64-v2-${{ github.ref_name }} - rustflags: "-C target-cpu=x86-64-v2" - - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "windows-server-2022-x86-64"]' || 'windows-2022') }} + - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "windows-server-2022-x86-64"]' || '"windows-2022"') }} target: x86_64-pc-windows-msvc - production_target: target/x86_64-pc-windows-msvc/production suffix: windows-x86_64-skylake-${{ github.ref_name }} rustflags: "-C target-cpu=skylake" - + - os: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "windows-server-2022-x86-64"]' || '"windows-2022"') }} + target: x86_64-pc-windows-msvc + suffix: windows-x86_64-v2-${{ github.ref_name }} + rustflags: "-C target-cpu=x86-64-v2 -C target-feature=+aes" runs-on: ${{ matrix.build.os }} env: