Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Ci fix for pulsar build production targets #287

Merged
merged 3 commits into from
Jan 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,41 @@ jobs:
build:
- 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"') }}
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 -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 }}
# 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
production_target: target/x86_64-apple-darwin/production
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-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
production_target: target/x86_64-pc-windows-msvc/production
suffix: windows-x86_64-v2-${{ github.ref_name }}
rustflags: "-C target-cpu=x86-64-v2 -C target-feature=+aes"
runs-on: ${{ matrix.build.os }}
Expand Down Expand Up @@ -115,15 +122,15 @@ jobs:

- name: Build the executable (other than aarch64 linux)
uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1
if: matrix.build.target != 'aarch64-unknown-linux-gnu' && matrix.build.os != 'macOS'
if: matrix.build.target != 'aarch64-unknown-linux-gnu' && runner.os != 'macOS'
with:
command: build
args: --locked -Z build-std --target ${{ matrix.build.target }} --profile production --bin pulsar

# TODO: get rid of this when we have bigger RAM for aarch64 linux
- name: Build the executable for aarch64 linux separately
uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1
if: matrix.build.target == 'aarch64-unknown-linux-gnu'
if: matrix.build.target == 'aarch64-unknown-linux-gnu' && runner.os == 'Linux'
with:
command: build
args: --locked -Z build-std --target ${{ matrix.build.target }} --profile aarch64linux --bin pulsar
Expand Down Expand Up @@ -179,10 +186,6 @@ jobs:
continue-on-error: ${{ github.repository_owner != 'subspace' || github.event_name != 'push' || github.ref_type != 'tag' }}
if: runner.os == 'macOS'

- name: Install AzureSignTool (Windows)
run: dotnet tool install --global AzureSignTool
if: runner.os == 'Windows'

- name: Sign Application (Windows)
run: |
AzureSignTool sign --azure-key-vault-url "${{ secrets.AZURE_KEY_VAULT_URI }}" --azure-key-vault-client-id "${{ secrets.AZURE_CLIENT_ID }}" --azure-key-vault-client-secret "${{ secrets.AZURE_CLIENT_SECRET }}" --azure-key-vault-tenant-id "${{ secrets.AZURE_TENANT_ID }}" --azure-key-vault-certificate "${{ secrets.AZURE_CERT_NAME }}" --file-digest sha512 --timestamp-rfc3161 http://timestamp.digicert.com -v "${{ matrix.build.production_target }}/pulsar.exe"
Expand Down
Loading