Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build static libs too. #295

Merged
merged 25 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@ runs:
rustup target add aarch64-apple-darwin
cargo build --target=aarch64-apple-darwin --release --features="${{ inputs.features }}" --no-default-features
lipo -create -output target/release/libgodot_rapier.dylib target/aarch64-apple-darwin/release/libgodot_rapier.dylib target/x86_64-apple-darwin/release/libgodot_rapier.dylib
- name: Move Static Libs macOS
shell: sh
if: ${{ inputs.arch == 'x86_64-apple-darwin'}}
run: |
mv target/x86_64-apple-darwin/release/libgodot_rapier.a target/release/libgodot_rapier.x86_64.a
mv target/aarch64-apple-darwin/release/libgodot_rapier.a target/release/libgodot_rapier.arm64.a
22 changes: 21 additions & 1 deletion .github/workflows/android_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,33 @@ name: 🤖 Android Builds
on:
workflow_call:

env:
GODOT4_BIN: godot

jobs:
android:
runs-on: "ubuntu-20.04"
name: ${{ matrix.dimensions.short }} ${{ matrix.precision }} ${{ matrix.features.name }} ${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
# disabled_arch: ["armv7-linux-androideabi"]
arch: ["x86_64-linux-android", "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
- name: Set up Java 11
uses: actions/setup-java@v4
with:
Expand Down Expand Up @@ -52,10 +64,18 @@ jobs:
shell: sh
run: |
mv target/release/libgodot_rapier.so bin${{ matrix.dimensions.short }}/addons/godot-rapier${{ matrix.dimensions.short }}/bin/libgodot_rapier.android.${{ matrix.arch }}.so
mv target/release/libgodot_rapier.a bin${{ matrix.dimensions.short }}/addons/godot-rapier${{ matrix.dimensions.short }}/bin/libgodot_rapier.android.${{ matrix.arch }}.a
- name: Upload
uses: actions/upload-artifact@v4
with:
name: godot-rapier-${{ matrix.dimensions.short }}-${{ matrix.precision }}-${{ matrix.features.name }}-${{ matrix.arch }}
path: |
bin${{ matrix.dimensions.short }}/**/*.so
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 }}
path: |
bin${{ matrix.dimensions.short }}/**/*.a
if-no-files-found: error
32 changes: 0 additions & 32 deletions .github/workflows/deploy.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/ios_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: 🍏 iOS Builds
on:
workflow_call:

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

jobs:
ios:
runs-on: "macos-latest"
Expand All @@ -16,6 +20,18 @@ 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
- name: Build
uses: ./.github/actions/build
with:
Expand All @@ -25,6 +41,7 @@ jobs:
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

- name: Upload
uses: actions/upload-artifact@v4
Expand All @@ -33,3 +50,11 @@ jobs:
path: |
bin${{ matrix.dimensions.short }}/**/*.ios
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}}
path: |
bin${{ matrix.dimensions.short }}/**/*.a
if-no-files-found: error
21 changes: 21 additions & 0 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: 🐧 Linux Builds
on:
workflow_call:

env:
GODOT4_BIN: godot

jobs:
linux:
runs-on: ubuntu-20.04
Expand All @@ -17,6 +20,16 @@ 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
- name: "Install dependencies"
shell: sh
run: |
Expand All @@ -35,11 +48,19 @@ jobs:
shell: sh
run: |
mv target/release/libgodot_rapier.so bin${{ matrix.dimensions.short }}/addons/godot-rapier${{ matrix.dimensions.short }}/bin/libgodot_rapier.linux.${{ matrix.arch }}.so
mv target/release/libgodot_rapier.a bin${{ matrix.dimensions.short }}/addons/godot-rapier${{ matrix.dimensions.short }}/bin/libgodot_rapier.linux.${{ matrix.arch }}.a
- name: Upload
uses: actions/upload-artifact@v4
with:
name: godot-rapier-${{ matrix.dimensions.short }}-${{ matrix.precision }}-${{ matrix.features.name }}-${{ matrix.arch}}
path: |
bin${{ matrix.dimensions.short }}/**/*.so
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}}
path: |
bin${{ matrix.dimensions.short }}/**/*.a
if-no-files-found: error

