Skip to content

Commit

Permalink
Update windows msvs ci to fix output_dir not set
Browse files Browse the repository at this point in the history
  • Loading branch information
jhmgoossens committed Apr 7, 2024
1 parent 9018bb5 commit b6937a6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/windows-msvs-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Windows build and test
name: Windows MSVS build and test
on:
push:
branches:
Expand All @@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
include: [
{ os: windows-2019, configuration: "Release", platform: "Win32" },
{ os: windows-2019, configuration: "Release", platform: "x86" },
{ os: windows-2022, configuration: "Release", platform: "x64" },
]
steps:
Expand Down Expand Up @@ -61,13 +61,14 @@ jobs:
shell: cmd
run: |
if "${{ matrix.platform }}"=="x64" (
echo "output_dir=x64\${{ matrix.configuration }}" >> $GITHUB_ENV
) else if "${{ matrix.platform }}"=="Win32" (
echo "output_dir=Win32\${{ matrix.configuration }}" >> $GITHUB_ENV
echo "output_dir=x64\${{ matrix.configuration }}" >> %GITHUB_ENV%
) else if "${{ matrix.platform }}"=="x86" (
echo "output_dir=${{ matrix.configuration }}" >> %GITHUB_ENV%
) else (
echo "ERROR: Unsupported platform '${{ matrix.platform }}'. Expecting x64 or Win32." 1>&2
echo "ERROR Unsupported platform '${{ matrix.platform }}'. Expecting x64 or x86." 1>&2
exit /b 1
)
echo "Output directory ${{ env.output_dir }}"
msbuild ${{ github.event.repository.name }}\MSVisualStudio\v17\${{ github.event.repository.name }}.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /m
- name: Test project
shell: cmd
Expand Down

0 comments on commit b6937a6

Please sign in to comment.