ci: call vcdevcmd.bat before build #148
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
merge_group: | |
types: [checks_requested] | |
workflow_call: | |
inputs: | |
nightly: | |
description: "Update all submodules to build nightly build" | |
default: false | |
required: false | |
type: boolean | |
outputs: | |
unsigned-artifact-id: | |
description: "Unsigned Installer" | |
value: ${{ jobs.build.outputs.unsigned-artifact-id }} | |
jobs: | |
build: | |
runs-on: windows-latest | |
name: Build | |
outputs: | |
unsigned-artifact-id: ${{ steps.upload-unsigned.outputs.artifact-id }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Update Submodules | |
if: ${{ inputs.nightly }} | |
run: git submodule update --remote | |
- name: Setup rustup | |
run: rustup target add i686-pc-windows-msvc | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
- name: Setup vcpkg | |
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 | |
- name: Build | |
shell: cmd | |
run: | | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_x86.bat" | |
scripts/build_installer.bat | |
- id: upload-unsigned | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Unsigned Installer | |
path: | | |
dist\windows-chewing-tsf-unsigned.msi |