Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup windows arm64 builds #18

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ on:
push:
tags:
- "*"
pull_request:
name: "android"
jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ on:
push:
tags:
- "*"
pull_request:
name: "ios"
jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ on:
push:
tags:
- "*"
pull_request:
workflow_dispatch:
name: "linux"
jobs:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,25 @@ jobs:
file-name: powersync_x64.dll
tag: ${{ needs.draft_release.outputs.tag }}

publish_windows_aarch64:
name: Publish Windows aarch64
needs: [draft_release]
runs-on: windows-arm64
steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Build binary
run: bash tool/build_windows.sh aarch64

- name: Upload binary
uses: ./.github/actions/upload
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
file-name: powersync_aarch64.dll
tag: ${{ needs.draft_release.outputs.tag }}

publish_macOS:
name: Publish macOS
needs: [draft_release]
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ on:
push:
tags:
- "*"
pull_request:
workflow_dispatch:
name: "windows"
jobs:
build_windows:
Expand All @@ -22,3 +24,41 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
file-name: powersync_x64.dll
tag: ${{ github.ref_name }}

build_aarch64:
name: Building Windows aarch64
runs-on: windows-arm64
steps:
- name: Install Git
run: |
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install -y --no-progress git
echo "C:\Program Files\Git\cmd" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.MSBuildTools;includeRecommended --add Microsoft.VisualStudio.Workload.VCTools;includeRecommended --quiet" -y

- uses: actions/checkout@v3
with:
submodules: true

- name: Build binaries
run: |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression

scoop install rustup

rustup toolchain install nightly-2024-05-18-aarch64-pc-windows-msvc
rustup component add rust-src --toolchain nightly-2024-05-18-aarch64-pc-windows-msvc
rustup target add aarch64-pc-windows-msvc
cargo build -p powersync_loadable --release
mv "target/release/powersync.dll" "powersync_aarch64.dll"

- name: Upload binary
if: github.event_name == 'workflow_dispatch'
uses: ./.github/actions/upload
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
file-name: powersync_aarch64.so
tag: ${{ github.ref_name }}
Loading