Skip to content

Commit d5649ca

Browse files
committed
CI: Add build on Windows using gcc toolchain
v2: Also run tests on Windows
1 parent fb69d75 commit d5649ca

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,31 @@ jobs:
2828
run: |
2929
cd build
3030
make test
31+
32+
win32:
33+
runs-on: windows-latest
34+
steps:
35+
- run: git config --global core.autocrlf input
36+
- uses: actions/checkout@v2
37+
- uses: msys2/setup-msys2@v2
38+
with:
39+
pacboy: >-
40+
toolchain:p
41+
cmake:p
42+
- name: Build
43+
shell: msys2 {0}
44+
run: |
45+
mkdir build
46+
cd build
47+
export CFLAGS="-D__USE_MINGW_ANSI_STDIO=1"
48+
# CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS doesn't work correctly in the
49+
# presence of explicit dllexports for the gcc/binutils toolchain
50+
export LDFLAGS="-Wl,--export-all-symbols"
51+
cmake -DENABLE_STATIC=ON -DWITHOUT_COOKIEOPEN=ON ..
52+
ninja
53+
- name: Test
54+
shell: msys2 {0}
55+
run: |
56+
cd build
57+
export PATH="$(pwd)/src:$(pwd)/ext:${PATH}"
58+
ninja test

0 commit comments

Comments
 (0)