26 changes: 26 additions & 0 deletions .github/workflows/macos_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: 🍎 macOS Builds
on:
workflow_call:

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

jobs:
macos:
runs-on: "macos-latest"
Expand All @@ -16,6 +20,18 @@ 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
- name: Build
uses: ./.github/actions/build
with:
Expand All @@ -25,6 +41,8 @@ jobs:
shell: sh
run: |
mv target/release/libgodot_rapier.dylib bin${{ matrix.dimensions.short }}/addons/godot-rapier${{ matrix.dimensions.short }}/bin/libgodot_rapier.macos.framework/libgodot_rapier.macos.dylib
mv target/release/libgodot_rapier.arm64.a bin${{ matrix.dimensions.short }}/addons/godot-rapier${{ matrix.dimensions.short }}/bin/libgodot_rapier.macos.framework/libgodot_rapier.macos.arm64.a
mv target/release/libgodot_rapier.x86_64.a bin${{ matrix.dimensions.short }}/addons/godot-rapier${{ matrix.dimensions.short }}/bin/libgodot_rapier.macos.framework/libgodot_rapier.macos.x86_64.a
- name: Mac Sign
uses: ughuuu/godot-cpp-template/.github/actions/sign@add-more-stuff/options-to-build
with:
Expand All @@ -45,3 +63,11 @@ jobs:
bin${{ matrix.dimensions.short }}/**/*.dylib
bin${{ matrix.dimensions.short }}/**/CodeResources
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}}
path: |
bin${{ matrix.dimensions.short }}/**/*.a
if-no-files-found: error
24 changes: 24 additions & 0 deletions .github/workflows/module_builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Module Builds
on:
workflow_call:

jobs:
godot:
runs-on: "ubuntu-latest"
name: ${{ matrix.dimensions }} ${{ matrix.precision }} ${{ matrix.features }}
strategy:
fail-fast: false
matrix:
precision: [single] #, double]
dimensions: ["2d", "3d"]
features: ["simd-parallel", "enhanced-determinism"]

