-
Notifications
You must be signed in to change notification settings - Fork 38
168 lines (140 loc) · 4.97 KB
/
build.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: 🔨 Build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
clang-format-check:
runs-on: ubuntu-24.04
name: Clang-Format Check
steps:
- uses: actions/checkout@v4
- uses: jidicula/clang-format-action@v4.14.0
with:
clang-format-version: '19'
check-path: Source
build-windows:
runs-on: windows-latest
name: 🪟 Windows x86_64
strategy:
matrix:
configuration: [Release]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up MSBuild
uses: microsoft/setup-msbuild@v2
- name: Initialize submodules
run: git submodule update --init
shell: powershell
- name: Build
run: |
cmake Source -B .\Source\bin -A x64 "-DCMAKE_PREFIX_PATH=..\Externals\Qt\Qt6.8.2\x64"
cmake --build .\Source\bin --config ${{ matrix.configuration }} --parallel
shell: powershell
- name: Copy LICENSE, README
run: |
copy .\LICENSE .\Source\bin\${{ matrix.configuration }}
copy .\README.md .\Source\bin\${{ matrix.configuration }}
shell: powershell
- name: Get Short SHA
id: get-short-sha
run: |
$sha = '${{ github.sha }}'
$short_sha = $sha.Substring(0, 7)
echo "::set-output name=short_sha::$short_sha"
shell: pwsh
- name: Publish Artifacts
uses: actions/upload-artifact@v4
with:
name: dolphin-memory-engine-${{ steps.get-short-sha.outputs.short_sha }}-windows-amd64
path: Source\bin\${{ matrix.configuration }}
build-linux:
runs-on: ubuntu-22.04
name: 🐧 Linux x86_64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt install cmake libevdev-dev qt6-base-private-dev libqt6svg6 libqt6svg6-dev libgl1-mesa-dev libfuse2
shell: bash
- name: Install GCC 10 and G++ 10
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update
sudo apt-get install g++-10 gcc-10 -y
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 90
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 90
- name: Build
run: |
cmake Source -B Source/build -DCMAKE_BUILD_TYPE=Release
cmake --build Source/build --parallel
shell: bash
- name: Copy LICENSE, README, Prepare Artifacts
run: |
mkdir Source/build/artifacts
cp ./README.md ./Source/build/artifacts/
cp ./LICENSE ./Source/build/artifacts/
cp ./Source/build/dolphin-memory-engine ./Source/build/artifacts/
shell: bash
- name: Package AppImage
run: |
.github/assets/appimage.sh
shell: bash
- name: Get Short SHA
id: get-short-sha
run: echo "short_sha=$(echo ${{ github.sha }} | cut -c 1-7)" >> $GITHUB_OUTPUT
shell: bash
- name: Publish Artifacts (Binary)
uses: actions/upload-artifact@v4
with:
name: dolphin-memory-engine-${{ steps.get-short-sha.outputs.short_sha }}-linux-ubuntu-22.04-binary
path: Source/build/artifacts
- name: Publish Artifacts (AppImage)
uses: actions/upload-artifact@v4
with:
name: dolphin-memory-engine-${{ steps.get-short-sha.outputs.short_sha }}-linux-ubuntu-22.04-appimage
path: dolphin-memory-engine.AppImage
build-macos-intel:
runs-on: macos-13
name: 🍎 macOS Intel
steps:
- name: Checkout code
uses: actions/checkout@v4
# Current Runner has cmake we want by default; Omitting for now but restore if they stop bundling it
# - name: Install Dependencies
# run: |
# brew install --formula cmake
# shell: bash
- name: Initialize submodules
run: git submodule update --init
- name: Build
run: |
mkdir Source/build
cd Source/build
cmake .. -DCMAKE_PREFIX_PATH="$(realpath ../../Externals/Qt-macOS)"
make
echo -e "\n" | ../../Tools/MacDeploy.sh
shell: bash
- name: Copy LICENSE, README, Prepare Artifacts
run: |
mkdir Source/build/artifacts
cp ./README.md ./Source/build/artifacts/
cp ./LICENSE ./Source/build/artifacts/
cp ./Tools/MacSetup.sh ./Source/build/artifacts/
cp ./Source/build/dolphin-memory-engine.dmg ./Source/build/artifacts/
shell: bash
- name: Get Short SHA
id: get-short-sha
run: echo "short_sha=$(echo ${{ github.sha }} | cut -c 1-7)" >> $GITHUB_OUTPUT
shell: bash
- name: Publish Artifacts
uses: actions/upload-artifact@v4
with:
name: dolphin-memory-engine-${{ steps.get-short-sha.outputs.short_sha }}-macOS-intel
path: Source/build/artifacts