[Windows] add MSVC support #135
Workflow file for this run
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: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
platform: linux | |
- os: macos-latest | |
platform: macos | |
preset: release-macos | |
artifact: '*.dmg' | |
- os: windows-latest | |
platform: windows-msvc | |
preset: release-msvc | |
artifact: '*.Win32.exe' | |
useQtAction: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
shell: bash | |
run: | | |
setupScript='ci/${{ matrix.platform }}/setup.sh' | |
[ ! -f "$setupScript" ] || "$setupScript" | |
env: | |
MACOS_ASC_API_KEY: ${{ secrets.MACOS_ASC_API_KEY }} | |
MACOS_CODE_SIGN_KEY_BASE64: ${{ secrets.MACOS_CODE_SIGN_KEY_BASE64 }} | |
MACOS_KEYCHAIN_PASSWORD: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }} | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
if: ${{ matrix.useQtAction }} | |
with: | |
version: '6.6.2' | |
arch: 'win64_msvc2019_64' | |
archives: 'qtbase qttools opengl32sw d3dcompiler_47' | |
extra: '--external 7z' | |
cache: true | |
setup-python: false | |
- name: Prepare MSVC environment | |
uses: ilammy/msvc-dev-cmd@v1 | |
if: ${{ matrix.platform == 'windows-msvc' }} | |
with: | |
arch: x64 | |
toolset: 14.29 | |
- name: Configure | |
run: | | |
cmake --preset ${{ matrix.preset || 'release' }} | |
- name: Build | |
run: | | |
cmake --build --preset release | |
- name: Pack | |
if: ${{ matrix.artifact }} | |
run: | | |
cpack --preset release | |
env: | |
ASC_API_KEY_ID: ${{ secrets.MACOS_ASC_API_KEY_ID }} | |
ASC_API_KEY_ISSUER: ${{ secrets.MACOS_ASC_API_KEY_ISSUER }} | |
ASC_TEAM_ID: ${{ secrets.MACOS_ASC_TEAM_ID }} | |
- name: Artifact | |
if: ${{ matrix.artifact }} | |
uses: actions/upload-artifact@v4 | |
with: | |
path: build/${{ matrix.artifact }} | |
name: ${{ matrix.platform }} | |
compression-level: 0 |