-
Notifications
You must be signed in to change notification settings - Fork 7
47 lines (39 loc) · 1.4 KB
/
build-win.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Build Windows (Cross Compile)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
types: [synchronize, opened, reopened, ready_for_review]
workflow_dispatch:
concurrency:
group: build-win-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install depends
run: |
sudo apt-get update
sudo apt-get install flex bison mingw-w64-x86-64-dev mingw-w64-tools g++-mingw-w64-x86-64 wine wine-binfmt
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
- name: Prebuild
run: |
mkdir build && cd build
cmake ../ -DCMAKE_TOOLCHAIN_FILE=../toolchain-x86_64-w64-mingw32.cmake -DCMAKE_BUILD_TYPE=Prebuild
make
- name: Build
run: |
export PREFIX="$(pwd)/EXT"
cd build
cmake ../ -DCMAKE_TOOLCHAIN_FILE=../toolchain-x86_64-w64-mingw32.cmake -DCMAKE_BUILD_TYPE=Release
CPATH=$PREFIX/include make
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: verifydtapn-win64
path: '${{runner.workspace}}/verifydtapn/build/verifydtapn/bin/verifydtapn-win64.exe'