Skip to content

Commit 6facc65

Browse files
committed
Add workflow
1 parent acf9de5 commit 6facc65

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/windowsbuild.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Build for Windows
2+
on: [ push, pull_request ]
3+
jobs:
4+
build_windows:
5+
name: CI for Windows
6+
runs-on: windows-latest
7+
steps:
8+
- name: Checkout for Windows
9+
uses: actions/checkout@v2
10+
- name: Install msys2
11+
uses: msys2/setup-msys2@v2
12+
with:
13+
update: true
14+
install: >-
15+
mingw-w64-x86_64-clang mingw-w64-x86_64-cmake mingw-w64-x86_64-lld mingw-w64-x86_64-ninja
16+
- name: Build for Windows
17+
shell: msys2 {0}
18+
run: ./build.sh
19+
- name: Upload artifact
20+
uses: actions/upload-artifact@v4
21+
with:
22+
name: windows
23+
path: xdispatch-ddb
24+

build.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
OUT_DIR="`pwd`/xdispatch_ddb"
4+
5+
mkdir build
6+
cd build
7+
cmake -DCMAKE_INSTALL_PREFIX="$OUT_DIR" \
8+
-DCMAKE_C_COMPILER="clang" \
9+
-DCMAKE_CXX_COMPILER="clang++" \
10+
-DCMAKE_BUILD_TYPE=Release \
11+
..
12+
ninja
13+
cmake --install .
14+
15+
mv "$OUT_DIR/bin/"* "$OUT_DIR/lib/"
16+
rmdir "$OUT_DIR/bin"

0 commit comments

Comments
 (0)