diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index e68e18c..1a2d7ae 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -2,6 +2,7 @@ on: push: tags: - "*" + pull_request: name: "android" jobs: build: diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 9a0aa71..10c4b81 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -2,6 +2,7 @@ on: push: tags: - "*" + pull_request: name: "ios" jobs: build: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index c9fbc81..d802468 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -2,6 +2,7 @@ on: push: tags: - "*" + pull_request: workflow_dispatch: name: "linux" jobs: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 55b0030..331c498 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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] diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index de91986..d7e27bc 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -2,6 +2,8 @@ on: push: tags: - "*" + pull_request: + workflow_dispatch: name: "windows" jobs: build_windows: @@ -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 }}