Skip to content

Commit a76eb68

Browse files
committed
test compilation windows
1 parent 6a14674 commit a76eb68

File tree

2 files changed

+40
-94
lines changed

2 files changed

+40
-94
lines changed

.github/workflows/multi-platform.yml

Lines changed: 0 additions & 94 deletions
This file was deleted.

.github/workflows/wbuild.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Cross-Build Windows
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
include:
11+
- build_type: win32
12+
cmake_toolchain: i686-w64-mingw32-cmake
13+
output_name: FreeMajor-dev-win32.zip
14+
- build_type: win64
15+
cmake_toolchain: x86_64-w64-mingw32-cmake
16+
output_name: FreeMajor-dev-win64.zip
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Start Docker container
22+
run: |
23+
docker pull jpcima/arch-mingw
24+
docker run -d -i -t -v "$(pwd):/home" --name mingw_builder jpcima/arch-mingw /bin/bash
25+
26+
- name: Cross-compile (${{ matrix.build_type }})
27+
run: |
28+
mkdir -p release build
29+
cd build
30+
docker exec -w "/home/build" -i mingw_builder ${{ matrix.cmake_toolchain }} -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DENABLE_GETTEXT=ON ..
31+
docker exec -w "/home/build" -i mingw_builder make -j
32+
docker exec -w "/home/build" -i mingw_builder cpack -G ZIP
33+
cp FreeMajor-*.zip ../release/${{ matrix.output_name }}
34+
cd ..
35+
36+
- name: Upload artifact
37+
uses: actions/upload-artifact@v3
38+
with:
39+
name: FreeMajor-${{ matrix.build_type }}
40+
path: release/${{ matrix.output_name }}

0 commit comments

Comments
 (0)