Skip to content

Commit 682dd55

Browse files
committed
Github action: Add Windows CI build
1 parent 8c4670d commit 682dd55

6 files changed

Lines changed: 92 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Windows build
2+
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Build
7+
run: cmake --build . --config Release --verbose
8+
shell: bash
9+
working-directory: build
10+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Windows CMake
2+
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Create build directory
7+
run: mkdir build
8+
shell: bash
9+
- name: Configure
10+
run: cmake -LA .. -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DBUILD_TESTS=ON -DGETOPT_INCLUDE_DIR=$GETOPT_INCLUDE_DIR -DGETOPT_LIBRARY=$GETOPT_LIBRARY -DBoost_USE_STATIC_LIBS=ON
11+
shell: bash
12+
working-directory: build
13+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Windows getopt
2+
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Install wingetopt
7+
env:
8+
WINGETOPT_VER: v0.95
9+
run: |
10+
git clone --quiet --depth 1 https://github.com/alex85k/wingetopt -b $WINGETOPT_VER ../wingetopt
11+
mkdir ../wingetopt/build
12+
shell: bash
13+
- name: Build wingetopt
14+
run: |
15+
cmake -LA .. -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
16+
cmake --build . --config Release --verbose
17+
working-directory: ../wingetopt/build
18+
shell: bash
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Windows install
2+
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Install packages
7+
run: vcpkg install bzip2:x64-windows expat:x64-windows zlib:x64-windows proj4:x64-windows boost-algorithm:x64-windows boost-system:x64-windows boost-filesystem:x64-windows boost-property-tree:x64-windows lua:x64-windows libpq:x64-windows
8+
shell: bash
9+
- name: Install psycopg2
10+
run: python -m pip install psycopg2
11+
shell: bash
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Windows test
2+
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Test
7+
run: ctest --output-on-failure -C Release -L NoDB
8+
shell: bash
9+
working-directory: build
10+

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,33 @@ jobs:
197197
- uses: ./.github/actions/ubuntu-prerequisites
198198
- uses: ./.github/actions/build-and-test
199199

200+
windows-2019:
201+
runs-on: windows-2019
202+
env:
203+
GETOPT_INCLUDE_DIR: ${{ github.workspace }}/../wingetopt/src
204+
GETOPT_LIBRARY: ${{ github.workspace }}/../wingetopt/build/Release/wingetopt.lib
205+
steps:
206+
- uses: actions/checkout@v2
207+
with:
208+
submodules: true
209+
- uses: ./.github/actions/win-install
210+
- uses: ./.github/actions/win-getopt
211+
- uses: ./.github/actions/win-cmake
212+
- uses: ./.github/actions/win-build
213+
- uses: ./.github/actions/win-test
214+
215+
windows-2022:
216+
runs-on: windows-2022
217+
env:
218+
GETOPT_INCLUDE_DIR: ${{ github.workspace }}/../wingetopt/src
219+
GETOPT_LIBRARY: ${{ github.workspace }}/../wingetopt/build/Release/wingetopt.lib
220+
steps:
221+
- uses: actions/checkout@v2
222+
with:
223+
submodules: true
224+
- uses: ./.github/actions/win-install
225+
- uses: ./.github/actions/win-getopt
226+
- uses: ./.github/actions/win-cmake
227+
- uses: ./.github/actions/win-build
228+
- uses: ./.github/actions/win-test
229+

0 commit comments

Comments
 (0)