From 1cbc6093a64c4a774cdb86e711085944ccedffe7 Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Thu, 8 Aug 2024 11:04:12 +0200 Subject: [PATCH 01/24] Setup windows arm builds --- .github/workflows/release.yml | 19 +++++++++++++++++++ .github/workflows/windows.yml | 25 +++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 55b0030..298c62e 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-latest + 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..afde0c6 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -22,3 +22,28 @@ 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: + - uses: actions/checkout@v3 + with: + submodules: true + + - name: Install Rust Nightly + uses: dtolnay/rust-toolchain@stable + with: + toolchain: nightly-2024-05-18 + components: rust-src + + - name: Build binaries + run: bash tool/build_windows.sh aarch64 + + - 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 }} From e86c955e3d5c0b91105f9c44c8f8bcff7ee4ee2d Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Thu, 8 Aug 2024 11:05:50 +0200 Subject: [PATCH 02/24] Fix windows arm64 runner type --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 298c62e..331c498 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -183,7 +183,7 @@ jobs: publish_windows_aarch64: name: Publish Windows aarch64 needs: [draft_release] - runs-on: windows-latest + runs-on: windows-arm64 steps: - uses: actions/checkout@v3 with: From a97b8d5b9770d3e618e2be45849a00501419caa8 Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Thu, 8 Aug 2024 11:15:59 +0200 Subject: [PATCH 03/24] Test on windows and test build on pull request --- .github/workflows/android.yml | 1 + .github/workflows/ios.yml | 1 + .github/workflows/linux.yml | 1 + .github/workflows/tests.yml | 1 + .github/workflows/windows.yml | 2 ++ 5 files changed, 6 insertions(+) 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/tests.yml b/.github/workflows/tests.yml index 3a9f98f..ff8cf25 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,6 +11,7 @@ jobs: include: - os: ubuntu-latest - os: macos-latest + - os: windows-latest steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index afde0c6..a2d1f00 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: From 5908bfcb96abb1c23090139ae4128fdeefaa07bb Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Thu, 8 Aug 2024 12:45:36 +0200 Subject: [PATCH 04/24] Remove windows test --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ff8cf25..3a9f98f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,6 @@ jobs: include: - os: ubuntu-latest - os: macos-latest - - os: windows-latest steps: - uses: actions/checkout@v3 with: From c637eeded5320a66c5b460ca17345bf1c9ec9660 Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 09:59:28 +0200 Subject: [PATCH 05/24] Test workaround for submodules --- .github/workflows/windows.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index a2d1f00..1ced30a 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -30,8 +30,10 @@ jobs: runs-on: windows-arm64 steps: - uses: actions/checkout@v3 - with: - submodules: true + + - name: Checkout submodules + run: | + git submodule update --init --recursive - name: Install Rust Nightly uses: dtolnay/rust-toolchain@stable From 8d3d971f3e6bd383e4d79f60bf1b9157e3219985 Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 10:20:11 +0200 Subject: [PATCH 06/24] Test install git --- .github/workflows/windows.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 1ced30a..dfe3e15 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -29,6 +29,14 @@ jobs: 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 + - uses: actions/checkout@v3 - name: Checkout submodules From d3b2a89959cf370848c2d234a569ca6bded2a3c4 Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 13:06:03 +0200 Subject: [PATCH 07/24] Test installing rustup --- .github/workflows/windows.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index dfe3e15..236a334 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -38,16 +38,13 @@ jobs: echo "C:\Program Files\Git\cmd" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - uses: actions/checkout@v3 + with: + submodules: true - - name: Checkout submodules + - name: Setup run: | - git submodule update --init --recursive - - - name: Install Rust Nightly - uses: dtolnay/rust-toolchain@stable - with: - toolchain: nightly-2024-05-18 - components: rust-src + 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 - name: Build binaries run: bash tool/build_windows.sh aarch64 From 0f9aa88de2cf377997c89b43d0cd93539e52367d Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 13:09:14 +0200 Subject: [PATCH 08/24] Test building windows arm --- .github/workflows/windows.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 236a334..d2ed045 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -41,10 +41,10 @@ jobs: with: submodules: true - - name: Setup - run: | - 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 + # - name: Setup + # run: | + # 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 - name: Build binaries run: bash tool/build_windows.sh aarch64 From 3f976515ab309cb147dfd0c6863bfb606c250ee9 Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 13:20:08 +0200 Subject: [PATCH 09/24] Specify bash shell --- .github/workflows/windows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d2ed045..1572ea7 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -48,6 +48,7 @@ jobs: - name: Build binaries run: bash tool/build_windows.sh aarch64 + shell: bash - name: Upload binary if: github.event_name == 'workflow_dispatch' From 22aa47794d9f7bd13cdb6262417f903290fee829 Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 14:39:21 +0200 Subject: [PATCH 10/24] Install rustup using choco --- .github/workflows/windows.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 1572ea7..9bf50d8 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -41,14 +41,14 @@ jobs: with: submodules: true - # - name: Setup - # run: | - # 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 + - name: Install Rust + run: | + choco install -y --no-progress rustup.install + 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 - name: Build binaries - run: bash tool/build_windows.sh aarch64 - shell: bash + run: sh tool/build_windows.sh aarch64 - name: Upload binary if: github.event_name == 'workflow_dispatch' From 7bf69d965720c16bac5f8646cc2d0ee5fcca019e Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 14:42:37 +0200 Subject: [PATCH 11/24] Fix choco install --- .github/workflows/windows.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 9bf50d8..b674b44 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -36,17 +36,14 @@ jobs: 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 -y --no-progress rustup.install + 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 - uses: actions/checkout@v3 with: submodules: true - - name: Install Rust - run: | - choco install -y --no-progress rustup.install - 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 - - name: Build binaries run: sh tool/build_windows.sh aarch64 From 2a511361b82601e525f5268cae09636a8f1394a2 Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 14:52:56 +0200 Subject: [PATCH 12/24] Refresh environment variables --- .github/workflows/windows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index b674b44..e48b179 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -37,6 +37,7 @@ jobs: choco install -y --no-progress git echo "C:\Program Files\Git\cmd" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append choco install -y --no-progress rustup.install + refreshenv 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 From 90dea30b067f85fd5498ad53874497a18ab8e288 Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 14:57:55 +0200 Subject: [PATCH 13/24] Refresh env in same session --- .github/workflows/windows.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index e48b179..8dc338e 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -37,7 +37,11 @@ jobs: choco install -y --no-progress git echo "C:\Program Files\Git\cmd" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append choco install -y --no-progress rustup.install + + $env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.." + Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" refreshenv + 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 From 3ef734488c56aa4d1e7db464875409f05a23bb0d Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 15:04:54 +0200 Subject: [PATCH 14/24] Build binaries with powershell --- .github/workflows/windows.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 8dc338e..c68c16f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -50,7 +50,10 @@ jobs: submodules: true - name: Build binaries - run: sh tool/build_windows.sh aarch64 + run: | + 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' From 0059d21b9b6b0ac9e2c47a745cc13e0d51be6ad5 Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 19:35:39 +0200 Subject: [PATCH 15/24] Test rust build --- .github/workflows/windows.yml | 19 ++++++++++--------- tool/install_choco.ps1 | 3 +++ 2 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 tool/install_choco.ps1 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c68c16f..3ba0963 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -30,12 +30,19 @@ jobs: runs-on: windows-arm64 steps: - name: Install Git + shell: pwsh 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')) + .\tool\install_choco.ps1 choco install -y --no-progress git echo "C:\Program Files\Git\cmd" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + + - uses: actions/checkout@v3 + with: + submodules: true + + - name: Build binaries + run: | + .\tool\install_choco.ps1 choco install -y --no-progress rustup.install $env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.." @@ -45,12 +52,6 @@ jobs: 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 - - uses: actions/checkout@v3 - with: - submodules: true - - - name: Build binaries - run: | rustup target add aarch64-pc-windows-msvc cargo build -p powersync_loadable --release mv "target/release/powersync.dll" "powersync_aarch64.dll" diff --git a/tool/install_choco.ps1 b/tool/install_choco.ps1 new file mode 100644 index 0000000..ee4193d --- /dev/null +++ b/tool/install_choco.ps1 @@ -0,0 +1,3 @@ +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')) \ No newline at end of file From 1b4ef8e53966b022a4fd795829d5f7b0a8ac6d7b Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 19:37:12 +0200 Subject: [PATCH 16/24] Remove shell cmd --- .github/workflows/windows.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 3ba0963..f1a4ca9 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -30,7 +30,6 @@ jobs: runs-on: windows-arm64 steps: - name: Install Git - shell: pwsh run: | .\tool\install_choco.ps1 choco install -y --no-progress git From 93b6c0a7fc0b1bb32a17fe7f273b4270e9afbb39 Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 19:49:51 +0200 Subject: [PATCH 17/24] Setup choco --- .github/workflows/windows.yml | 8 ++++++-- tool/install_choco.ps1 | 3 --- 2 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 tool/install_choco.ps1 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f1a4ca9..7fcab2c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -31,7 +31,9 @@ jobs: steps: - name: Install Git run: | - .\tool\install_choco.ps1 + 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 @@ -41,7 +43,9 @@ jobs: - name: Build binaries run: | - .\tool\install_choco.ps1 + 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 rustup.install $env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.." diff --git a/tool/install_choco.ps1 b/tool/install_choco.ps1 deleted file mode 100644 index ee4193d..0000000 --- a/tool/install_choco.ps1 +++ /dev/null @@ -1,3 +0,0 @@ -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')) \ No newline at end of file From 64c21d23b8c3a3a5fb95a74dc0ad2a18e076e53a Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 20:04:30 +0200 Subject: [PATCH 18/24] Test choco rustup --- .github/workflows/windows.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 7fcab2c..d565f40 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -43,10 +43,8 @@ jobs: - name: Build binaries 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 rustup.install + $env:ChocolatelyInstall + C:\ProgramData\chocolatey\choco.exe install -y --no-progress rustup.install $env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.." Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" From 8b9a08359878fd0b19b8a00b897c9137bf560d45 Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 20:09:42 +0200 Subject: [PATCH 19/24] Test build rust --- .github/workflows/windows.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d565f40..97537c5 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -46,8 +46,6 @@ jobs: $env:ChocolatelyInstall C:\ProgramData\chocolatey\choco.exe install -y --no-progress rustup.install - $env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.." - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" refreshenv rustup toolchain install nightly-2024-05-18-aarch64-pc-windows-msvc From 6dfaec05cab7ed4a5ecf3a6e80e72aa8429bc2ac Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 20:14:23 +0200 Subject: [PATCH 20/24] Remove refresh env cmd --- .github/workflows/windows.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 97537c5..2312efb 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -43,11 +43,8 @@ jobs: - name: Build binaries run: | - $env:ChocolatelyInstall C:\ProgramData\chocolatey\choco.exe install -y --no-progress rustup.install - refreshenv - 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 From f8b07cca57c6fed4b018eb61cd99fddcf71bdb3b Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 20:21:54 +0200 Subject: [PATCH 21/24] Test refresh env absolute path --- .github/workflows/windows.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 2312efb..ae6c507 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -45,6 +45,10 @@ jobs: run: | C:\ProgramData\chocolatey\choco.exe install -y --no-progress rustup.install + $env:ChocolateyInstall = Convert-Path "$((Get-Command C:\ProgramData\chocolatey\choco.exe).Path)\..\.." + Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" + refreshenv + 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 From 2996bf2118a716160c0d71c05d4138b288b998a1 Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 20:28:42 +0200 Subject: [PATCH 22/24] Use scoop instead of choco --- .github/workflows/windows.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ae6c507..3f96c0a 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -43,15 +43,13 @@ jobs: - name: Build binaries run: | - C:\ProgramData\chocolatey\choco.exe install -y --no-progress rustup.install + Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser + Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression - $env:ChocolateyInstall = Convert-Path "$((Get-Command C:\ProgramData\chocolatey\choco.exe).Path)\..\.." - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" - refreshenv + 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" From 9cd8f4eabb8c69d8439761f0ee00be1f6ab97a4a Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 20:41:44 +0200 Subject: [PATCH 23/24] Install vs build tools --- .github/workflows/windows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 3f96c0a..00bf812 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -36,6 +36,7 @@ jobs: 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 -y --no-progress visualstudio2022buildtools - uses: actions/checkout@v3 with: From 30f77951a57a25879cebb50089771c64dc47eb88 Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Mon, 19 Aug 2024 20:53:45 +0200 Subject: [PATCH 24/24] Build tools workloads --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 00bf812..d7e27bc 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -36,7 +36,7 @@ jobs: 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 -y --no-progress visualstudio2022buildtools + choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.MSBuildTools;includeRecommended --add Microsoft.VisualStudio.Workload.VCTools;includeRecommended --quiet" -y - uses: actions/checkout@v3 with: