Skip to content

Commit

Permalink
Update publish workflow to support Windows ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
timokoessler committed Jan 31, 2025
1 parent 4427469 commit 8be9a2a
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 24 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,39 @@ jobs:
name: windows-binaries
path: target/x86_64-pc-windows-gnu/release/libzen_internals_*

build-windows-arm:
needs:
- tests
- lint
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install latest rust toolchain
run: |
rustup update --no-self-update stable
rustup default stable
rustup target add aarch64-pc-windows-msvc
- name: Build for windows arm
run: cargo build --release --target aarch64-pc-windows-msvc

- name: Prepare release
run: |
cd target/aarch64-pc-windows-msvc/release
FILE=libzen_internals_aarch64-pc-windows-msvc.dll
sudo mv zen_internals.dll ${FILE}
sudo touch ${FILE}.sha256sum && sudo chmod 777 ${FILE}.sha256sum
sudo sha256sum "${FILE}" > ${FILE}.sha256sum
- name: Store the .dll file and sha256sum file
uses: actions/upload-artifact@v4
with:
name: windows-binaries-arm
path: target/aarch64-pc-windows-msvc/release/libzen_internals_*

build-mac:
needs:
- tests
Expand Down Expand Up @@ -237,6 +270,7 @@ jobs:
build-windows,
build-mac,
build-mac-arm64,
build-windows-arm,
]
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -331,6 +365,31 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}

# Add Windows ARM binary and sha file to release :
- name: Download Windows ARM binaries
uses: actions/download-artifact@v4
with:
name: windows-binaries-arm
path: ./artifacts/windows-arm
- name: Upload Windows binary to Release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/windows-arm/libzen_internals_aarch64-pc-windows-msvc.dll
asset_name: libzen_internals_aarch64-pc-windows-msvc.dll
asset_content_type: application/octet-stream
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload Windows ARM binary sha256sum
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/windows-arm/libzen_internals_aarch64-pc-windows-msvc.dll.sha256sum
asset_name: libzen_internals_aarch64-pc-windows-msvc.dll.sha256sum
asset_content_type: text/plain
env:
GITHUB_TOKEN: ${{ github.token }}

# Add Mac binary and sha file to release :
- name: Download Mac OS X binaries
uses: actions/download-artifact@v4
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/windows.yml

This file was deleted.

0 comments on commit 8be9a2a

Please sign in to comment.