Skip to content

Commit

Permalink
CI: Add MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
syyyr committed Oct 21, 2024
1 parent 80671b4 commit 148fb55
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
11 changes: 9 additions & 2 deletions .github/actions/cmake/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,15 @@ runs:
export SystemDrive="$SYSTEMDRIVE"
export SystemRoot="$SYSTEMROOT"
export windir="$WINDIR"
vcpkg install doctest:x64-mingw-dynamic trompeloeil:x64-mingw-dynamic
echo cmake_extra_args="'-DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake' '-DMINGW=ON' '-G MinGW Makefiles'" >> "$GITHUB_ENV"
CMAKE_EXTRA_ARGS="'-DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake'" >> "$GITHUB_ENV"
if [[ ${{ inputs.qt_arch }} = win64_mingw ]]; then
vcpkg install doctest:x64-mingw-dynamic trompeloeil:x64-mingw-dynamic
CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} '-DMINGW=ON' '-G MinGW Makefiles'"
else
vcpkg install doctest trompeloeil
fi
echo cmake_extra_args="${CMAKE_EXTRA_ARGS}" >> "$GITHUB_ENV"
shell: bash

# Qt
Expand Down
28 changes: 26 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ jobs:
- name: Build and test
uses: ./.github/actions/build-and-test

windows:
name: Qt 6.5.3 / Windows
windows-mingw:
name: Qt 6.5.3 / Windows MinGW
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
Expand All @@ -100,6 +100,30 @@ jobs:
- name: Build and test
uses: ./.github/actions/build-and-test

windows-msvc:
name: Qt 6.5.3 / Windows MSVC
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Setup CMake
uses: ./.github/actions/cmake
with:
qt_version: 6.5.3
qt_arch: win64_msvc2019_64
use_qt6: ON
modules: qtserialport qtwebsockets
# Need to get all binaries in the same directory, otherwise the tests can't find the dlls.
additional_cmake_args: |
-DLIBSHV_WITH_LDAP=OFF \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY='${{github.workspace}}/build/bin' \
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY='${{github.workspace}}/build/bin'
- name: Build and test
uses: ./.github/actions/build-and-test

android:
name: Qt 6.7.3 / Android
runs-on: ubuntu-22.04
Expand Down

0 comments on commit 148fb55

Please sign in to comment.