-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (93 loc) · 3.88 KB
/
win32-cross.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Cross-compile for Win32
on: push
jobs:
build_cross-win32_dynamic:
runs-on: ubuntu-22.04
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v4
- name: Install Debian packages
run: |
sudo apt-get update
sudo apt-get install -y catch cmake libz-mingw-w64-dev pkg-config
sudo apt-get install -y binutils-mingw-w64-i686 g++-mingw-w64-i686 gcc-mingw-w64-i686 mingw-w64-i686-dev
- name: Build with MinGW for Win32
run: |
export CXX=i686-w64-mingw32-c++-win32
export CC=i686-w64-mingw32-gcc-win32
cd $GITHUB_WORKSPACE
mkdir build
cd build
cmake ../
make -j2
- name: Tests
run: |
cd "$GITHUB_WORKSPACE"/build
ctest -V
- name: Collect zlib1.dll and other DLLs for artifact upload
run: |
mkdir -p "$GITHUB_WORKSPACE"/build/artifacts
cp /usr/i686-w64-mingw32/lib/zlib1.dll "$GITHUB_WORKSPACE"/build/artifacts/zlib1.dll
cp /usr/lib/gcc/i686-w64-mingw32/10-win32/libstdc++-6.dll "$GITHUB_WORKSPACE"/build/artifacts/libstdc++-6.dll
cp /usr/lib/gcc/i686-w64-mingw32/10-win32/libgcc_s_dw2-1.dll "$GITHUB_WORKSPACE"/build/artifacts/libgcc_s_dw2-1.dll
- name: Collect build artifacts in one place
run: |
cd "$GITHUB_WORKSPACE"/build
cp apps/mw/cell_translator/cell_translator.exe artifacts/
cp apps/mw/data_cleaner/data_cleaner.exe artifacts/
cp apps/mw/name_generator/name_generator_mw.exe artifacts/
cp apps/mw/skill_rebalance/skill_rebalance.exe artifacts/
cp apps/mw/spell_rename/spell_rename.exe artifacts/
cp apps/sr/bsa_cli/bsa-cli.exe artifacts/
cp apps/sr/conv_cams/conv_cams.exe artifacts/
cp apps/sr/formID_finder/formID_finder.exe artifacts/
cp apps/sr/small_high_elves/small_high_elves.exe artifacts/
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts-dynamic-linking
path: |
build/artifacts/*.exe
build/artifacts/*.dll
build_cross-win32_static:
runs-on: ubuntu-22.04
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v4
- name: Install Debian packages
run: |
sudo apt-get update
sudo apt-get install -y catch cmake libz-mingw-w64-dev pkg-config
sudo apt-get install -y binutils-mingw-w64-i686 g++-mingw-w64-i686 gcc-mingw-w64-i686 mingw-w64-i686-dev
- name: Build with MinGW for Win32
run: |
export CXX=i686-w64-mingw32-c++-win32
export CC=i686-w64-mingw32-gcc-win32
cd $GITHUB_WORKSPACE
mkdir build
cd build
cmake -DENABLE_LTO=ON -DENABLE_STATIC_LINKING=ON ../
make -j2
- name: Tests
run: |
cd "$GITHUB_WORKSPACE"/build
ctest -V
- name: Collect build artifacts in one place
run: |
cd "$GITHUB_WORKSPACE"/build
mkdir -p "$GITHUB_WORKSPACE"/build/artifacts
cp apps/mw/cell_translator/cell_translator.exe artifacts/
cp apps/mw/data_cleaner/data_cleaner.exe artifacts/
cp apps/mw/name_generator/name_generator_mw.exe artifacts/
cp apps/mw/skill_rebalance/skill_rebalance.exe artifacts/
cp apps/mw/spell_rename/spell_rename.exe artifacts/
cp apps/sr/bsa_cli/bsa-cli.exe artifacts/
cp apps/sr/conv_cams/conv_cams.exe artifacts/
cp apps/sr/formID_finder/formID_finder.exe artifacts/
cp apps/sr/small_high_elves/small_high_elves.exe artifacts/
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts-static-linking
path: |
build/artifacts/*.exe