Skip to content

Commit 7a53535

Browse files
authored
Add GitHub Actions workflow for multi-platform builds
1 parent d91b3c0 commit 7a53535

1 file changed

Lines changed: 65 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Multi-Platform Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-windows:
12+
runs-on: windows-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Configure CMake
16+
run: cmake -B build -G "Visual Studio 17 2022" -A x64
17+
- name: Build
18+
run: cmake --build build --config Release
19+
- name: Upload Artifact
20+
uses: actions/upload-artifact@v4
21+
with:
22+
name: SkinGetBE-Windows-x64
23+
path: build/Release/SkinGetBE.exe
24+
25+
build-linux-x64:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
- name: Install Dependencies
30+
run: sudo apt-get update && sudo apt-get install -y build-essential cmake
31+
- name: Configure CMake
32+
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
33+
- name: Build
34+
run: cmake --build build
35+
- name: Upload Artifact
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: SkinGetBE-Linux-x64
39+
path: build/SkinGetBE
40+
41+
build-linux-arm64:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v4
45+
- name: Install Cross-Compiler
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu cmake
49+
- name: Create Toolchain File
50+
run: |
51+
cat <<EOF > arm64-toolchain.cmake
52+
set(CMAKE_SYSTEM_NAME Linux)
53+
set(CMAKE_SYSTEM_PROCESSOR arm)
54+
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
55+
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
56+
EOF
57+
- name: Configure CMake
58+
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=arm64-toolchain.cmake
59+
- name: Build
60+
run: cmake --build build
61+
- name: Upload Artifact
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: SkinGetBE-Linux-ARM64
65+
path: build/SkinGetBE

0 commit comments

Comments
 (0)