forked from pound-emu/pound
-
Notifications
You must be signed in to change notification settings - Fork 0
181 lines (151 loc) · 5.71 KB
/
Copy pathbuild.yml
File metadata and controls
181 lines (151 loc) · 5.71 KB
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
169
170
171
172
173
174
175
176
177
178
179
180
181
# Copyright 2025 Pound Emulator Project
name: Build
on: [push, pull_request]
concurrency:
group: ci-${{github.event_name}}-${{github.ref}}
cancel-in-progress: ${{github.event_name == 'push'}}
env:
BUILD_TYPE: Release
BUILD_DIR: ${{github.workspace}}/build
jobs:
get-info:
name: Info
runs-on: ubuntu-24.04
outputs:
shorthash: ${{steps.vars.outputs.shorthash}}
commit: ${{steps.vars.outputs.commit}}
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- name: Commit Count and Git Hash
id: vars
run: |
echo "shorthash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "commit=$(git rev-list --count HEAD)" >> $GITHUB_ENV
echo "shorthash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "commit=$(git rev-list --count HEAD)" >> $GITHUB_OUTPUT
Linux:
name: Linux
runs-on: ubuntu-24.04
needs: get-info
steps:
- uses: actions/checkout@main
with:
submodules: recursive
fetch-depth: 0
- name: Install Dependencies
run: |
sudo apt update
sudo apt install -y ninja-build clang lld cmake ccache \
libx11-dev libxext-dev libxrandr-dev libxcursor-dev \
libxi-dev libxinerama-dev libwayland-dev libxkbcommon-dev \
wayland-protocols libgl-dev git
- name: Configure CMake
run: cmake -G Ninja -B ${{env.BUILD_DIR}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
- name: Build
run: cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}} --parallel $(nproc)
- name: Prepare Artifact Folder
run: |
mkdir -p artifact
cp -r ${{env.BUILD_DIR}}/Pound artifact/Pound-x64-${{env.BUILD_TYPE}}
- name: Upload Linux Artifact
uses: actions/upload-artifact@main
with:
name: Pound-linux-x64-${{env.BUILD_TYPE}}-${{ needs.get-info.outputs.commit }}-${{needs.get-info.outputs.shorthash}}
path: artifact/
Windows:
name: Windows
runs-on: windows-2025
needs: get-info
steps:
- uses: actions/checkout@main
with:
submodules: recursive
fetch-depth: 0
- name: Configure CMake
run:
cmake -G Ninja -B "${{env.BUILD_DIR}}" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} `
-DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl `
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build
run: cmake --build "${{env.BUILD_DIR}}" --config ${{env.BUILD_TYPE}} --parallel $env:NUMBER_OF_PROCESSORS
- name: Prepare Artifact Folder
run: |
mkdir -p artifact
cp -r ${{env.BUILD_DIR}}/Pound.exe artifact/Pound-x64-${{env.BUILD_TYPE}}.exe
- name: Upload Windows Artifact
uses: actions/upload-artifact@main
with:
name: Pound-win64-${{env.BUILD_TYPE}}-${{ needs.get-info.outputs.commit }}-${{needs.get-info.outputs.shorthash}}
path: artifact/
macOS-x86_64:
name: macOS x86_64
runs-on: macos-13
needs: get-info
steps:
- uses: actions/checkout@main
with:
submodules: recursive
fetch-depth: 0
- name: Setup latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Install Dependencies
run: |
brew install ninja llvm
- name: Configure CMake (x86_64)
run: >
cmake -G Ninja -B "${{env.BUILD_DIR}}"
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_OSX_ARCHITECTURES=x86_64
-DCMAKE_C_COMPILER=$(brew --prefix llvm)/bin/clang
-DCMAKE_CXX_COMPILER=$(brew --prefix llvm)/bin/clang++
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15
- name: Build (x86_64)
run: cmake --build "${{env.BUILD_DIR}}" --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.logicalcpu)
- name: Prepare Artifact Folder
run: |
mkdir -p artifact
cp -r ${{env.BUILD_DIR}}/Pound artifact/Pound-x86_64-macOS-${{env.BUILD_TYPE}}
- name: Upload Artifact
uses: actions/upload-artifact@main
with:
name: Pound-macOS-x86_64-${{env.BUILD_TYPE}}-${{ needs.get-info.outputs.commit }}-${{ needs.get-info.outputs.shorthash }}
path: artifact/
macOS-arm64:
name: macOS ARM64
runs-on: macos-14
needs: get-info
steps:
- uses: actions/checkout@main
with:
submodules: recursive
fetch-depth: 0
- name: Setup latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Install Dependencies
run: |
brew install ninja llvm
- name: Configure CMake (ARM64)
run: >
cmake -G Ninja -B "${{env.BUILD_DIR}}"
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_C_COMPILER=$(brew --prefix llvm)/bin/clang
-DCMAKE_CXX_COMPILER=$(brew --prefix llvm)/bin/clang++
-DCMAKE_OSX_ARCHITECTURES=arm64
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15
- name: Build (ARM64)
run: cmake --build "${{env.BUILD_DIR}}" --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.logicalcpu)
- name: Prepare Artifact Folder
run: |
mkdir -p artifact
cp -r ${{env.BUILD_DIR}}/Pound artifact/Pound-arm64-macOS-${{env.BUILD_TYPE}}
- name: Upload Artifact
uses: actions/upload-artifact@main
with:
name: Pound-macOS-arm64-${{env.BUILD_TYPE}}-${{ needs.get-info.outputs.commit }}-${{ needs.get-info.outputs.shorthash }}
path: artifact/