Browse Source

Add windows test build

Alexey Edelev 3 years ago
parent
commit
6fbf68c99a
2 changed files with 35 additions and 1 deletions
  1. 1 1
      .ci/qt_installer_windows.qs
  2. 34 0
      .github/workflows/branchpush.yml

+ 1 - 1
.ci/qt_installer_windows.qs

@@ -33,7 +33,7 @@ Controller.prototype.DynamicTelemetryPluginFormCallback = function() {
 Controller.prototype.ComponentSelectionPageCallback = function() {
     var widget = gui.currentPageWidget();
     widget.deselectAll();
-    widget.selectComponent("qt.qt5.5152.win32_msvc2019");
+    widget.selectComponent("qt.qt5.5152.win64_msvc2019_64");
 
     gui.clickButton(buttons.NextButton);
 }

+ 34 - 0
.github/workflows/branchpush.yml

@@ -55,3 +55,37 @@ jobs:
       run: docker build . --file .ci/Dockerfile.opensuse_static --tag opensuse_debugimage_static:latest
     - name: Run tests
       run: docker run opensuse_debugimage_static:latest ctest /build --output-on-failure
+  build-windows:
+    name: Static Build and Test Windows MSVC
+    runs-on: windows-latest
+    steps:
+    - uses: actions/checkout@v2
+    - name: Init submodules
+      run: git submodule update --init --recursive
+    - uses: shogo82148/actions-setup-perl@v1
+      with:
+        perl-version: '5.30'
+        distribution: strawberry
+    - uses: microsoft/setup-msbuild@v1.0.2
+      with:
+        vs-version: '16.4'
+    - name: Install Deps
+      run: choco install wget golang yasm
+    - name: Install Qt
+      run: |
+        wget -q https://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe -O C:/qt-unified-windows-x86-online.exe
+        C:/qt-unified-windows-x86-online.exe --script ./.ci/qt_installer_windows.qs -d
+    - name: Build in Windows
+      run: |
+        mkdir build-static
+        cd build-static
+        setx GOROOT "c:\Go"
+        setx path "%path%;C:\Qt\5.15.2\msvc2019_64\bin;C:\Go\bin;C:\ProgramData\chocolatey\lib\yasm\tools"
+        set GOROOT="c:\Go"
+        set PATH="%PATH%;C:\Qt\5.15.2\msvc2019_64\bin;C:\Go\bin;C:\ProgramData\chocolatey\lib\yasm\tools"
+        cmake -DCMAKE_PREFIX_PATH="C:\Qt\5.15.2\msvc2019_64;C:\Go\bin;C:\ProgramData\chocolatey\lib\yasm\tools" -DBUILD_SHARED_LIBS=OFF ..
+        cmake --build . --config Debug
+    - name: Run tests
+      run: |
+        cd build-static
+        ctest -C Debug --output-on-failure