Skip to content

Commit

Permalink
Add first attempt to test on Windows runner
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Abrahão <[email protected]>
  • Loading branch information
patrickpa committed May 24, 2024
1 parent 29f16b4 commit 2c1e282
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-on-change-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
- include/**
- scripts/cmake/**
- tests/**
- .github/workflows/** # only for testing this PR

# execute on every push made targeting the branches bellow
push:
Expand Down
36 changes: 34 additions & 2 deletions .github/workflows/build-on-change-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- src/**
- include/**
- scripts/cmake/**
- .github/workflows/** # only for testing this PR

# execute on every push made targeting the branches bellow
push:
Expand All @@ -24,6 +25,8 @@ on:
jobs:
build-windows:
runs-on: windows-2019
env:
TEST_ENABLED: ${{ github.event_name == 'pull_request' && 'ON' || 'OFF' }}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -39,7 +42,26 @@ jobs:
target: desktop
arch: win64_msvc2019_64

- name: Install dependencies
- name: Install gtest
working-directory: dependencies
if: github.event_name == 'pull_request'
env:
CXX: g++-10
run: |
echo Installing gtest...
git clone https://github.com/google/googletest.git -b release-1.10.0
cd googletest
mkdir build
cd build
cmake ..
make
make install
echo Gtest installed.
shell: pwsh

- name: Install XercesC
run: |
$workingPath = "D:\a"
Expand Down Expand Up @@ -72,7 +94,7 @@ jobs:
cmake -H"$workingPath\qc-framework\qc-framework" -S. -Bbuild `
-G "Visual Studio 16 2019" -A x64 -T v142 `
-DCMAKE_INSTALL_PREFIX="$workingPath\QC-Framework-Out" `
-DENABLE_FUNCTIONAL_TESTS=OFF `
-DENABLE_FUNCTIONAL_TESTS=$env:TEST_ENABLED `
-DQt5_ROOT="$env:Qt5_DIR\Qt5\" `
-DXercesC_ROOT="$workingPath\Xerces-Out"
Expand All @@ -83,3 +105,13 @@ jobs:
# Final output
Write-Output "All installations and setups are complete!"
shell: pwsh

- name: Test
if: github.event_name == 'pull_request'
run: |
echo Starting tests...
ctest --test-dir build -C Release
echo All tests done.
shell: pwsh

0 comments on commit 2c1e282

Please sign in to comment.