Skip to content

Commit

Permalink
fix build for missing platforms (#329)
Browse files Browse the repository at this point in the history
Testing if this fixes anything.
  • Loading branch information
Ughuuu authored Feb 8, 2025
1 parent 0c8f94f commit 877a551
Show file tree
Hide file tree
Showing 21 changed files with 295 additions and 178 deletions.
4 changes: 4 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ linker = "aarch64-linux-android23-clang"
linker = "x86_64-linux-android23-clang"
[target.i686-linux-android]
linker = "i686-linux-android23-clang"
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"
4 changes: 4 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ inputs:
runs:
using: composite
steps:
- name: Show targets
shell: sh
run: |
rustc --print=target-list
- name: Rust Add target
shell: sh
run: |
Expand Down
28 changes: 11 additions & 17 deletions .github/workflows/android_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,28 @@ name: 🤖 Android Builds
on:
workflow_call:

env:
GODOT4_BIN: godot

jobs:
android:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
name: ${{ matrix.dimensions.short }} ${{ matrix.precision }} ${{ matrix.features.name }} ${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
arch: ["x86_64-linux-android", "aarch64-linux-android", "i686-linux-android"]
arch: ["x86_64-linux-android", "armv7-linux-androideabi", "aarch64-linux-android", "i686-linux-android"]
precision: [single] #, double]
dimensions: [{"feature": "dim2", "short": "2d"}, {"feature": "dim3", "short": "3d"}]
features: [{"feature":"simd-stable,serde-serialize,experimental-threads", "name": "simd-parallel"}, {"feature":"enhanced-determinism,serde-serialize,experimental-threads", "name": "enhanced-determinism"}]

steps:
- uses: actions/checkout@v4
#- uses: chickensoft-games/setup-godot@v1
# name: 🤖 Setup Godot
# with:
# version: 4.3.0
# use-dotnet: false
#- name: 🔬 Verify Setup
# run: |
# godot --version
# which godot
# GODOT4_BIN=godot
- uses: blazium-engine/setup-blazium@master
name: 🤖 Setup Blazium
with:
version: 0.1.184-nightly
- name: 🔬 Verify Setup
run: |
Blazium --version
echo "GODOT4_BIN=$BLAZIUM_EDITOR" >> $GITHUB_ENV
- name: Set up Java 11
uses: actions/setup-java@v4
with:
Expand All @@ -50,8 +45,7 @@ jobs:
run: |
echo "CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=${{steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android23-clang" >> $GITHUB_ENV
echo "CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER=${{steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android23-clang" >> $GITHUB_ENV
# This is not find when compiling
# echo "CARGO_TARGET_ARMV7_LINUX_ANDROID_LINKER=${{steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi23-clang" >> $GITHUB_ENV
echo "CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=${{steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi23-clang" >> $GITHUB_ENV
echo "CARGO_TARGET_I686_LINUX_ANDROID_LINKER=${{steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android23-clang" >> $GITHUB_ENV
echo "CLANG_PATH=${{steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang" >> $GITHUB_ENV
echo "LIBCLANG_PATH=${{steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/lib64/libclang.so.12git" >> $GITHUB_ENV
Expand Down
38 changes: 17 additions & 21 deletions .github/workflows/ios_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,54 @@ on:
workflow_call:

env:
GODOT4_BIN: godot
LLVM_PATH: /opt/homebrew/opt/llvm/bin

jobs:
ios:
runs-on: "macos-latest"
name: ${{ matrix.dimensions.short }} ${{ matrix.precision }} ${{ matrix.features.name }} ${{ matrix.arch }}
name: ${{ matrix.dimensions.short }} ${{ matrix.precision }} ${{ matrix.features.name }} ${{ matrix.arch.name }}
strategy:
fail-fast: false
matrix:
arch: ["aarch64-apple-ios"]
arch: [{"name" : "arm64", "rust": "aarch64-apple-ios"}, {"name" : "x86_64", "rust": "x86_64-apple-ios"}]
precision: [single] #, double]
dimensions: [{"feature": "dim2", "short": "2d"}, {"feature": "dim3", "short": "3d"}]
features: [{"feature":"simd-stable,serde-serialize,experimental-threads", "name": "simd-parallel"}, {"feature":"enhanced-determinism,serde-serialize,experimental-threads", "name": "enhanced-determinism"}]

steps:
- uses: actions/checkout@v4
#- uses: chickensoft-games/setup-godot@v1
# name: 🤖 Setup Godot
# with:
# version: 4.3.0
# use-dotnet: false
#- name: 🔬 Verify Setup
# run: |
# godot --version
# which godot
# GODOT4_BIN=godot
# brew install llvm
# brew link llvm
- uses: blazium-engine/setup-blazium@master
name: 🤖 Setup Blazium
with:
version: 0.1.184-nightly
- name: 🔬 Verify Setup
run: |
Blazium --version
echo "GODOT4_BIN=$BLAZIUM_EDITOR" >> $GITHUB_ENV
- name: Build
uses: ./.github/actions/build
with:
arch: ${{ matrix.arch }}
arch: ${{ matrix.arch.rust }}
features: ${{ matrix.features.feature }},${{ matrix.precision }}-${{ matrix.dimensions.feature }}
- name: Copy to bin
shell: sh
run: |
mv target/release/libgodot_rapier.dylib bin${{ matrix.dimensions.short }}/addons/godot-rapier${{ matrix.dimensions.short }}/bin/libgodot_rapier.ios.framework/libgodot_rapier.ios
mv target/release/libgodot_rapier.a bin${{ matrix.dimensions.short }}/addons/godot-rapier${{ matrix.dimensions.short }}/bin/libgodot_rapier.ios.framework/libgodot_rapier.a
ls target/release
mv target/release/libgodot_rapier.dylib bin${{ matrix.dimensions.short }}/addons/godot-rapier${{ matrix.dimensions.short }}/bin/libgodot_rapier.ios.${{ matrix.arch.name }}.framework/libgodot_rapier
mv target/release/libgodot_rapier.a bin${{ matrix.dimensions.short }}/addons/godot-rapier${{ matrix.dimensions.short }}/bin/libgodot_rapier.ios.${{ matrix.arch.name }}.framework/libgodot_rapier.a
- name: Upload
uses: actions/upload-artifact@v4
with:
name: godot-rapier-${{ matrix.dimensions.short }}-${{ matrix.precision }}-${{ matrix.features.name }}-${{ matrix.arch}}
name: godot-rapier-${{ matrix.dimensions.short }}-${{ matrix.precision }}-${{ matrix.features.name }}-${{ matrix.arch.rust}}
path: |
bin${{ matrix.dimensions.short }}/**/*.ios
bin${{ matrix.dimensions.short }}/**/libgodot_rapier
if-no-files-found: error

- name: Upload Static
uses: actions/upload-artifact@v4
with:
name: static-rapier-${{ matrix.dimensions.short }}-${{ matrix.precision }}-${{ matrix.features.name }}-${{ matrix.arch}}
name: static-rapier-${{ matrix.dimensions.short }}-${{ matrix.precision }}-${{ matrix.features.name }}-${{ matrix.arch.rust}}
path: |
bin${{ matrix.dimensions.short }}/**/*.a
if-no-files-found: error
31 changes: 15 additions & 16 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,42 @@ name: 🐧 Linux Builds
on:
workflow_call:

env:
GODOT4_BIN: godot

jobs:
linux:
runs-on: ubuntu-20.04
runs-on: "ubuntu-22.04"
name: ${{ matrix.dimensions.short }} ${{ matrix.precision }} ${{ matrix.features.name }} ${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
#arch: ["i686-unknown-linux-gnu", "aarch64-unknown-linux-gnu"]
arch: ["x86_64-unknown-linux-gnu"]
arch: ["x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu", "aarch64-unknown-linux-gnu", "armv7-unknown-linux-gnueabihf"]
precision: [single] #, double]
dimensions: [{"feature": "dim2", "short": "2d"}, {"feature": "dim3", "short": "3d"}]
features: [{"feature":"simd-stable,serde-serialize,experimental-threads", "name": "simd-parallel"}, {"feature":"enhanced-determinism,serde-serialize,experimental-threads", "name": "enhanced-determinism"}]

steps:
- uses: actions/checkout@v4
#- uses: chickensoft-games/setup-godot@v1
# name: 🤖 Setup Godot
# with:
# version: 4.3.0
# use-dotnet: false
#- name: 🔬 Verify Setup
# run: |
# godot --version
# which godot
# GODOT4_BIN=godot
- uses: blazium-engine/setup-blazium@master
name: 🤖 Setup Blazium
with:
version: 0.1.184-nightly
- name: 🔬 Verify Setup
run: |
Blazium --version
echo "GODOT4_BIN=$BLAZIUM_EDITOR" >> $GITHUB_ENV
- name: "Install dependencies"
shell: sh
run: |
sudo dpkg --add-architecture aarch64
sudo apt-get update
sudo apt-get install libunwind-dev
sudo apt-get install build-essential
sudo apt-get install pkg-config
sudo apt-get install libssl-dev
sudo apt-get install zlib1g-dev
# Multi platform build
sudo apt-get install gcc-multilib g++-multilib libc6-dev-i386
# Arm64 and arm32
sudo apt install gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf
- name: Build
uses: ./.github/actions/build
with:
Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/macos_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
workflow_call:

env:
GODOT4_BIN: godot
LLVM_PATH: /opt/homebrew/opt/llvm/bin

jobs:
Expand All @@ -20,18 +19,14 @@ jobs:

steps:
- uses: actions/checkout@v4
#- uses: chickensoft-games/setup-godot@v1
# name: 🤖 Setup Godot
# with:
# version: 4.3.0
# use-dotnet: false
#- name: 🔬 Verify Setup
# run: |
# godot --version
# which godot
# GODOT4_BIN=godot
# brew install llvm
# brew link llvm
- uses: blazium-engine/setup-blazium@master
name: 🤖 Setup Blazium
with:
version: 0.1.184-nightly
- name: 🔬 Verify Setup
run: |
Blazium --version
echo "GODOT4_BIN=$BLAZIUM_EDITOR" >> $GITHUB_ENV
- name: Build
uses: ./.github/actions/build
with:
Expand Down
25 changes: 10 additions & 15 deletions .github/workflows/web_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ name: 🌐 Web Builds
on:
workflow_call:

env:
GODOT4_BIN: godot

jobs:
web:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
name: ${{ matrix.dimensions.short }} ${{ matrix.precision }} ${{ matrix.features.name }} ${{ matrix.arch }}
strategy:
fail-fast: false
Expand All @@ -22,16 +19,14 @@ jobs:

steps:
- uses: actions/checkout@v4
#- uses: chickensoft-games/setup-godot@v1
# name: 🤖 Setup Godot
# with:
# version: 4.3.0
# use-dotnet: false
#- name: 🔬 Verify Setup
# run: |
# godot --version
# which godot
# GODOT4_BIN=godot
- uses: blazium-engine/setup-blazium@master
name: 🤖 Setup Blazium
with:
version: 0.1.184-nightly
- name: 🔬 Verify Setup
run: |
Blazium --version
echo "GODOT4_BIN=$BLAZIUM_EDITOR" >> $GITHUB_ENV
- name: Set up Emscripten latest
uses: mymindstorm/setup-emsdk@v14
with:
Expand All @@ -52,7 +47,7 @@ jobs:
mkdir -p bin2d/addons/godot-rapier2d/bin/wasm-nothreads
mkdir -p bin3d/addons/godot-rapier3d/bin/wasm-nothreads
if: "${{ matrix.build_param.folder == 'wasm-nothreads' }}"

- name: Build
uses: ./.github/actions/build
with:
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/windows_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,29 @@ name: 🏁 Windows Builds
on:
workflow_call:

env:
GODOT4_BIN: C:\Users\runneradmin\bin\godot.exe

jobs:
build-windows:
runs-on: "windows-latest"
name: ${{ matrix.dimensions.short }} ${{ matrix.precision }} ${{ matrix.features.name }} ${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
arch: ["x86_64-pc-windows-msvc", "i686-pc-windows-msvc", "aarch64-pc-windows-msvc"]
# ARM32 Is not officially supported yet, you need to self build rust target.
arch: ["x86_64-pc-windows-msvc", "i686-pc-windows-msvc", "aarch64-pc-windows-msvc"] #, "thumbv7a-pc-windows-msvc"]
precision: [single] #, double]
dimensions: [{"feature": "dim2", "short": "2d"}, {"feature": "dim3", "short": "3d"}]
features: [{"feature":"simd-stable,serde-serialize,experimental-threads", "name": "simd-parallel"}, {"feature":"enhanced-determinism,serde-serialize,experimental-threads", "name": "enhanced-determinism"}]

steps:
- uses: actions/checkout@v4
#- name: 🔬 Verify Setup
# run: |
# choco install llvm
- uses: blazium-engine/setup-blazium@master
name: 🤖 Setup Blazium
with:
version: 0.1.184-nightly
- name: 🔬 Verify Setup
run: |
Blazium --version
echo "GODOT4_BIN=$BLAZIUM_EDITOR" >> $GITHUB_ENV
- name: Build
uses: ./.github/actions/build
with:
Expand Down
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ bin3d/samples/godot-rapier3d/addons/**
target

!bin2d/addons/godot-rapier2d/bin/libgodot_rapier.macos.framework/Resources/Info.plist
!bin2d/addons/godot-rapier2d/bin/libgodot_rapier.ios.framework/Info.plist
!bin2d/addons/godot-rapier2d/bin/libgodot_rapier.ios.arm64.framework/Info.plist
!bin2d/addons/godot-rapier2d/bin/libgodot_rapier.ios.x86_64.framework/Info.plist

!bin3d/addons/godot-rapier3d/bin/libgodot_rapier.macos.framework/Resources/Info.plist
!bin3d/addons/godot-rapier3d/bin/libgodot_rapier.ios.framework/Info.plist
!bin3d/addons/godot-rapier3d/bin/libgodot_rapier.ios.arm64.framework/Info.plist
!bin3d/addons/godot-rapier3d/bin/libgodot_rapier.ios.x86_64.framework/Info.plist

# Binaries
*.os
Expand Down
Loading

0 comments on commit 877a551

Please sign in to comment.