Skip to content

Commit

Permalink
Merge pull request #209 from chewing/fix-windows-32bit-build
Browse files Browse the repository at this point in the history
ci: call vcdevcmd.bat before build
  • Loading branch information
kanru authored Dec 9, 2024
2 parents 48f7029 + ed2ecf1 commit a59be0e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,28 @@ jobs:

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

# - name: Start SSH session
# uses: luchihoratiu/debug-via-ssh@main
# with:
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_TOKEN }}
# SSH_PASS: ${{ secrets.SSH_PASS }}
# NGROK_REGION: jp

- name: Setup vcpkg
shell: cmd
run: |
echo VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT >> $env:GITHUB_ENV
echo CMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake >> $env:GITHUB_ENV
& $env:VCPKG_INSTALLATION_ROOT\vcpkg install --triplet x86-windows-static sqlite3
& $env:VCPKG_INSTALLATION_ROOT\vcpkg install --triplet x64-windows-static sqlite3
set VCPKG_ROOT=%VCPKG_INSTALLATION_ROOT%
vcpkg install --triplet x86-windows-static sqlite3
vcpkg install --triplet x64-windows-static sqlite3
- name: Build
run: scripts/build_installer.bat
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\vsdevcmd.bat"
set VCPKG_ROOT=%VCPKG_INSTALLATION_ROOT%
set CMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake
scripts/build_installer.bat
- id: upload-unsigned
uses: actions/upload-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions scripts/build_installer.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
set RUSTFLAGS=-Ctarget-feature=+crt-static
set SQLITE3_STATIC=1

cmake -B build\x86 -A Win32 -DBUILD_TESTING=OFF -DVCPKG_TARGET_TRIPLET=x86-windows-static
cmake --build build\x86 --config Release
Expand Down
1 change: 1 addition & 0 deletions scripts/build_installer_debug.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
set RUSTFLAGS=-Ctarget-feature=+crt-static
set SQLITE3_STATIC=1

cmake -B build\x86 -A Win32 -DBUILD_TESTING=OFF -DVCPKG_TARGET_TRIPLET=x86-windows-static
cmake --build build\x86 --config Debug
Expand Down

0 comments on commit a59be0e

Please sign in to comment.