Skip to content

Commit 7b1fbfb

Browse files
committed
Add workflow to build and test on windows
We really should have had this a long time ago.
1 parent 003e559 commit 7b1fbfb

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/build.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on: [push, pull_request]
44
jobs:
55

66
build-and-test-ubuntu:
7+
#if: false # Temporarily disable
78
name: Build And Test Ubuntu
89
runs-on: ubuntu-latest
910
env:
@@ -22,7 +23,55 @@ jobs:
2223
- name: Build and run tests
2324
run: bash .github/build.sh
2425

26+
build-and-test-windows:
27+
#if: false # Temporarily disable
28+
name: Build And Test Windows
29+
runs-on: windows-latest
30+
env:
31+
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
32+
steps:
33+
- uses: actions/checkout@master
34+
35+
- uses: lukka/get-cmake@latest
36+
37+
- name: Restore artifacts, setup vcpkg
38+
uses: lukka/run-vcpkg@v10
39+
with:
40+
vcpkgGitCommitId: b41cc261730535f05cc1d0efbcaa821f2162f49e
41+
vcpkgDirectory: '${{env.VCPKG_ROOT}}'
42+
vcpkgJsonGlob: vcpkg.json
43+
runVcpkgInstall: false
44+
45+
# Setup MSVC command prompt environment vars
46+
- uses: ilammy/msvc-dev-cmd@v1
47+
48+
- name: vcpkg check / install dependencies
49+
working-directory: '${{ github.workspace }}'
50+
run: '${{env.VCPKG_ROOT}}/vcpkg install'
51+
52+
- name: Install dependencies and generate project files
53+
run: |
54+
mkdir build
55+
cd build
56+
cmake -S .. -G Ninja -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_TOOLS=ON
57+
58+
- name: Build projects
59+
working-directory: '${{ github.workspace }}/build'
60+
run: ninja
61+
62+
- name: Test crypto
63+
working-directory: '${{ github.workspace }}/build/bin'
64+
run: test_crypto.exe
65+
shell: cmd
66+
67+
- name: Test connection
68+
working-directory: '${{ github.workspace }}/build/bin'
69+
#run: test_connection.exe suite-quick # Loopback throughput test not performing on github hosted runners for some reason
70+
run: test_connection.exe identity quick lane_quick_queueanddrain lane_quick_priority_and_background
71+
shell: cmd
72+
2573
build-and-test-flavors:
74+
#if: false # Temporarily disable
2675
name: Build And Test Unix Flavors
2776
runs-on: ${{ matrix.os }}
2877
needs: build-and-test-ubuntu # Don't both running flavors until after ubuntu has passed

0 commit comments

Comments
 (0)