Skip to content

Commit 08a8e23

Browse files
Lumengineclaude
andcommitted
Add Linux build workflow and preset
- Add linux-cpu-only.xml preset for Clang builds - Add BuildPhysX-Linux.yml workflow for ubuntu-latest - Configurations: debug, release, profile, checked Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 1b1db04 commit 08a8e23

2 files changed

Lines changed: 90 additions & 0 deletions

File tree

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Build PhysX (Linux)
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v5.6.0-test'
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
name: Build Linux - ${{ matrix.config }}
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
config: [debug, release, profile, checked]
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
repository: NVIDIA-Omniverse/PhysX
23+
ref: 107.0-physx-5.6.0
24+
25+
- name: Install dependencies
26+
run: |
27+
sudo apt update
28+
sudo apt install -y ninja-build cmake clang python3 libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libgl1-mesa-dev
29+
30+
- name: Download preset from GitHub
31+
run: |
32+
curl -L -o linux-cpu-only.xml https://raw.githubusercontent.com/Lumengine/PhysXBuild/main/linux-cpu-only.xml
33+
34+
- name: Copy preset into repo
35+
run: |
36+
cp linux-cpu-only.xml ./physx/buildtools/presets/public/
37+
38+
- name: Generate Projects
39+
run: |
40+
chmod +x ./generate_projects.sh
41+
./generate_projects.sh linux-cpu-only
42+
working-directory: physx
43+
44+
- name: Build
45+
continue-on-error: true
46+
run: cmake --build ./compiler/linux-cpu-only --config ${{ matrix.config }}
47+
working-directory: physx
48+
49+
- name: Package build output
50+
id: build
51+
run: |
52+
mkdir -p output/bin
53+
mkdir -p output/lib
54+
mkdir -p output/include
55+
mkdir -p output/documentation
56+
57+
binArchiveName="PhysX-5.6.0.linux.x86_64.clang.${{ matrix.config }}.tar.gz"
58+
echo "PHYSX_BINARY_ARCHIVE=$binArchiveName" >> "$GITHUB_OUTPUT"
59+
60+
# Copy shared libraries
61+
cp physx/bin/linux.clang/${{ matrix.config }}/*.so output/bin/ 2>/dev/null || true
62+
cp physx/bin/linux.clang/${{ matrix.config }}/*.a output/lib/ 2>/dev/null || true
63+
64+
# Copy headers and documentation
65+
cp -r physx/include/* output/include/
66+
cp -r physx/documentation/* output/documentation/ 2>/dev/null || true
67+
68+
# Create archive
69+
tar -czf "$binArchiveName" -C output .
70+
71+
- name: Publish
72+
uses: softprops/action-gh-release@v1
73+
with:
74+
files: |
75+
${{ steps.build.outputs.PHYSX_BINARY_ARCHIVE }}
76+
env:
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

linux-cpu-only.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<preset name="linux-cpu-only" comment="Linux PhysX general settings (cpu only)">
3+
<platform targetPlatform="linux" compiler="clang" />
4+
<CMakeSwitches>
5+
<cmakeSwitch name="PX_BUILDSNIPPETS" value="True" comment="Generate the snippets" />
6+
<cmakeSwitch name="PX_BUILDPVDRUNTIME" value="True" comment="Generate the OmniPVD project" />
7+
<cmakeSwitch name="PX_GENERATE_STATIC_LIBRARIES" value="False" comment="Generate shared libraries" />
8+
<cmakeSwitch name="PX_FLOAT_POINT_PRECISE_MATH" value="False" comment="Float point precise math" />
9+
</CMakeSwitches>
10+
<CMakeParams>
11+
<cmakeParam name="CMAKE_INSTALL_PREFIX" value="install/linux-cpu-only/PhysX" comment="Install path relative to PhysX SDK root" />
12+
</CMakeParams>
13+
</preset>

0 commit comments

Comments
 (0)