steps:
- uses: actions/checkout@v4
- name: Upload
uses: actions/upload-artifact@v4
with:
name: static-rapier-${{ matrix.dimensions }}-${{ matrix.precision }}-${{ matrix.features }}-module
path: |
module
if-no-files-found: error
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
contents: write
steps:
- uses: actions/checkout@v4
# dynamic
- name: Download artifacts 2d enchanced
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -37,6 +38,35 @@ jobs:
merge-multiple: true
path: godot-rapier-3d-single-simd-parallel
name: godot-rapier-3d-single-simd-parallel
# static
- name: Download artifacts 2d enchanced static
uses: actions/download-artifact@v4
with:
pattern: static-rapier-2d-single-enhanced-determinism-*
merge-multiple: true
path: static-rapier-2d-single-enhanced-determinism
name: static-rapier-2d-single-enhanced-determinism
- name: Download artifacts 2d parallel
uses: actions/download-artifact@v4
with:
pattern: static-rapier-2d-single-simd-parallel-*
merge-multiple: true
path: static-rapier-2d-single-simd-parallel
name: static-rapier-2d-single-simd-parallel
- name: Download artifacts 3d enchanced static
uses: actions/download-artifact@v4
with:
pattern: static-rapier-3d-single-enhanced-determinism-*
merge-multiple: true
path: static-rapier-3d-single-enhanced-determinism
name: static-rapier-3d-single-enhanced-determinism
- name: Download artifacts 3d parallel static
uses: actions/download-artifact@v4
with:
pattern: static-rapier-3d-single-simd-parallel-*
merge-multiple: true
path: static-rapier-3d-single-simd-parallel
name: static-rapier-3d-single-simd-parallel
- name: Delete draft release(s)
uses: hugo19941994/[email protected]
env:
Expand All @@ -45,10 +75,16 @@ jobs:
shell: sh
run: |
ls
# dynamic
zip -r "godot-rapier-2d-single-enhanced-determinism.zip" godot-rapier-2d-single-enhanced-determinism
zip -r "godot-rapier-2d-single-simd-parallel.zip" godot-rapier-2d-single-simd-parallel
zip -r "godot-rapier-3d-single-enhanced-determinism.zip" godot-rapier-3d-single-enhanced-determinism
zip -r "godot-rapier-3d-single-simd-parallel.zip" godot-rapier-3d-single-simd-parallel
# static
zip -r "static-rapier-2d-single-enhanced-determinism.zip" static-rapier-2d-single-enhanced-determinism
zip -r "static-rapier-2d-single-simd-parallel.zip" static-rapier-2d-single-simd-parallel
zip -r "static-rapier-3d-single-enhanced-determinism.zip" static-rapier-3d-single-enhanced-determinism
zip -r "static-rapier-3d-single-simd-parallel.zip" static-rapier-3d-single-simd-parallel
- name: Release
uses: softprops/action-gh-release@v2
with:
Expand All @@ -58,6 +94,10 @@ jobs:
godot-rapier-2d-single-simd-parallel.zip
godot-rapier-3d-single-enhanced-determinism.zip
godot-rapier-3d-single-simd-parallel.zip
static-rapier-2d-single-enhanced-determinism.zip
static-rapier-2d-single-simd-parallel.zip
static-rapier-3d-single-enhanced-determinism.zip
static-rapier-3d-single-simd-parallel.zip
generate_release_notes: true
draft: true
prerelease: true
Expand Down
29 changes: 23 additions & 6 deletions .github/workflows/runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,20 @@ jobs:
name: Godot
uses: ./.github/workflows/godot_builds.yml

module-build:
name: Module
uses: ./.github/workflows/module_builds.yml

web-build:
name: 🌐 Web Builds
uses: ./.github/workflows/web_builds.yml

merge:
runs-on: ubuntu-latest
name: Merge
needs: [android-build, ios-build, linux-build, macos-build, windows-build, godot-build, web-build]
needs: [android-build, ios-build, linux-build, macos-build, windows-build, godot-build, module-build, web-build]
steps:
# dynamic
- uses: actions/upload-artifact/merge@v4
with:
name: godot-rapier-2d-single-simd-parallel
Expand All @@ -69,6 +74,23 @@ jobs:
with:
name: godot-rapier-3d-single-enhanced-determinism
pattern: godot-rapier-3d-single-enhanced-determinism-*
# static
- uses: actions/upload-artifact/merge@v4
with:
name: static-rapier-2d-single-simd-parallel
pattern: static-rapier-2d-single-simd-parallel-*
- uses: actions/upload-artifact/merge@v4
with:
name: static-rapier-2d-single-enhanced-determinism
pattern: static-rapier-2d-single-enhanced-determinism-*
- uses: actions/upload-artifact/merge@v4
with:
name: static-rapier-3d-single-simd-parallel
pattern: static-rapier-3d-single-simd-parallel-*
- uses: actions/upload-artifact/merge@v4
with:
name: static-rapier-3d-single-enhanced-determinism
pattern: static-rapier-3d-single-enhanced-determinism-*

release:
name: Create Release
Expand All @@ -77,8 +99,3 @@ jobs:
needs: [merge]
uses: ./.github/workflows/release.yml
if: github.ref == 'refs/heads/main'

deploy:
name: Deploy Release to Godot Asset Library
uses: ./.github/workflows/deploy.yml
if: startsWith(github.event.ref, 'refs/tags/v')
Loading