Skip to content

Commit 5704b2c

Browse files
committed
CI add msvc and mingw builds for windows
1 parent 84c883e commit 5704b2c

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/build.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,57 @@ jobs:
122122
-B build
123123
- name: Build
124124
run: cmake --build build
125+
126+
msvc:
127+
runs-on: windows-latest
128+
strategy:
129+
matrix:
130+
include:
131+
- { arch: x86, platform: Win32 }
132+
- { arch: x64, platform: x64 }
133+
- { arch: arm64, platform: ARM64 }
134+
steps:
135+
- uses: actions/checkout@v3
136+
- name: Configure
137+
run: >-
138+
cmake
139+
-A ${{matrix.platform}}
140+
-D DEBUG_CMAKE=1
141+
-D CMAKE_SYSTEM_VERSION=11
142+
-D CMAKE_C_FLAGS_RELWITHDEBINFO="/MT /GL /Zi /O2 /Ob1 /DNDEBUG"
143+
-D CMAKE_CXX_FLAGS_RELWITHDEBINFO="/MT /GL /Zi /O2 /Ob1 /DNDEBUG"
144+
-D CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO="/DEBUG /INCREMENTAL:NO /LTCG /OPT:REF /OPT:ICF"
145+
-B build
146+
- name: Build
147+
run: cmake --build build --config ${{env.BUILD_TYPE}}
148+
149+
mingw:
150+
runs-on: windows-latest
151+
defaults:
152+
run:
153+
shell: msys2 {0}
154+
strategy:
155+
matrix:
156+
include:
157+
- { sys: mingw64, env: x86_64 }
158+
- { sys: ucrt64, env: ucrt-x86_64 }
159+
- { sys: clang64, env: clang-x86_64 }
160+
steps:
161+
- uses: actions/checkout@v3
162+
- uses: msys2/setup-msys2@v2
163+
with:
164+
msystem: ${{matrix.sys}}
165+
update: true
166+
install: >-
167+
base-devel
168+
mingw-w64-${{matrix.env}}-gcc
169+
mingw-w64-${{matrix.env}}-cmake
170+
- name: Configure
171+
run: >-
172+
cmake
173+
-G"MSYS Makefiles"
174+
-D DEBUG_CMAKE=1
175+
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
176+
-B build
177+
- name: Build
178+
run: cmake --build build

0 commit comments

Comments
 (0)