Skip to content

Commit 2328648

Browse files
authored
Add Workflow Box2D_Build
1 parent 5ec3181 commit 2328648

1 file changed

Lines changed: 105 additions & 0 deletions

File tree

.github/workflows/Box2D_Build.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Box2D_Build
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
Linux_x64:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout Repository
10+
uses: actions/checkout@v7
11+
- name: Configure CMake
12+
run: cmake -S src/main/resources/box2d-3.1.1/ -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBOX2D_SAMPLES=OFF -DBOX2D_UNIT_TESTS=OFF -DBOX2D_BENCHMARKS=OFF
13+
- name: Build CMake
14+
run: cmake --build build --config Release
15+
- name: Install CMake
16+
run: cmake --install build --prefix install
17+
- name: Find and copy real files
18+
run: |
19+
mkdir -p binaries
20+
find install/lib -type f -exec cp {} binaries/ \;
21+
- name: Upload Artifacts
22+
uses: actions/upload-artifact@v7
23+
with:
24+
name: Linux_x64_Artifacts
25+
path: binaries/libbox2d.so.*
26+
27+
Linux_Arm64:
28+
runs-on: ubuntu-24.04-arm
29+
steps:
30+
- name: Checkout Repository
31+
uses: actions/checkout@v7
32+
- name: Configure CMake
33+
run: cmake -S src/main/resources/box2d-3.1.1/ -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBOX2D_SAMPLES=OFF -DBOX2D_UNIT_TESTS=OFF -DBOX2D_BENCHMARKS=OFF
34+
- name: Build CMake
35+
run: cmake --build build --config Release
36+
- name: Install CMake
37+
run: cmake --install build --prefix install
38+
- name: Find and copy real files
39+
run: |
40+
mkdir -p binaries
41+
find install/lib -type f -exec cp {} binaries/ \;
42+
- name: Upload Artifacts
43+
uses: actions/upload-artifact@v7
44+
with:
45+
name: Linux_Arm64_Artifacts
46+
path: binaries/libbox2d.so.*
47+
48+
macOs_Arm64:
49+
runs-on: macos-26
50+
steps:
51+
- name: Checkout Repository
52+
uses: actions/checkout@v7
53+
- name: Configure CMake
54+
run: cmake -S src/main/resources/box2d-3.1.1/ -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBOX2D_SAMPLES=OFF -DBOX2D_UNIT_TESTS=OFF -DBOX2D_BENCHMARKS=OFF
55+
- name: Build CMake
56+
run: cmake --build build --config Release
57+
- name: Install CMake
58+
run: cmake --install build --prefix install
59+
- name: Find and copy real files
60+
run: |
61+
mkdir -p binaries
62+
find install/lib -type f -exec cp {} binaries/ \;
63+
- name: Upload Artifacts
64+
uses: actions/upload-artifact@v7
65+
with:
66+
name: macOs_Arm64_Artifacts
67+
path: binaries/libbox2d.*.dylib
68+
69+
macOs_x64:
70+
runs-on: macos-26-intel
71+
steps:
72+
- name: Checkout Repository
73+
uses: actions/checkout@v7
74+
- name: Configure CMake
75+
run: cmake -S src/main/resources/box2d-3.1.1/ -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBOX2D_SAMPLES=OFF -DBOX2D_UNIT_TESTS=OFF -DBOX2D_BENCHMARKS=OFF
76+
- name: Build CMake
77+
run: cmake --build build --config Release
78+
- name: Install CMake
79+
run: cmake --install build --prefix install
80+
- name: Find and copy real files
81+
run: |
82+
mkdir -p binaries
83+
find install/lib -type f -exec cp {} binaries/ \;
84+
- name: Upload Artifacts
85+
uses: actions/upload-artifact@v7
86+
with:
87+
name: macOs_x64_Artifacts
88+
path: binaries/libbox2d.*.dylib
89+
90+
Windows_x64:
91+
runs-on: windows-2025
92+
steps:
93+
- name: Checkout Repository
94+
uses: actions/checkout@v7
95+
- name: Configure CMake
96+
run: cmake -S src/main/resources/box2d-3.1.1/ -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBOX2D_SAMPLES=OFF -DBOX2D_UNIT_TESTS=OFF -DBOX2D_BENCHMARKS=OFF
97+
- name: Build CMake
98+
run: cmake --build build --config Release
99+
- name: Install CMake
100+
run: cmake --install build --prefix install
101+
- name: Upload Artifacts
102+
uses: actions/upload-artifact@v7
103+
with:
104+
name: box2d.dll
105+
path: install/bin/box2d.dll

0 commit comments

Comments
 (0)