-
Notifications
You must be signed in to change notification settings - Fork 0
151 lines (124 loc) · 3.86 KB
/
cmake.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: CMake
on:
push:
paths:
- src/**
- "CMakeLists.txt"
- .github/workflows/cmake.yml
pull_request:
paths:
- src/**
- "CMakeLists.txt"
- .github/workflows/cmake.yml
jobs:
linux:
name: "Linux AppImage x86_64"
runs-on: ubuntu-22.04
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
version: '5.15.2'
host: 'linux'
target: 'desktop'
arch: 'gcc_64'
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: CMake Configure
env:
CMAKE_PREFIX_PATH: ${{env.Qt5_Dir}}
run: cmake .
- name: CMake Build
run: cmake --build . -j`nproc`
- name: Package
env:
LD_LIBRARY_PATH: ${{env.Qt5_Dir}}/lib:$LD_LIBRARY_PATH
run: |
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
sudo apt install libfuse2
chmod a+x linuxdeploy-x86_64.AppImage linuxdeploy-plugin-qt-x86_64.AppImage
mkdir AppDir Package
./linuxdeploy-x86_64.AppImage --appdir AppDir -e 86boxman -d res/86boxman.desktop --output Package/86boxman-x86_64.AppImage --plugin qt
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: '86boxman AppImage x86_64'
path: Package
windows:
name: "Windows x86_64 (MXE)"
runs-on: ubuntu-20.04
env:
MXE_TARGET: x86-64-w64-mingw32.static
MXE_CMAKE: /usr/lib/mxe/usr/bin/x86_64-w64-mingw32.static-cmake
steps:
- name: Install MXE Packages
run: |
sudo apt-get -y install software-properties-common lsb-release cmake
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 86B72ED9
sudo add-apt-repository -y "deb [arch=amd64] https://pkg.mxe.cc/repos/apt `lsb_release -sc` main"
sudo apt update
sudo apt-get -y install mxe-${MXE_TARGET}-cc mxe-${MXE_TARGET}-cmake-conf mxe-${MXE_TARGET}-qt5
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: CMake Configure
run: ${MXE_CMAKE} .
- name: CMake Build
run: ${MXE_CMAKE} --build . -j`nproc`
- name: CMake Install
env:
DESTDIR: "ZipDir"
run: cmake --install . --prefix /
- name: Package
run: |
mkdir Package
zip Package/86boxman.zip -kjr9 ZipDir/*
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: '86boxman Windows x86_64 (MXE)'
path: Package
macos:
name: "MacOS x86_64"
runs-on: macos-11
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
version: '5.15.2'
host: 'mac'
target: 'desktop'
arch: 'clang_64'
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: CMake Configure
env:
CMAKE_PREFIX_PATH: ${{env.Qt5_Dir}}
run: cmake .
- name: CMake Build
run: cmake --build . -j`sysctl -n hw.ncpu`
- name: Install
run: |
mkdir AppDir
mv 86boxman.app AppDir
- name: Package
uses: lethja/[email protected]
with:
name: '86boxman'
srcdir: 'AppDir'
- name: Move DMG
run: |
mkdir Package
mv 86boxman.dmg Package
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: '86boxman MacOS x86_64'
path: Package