Skip to content

Commit cc06efa

Browse files
authored
build static libs too. (#295)
1 parent c37cb8e commit cc06efa

23 files changed

+430
-90
lines changed

.github/actions/build/action.yml

+6
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,9 @@ runs:
4040
rustup target add aarch64-apple-darwin
4141
cargo build --target=aarch64-apple-darwin --release --features="${{ inputs.features }}" --no-default-features
4242
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
43+
- name: Move Static Libs macOS
44+
shell: sh
45+
if: ${{ inputs.arch == 'x86_64-apple-darwin'}}
46+
run: |
47+
mv target/x86_64-apple-darwin/release/libgodot_rapier.a target/release/libgodot_rapier.x86_64.a
48+
mv target/aarch64-apple-darwin/release/libgodot_rapier.a target/release/libgodot_rapier.arm64.a

.github/workflows/android_builds.yml

+21-1
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,33 @@ name: 🤖 Android Builds
22
on:
33
workflow_call:
44

5+
env:
6+
GODOT4_BIN: godot
7+
58
jobs:
69
android:
710
runs-on: "ubuntu-20.04"
811
name: ${{ matrix.dimensions.short }} ${{ matrix.precision }} ${{ matrix.features.name }} ${{ matrix.arch }}
912
strategy:
1013
fail-fast: false
1114
matrix:
12-
# disabled_arch: ["armv7-linux-androideabi"]
1315
arch: ["x86_64-linux-android", "aarch64-linux-android", "i686-linux-android"]
1416
precision: [single] #, double]
1517
dimensions: [{"feature": "dim2", "short": "2d"}, {"feature": "dim3", "short": "3d"}]
1618
features: [{"feature":"simd-stable,serde-serialize,experimental-threads", "name": "simd-parallel"}, {"feature":"enhanced-determinism,serde-serialize,experimental-threads", "name": "enhanced-determinism"}]
1719

1820
steps:
1921
- uses: actions/checkout@v4
22+
#- uses: chickensoft-games/setup-godot@v1
23+
# name: 🤖 Setup Godot
24+
# with:
25+
# version: 4.3.0
26+
# use-dotnet: false
27+
#- name: 🔬 Verify Setup
28+
# run: |
29+
# godot --version
30+
# which godot
31+
# GODOT4_BIN=godot
2032
- name: Set up Java 11
2133
uses: actions/setup-java@v4
2234
with:
@@ -52,10 +64,18 @@ jobs:
5264
shell: sh
5365
run: |
5466
mv target/release/libgodot_rapier.so bin${{ matrix.dimensions.short }}/addons/godot-rapier${{ matrix.dimensions.short }}/bin/libgodot_rapier.android.${{ matrix.arch }}.so
67+
mv target/release/libgodot_rapier.a bin${{ matrix.dimensions.short }}/addons/godot-rapier${{ matrix.dimensions.short }}/bin/libgodot_rapier.android.${{ matrix.arch }}.a
5568
- name: Upload
5669
uses: actions/upload-artifact@v4
5770
with:
5871
name: godot-rapier-${{ matrix.dimensions.short }}-${{ matrix.precision }}-${{ matrix.features.name }}-${{ matrix.arch }}
5972
path: |
6073
bin${{ matrix.dimensions.short }}/**/*.so
6174
if-no-files-found: error
75+
- name: Upload Static
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: static-rapier-${{ matrix.dimensions.short }}-${{ matrix.precision }}-${{ matrix.features.name }}-${{ matrix.arch }}
79+
path: |
80+
bin${{ matrix.dimensions.short }}/**/*.a
81+
if-no-files-found: error

.github/workflows/deploy.yml

-32
This file was deleted.

.github/workflows/ios_builds.yml

+25
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: 🍏 iOS Builds
22
on:
33
workflow_call:
44

5+
env:
6+
GODOT4_BIN: godot
7+
LLVM_PATH: /opt/homebrew/opt/llvm/bin
8+
59
jobs:
610
ios:
711
runs-on: "macos-latest"
@@ -16,6 +20,18 @@ jobs:
1620

1721
steps:
1822
- uses: actions/checkout@v4
23+
#- uses: chickensoft-games/setup-godot@v1
24+
# name: 🤖 Setup Godot
25+
# with:
26+
# version: 4.3.0
27+
# use-dotnet: false
28+
#- name: 🔬 Verify Setup
29+
# run: |
30+
# godot --version
31+
# which godot
32+
# GODOT4_BIN=godot
33+
# brew install llvm
34+
# brew link llvm
1935
- name: Build
2036
uses: ./.github/actions/build
2137
with:
@@ -25,6 +41,7 @@ jobs:
2541
shell: sh
2642
run: |
2743
mv target/release/libgodot_rapier.dylib bin${{ matrix.dimensions.short }}/addons/godot-rapier${{ matrix.dimensions.short }}/bin/libgodot_rapier.ios.framework/libgodot_rapier.ios
44+
mv target/release/libgodot_rapier.a bin${{ matrix.dimensions.short }}/addons/godot-rapier${{ matrix.dimensions.short }}/bin/libgodot_rapier.ios.framework/libgodot_rapier.a
2845
2946
- name: Upload
3047
uses: actions/upload-artifact@v4
@@ -33,3 +50,11 @@ jobs:
3350
path: |
3451
bin${{ matrix.dimensions.short }}/**/*.ios
3552
if-no-files-found: error
53+
54+
- name: Upload Static
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: static-rapier-${{ matrix.dimensions.short }}-${{ matrix.precision }}-${{ matrix.features.name }}-${{ matrix.arch}}
58+
path: |
59+
bin${{ matrix.dimensions.short }}/**/*.a
60+
if-no-files-found: error

.github/workflows/linux_builds.yml

+21
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: 🐧 Linux Builds
22
on:
33
workflow_call:
44

5+
env:
6+
GODOT4_BIN: godot
7+
58
jobs:
69
linux:
710
runs-on: ubuntu-20.04
@@ -17,6 +20,16 @@ jobs:
1720

1821
steps:
1922
- uses: actions/checkout@v4
23+
#- uses: chickensoft-games/setup-godot@v1
24+
# name: 🤖 Setup Godot
25+
# with:
26+
# version: 4.3.0
27+
# use-dotnet: false
28+
#- name: 🔬 Verify Setup
29+
# run: |
30+
# godot --version
31+
# which godot
32+
# GODOT4_BIN=godot
2033
- name: "Install dependencies"
2134
shell: sh
2235
run: |
@@ -35,11 +48,19 @@ jobs:
3548
shell: sh
3649
run: |
3750
mv target/release/libgodot_rapier.so bin${{ matrix.dimensions.short }}/addons/godot-rapier${{ matrix.dimensions.short }}/bin/libgodot_rapier.linux.${{ matrix.arch }}.so
51+
mv target/release/libgodot_rapier.a bin${{ matrix.dimensions.short }}/addons/godot-rapier${{ matrix.dimensions.short }}/bin/libgodot_rapier.linux.${{ matrix.arch }}.a
3852
- name: Upload
3953
uses: actions/upload-artifact@v4
4054
with:
4155
name: godot-rapier-${{ matrix.dimensions.short }}-${{ matrix.precision }}-${{ matrix.features.name }}-${{ matrix.arch}}
4256
path: |
4357
bin${{ matrix.dimensions.short }}/**/*.so
4458
if-no-files-found: error
59+
- name: Upload Static
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: static-rapier-${{ matrix.dimensions.short }}-${{ matrix.precision }}-${{ matrix.features.name }}-${{ matrix.arch}}
63+
path: |
64+
bin${{ matrix.dimensions.short }}/**/*.a
65+
if-no-files-found: error
4566

.github/workflows/macos_builds.yml

+26
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: 🍎 macOS Builds
22
on:
33
workflow_call:
44

5+
env:
6+
GODOT4_BIN: godot
7+
LLVM_PATH: /opt/homebrew/opt/llvm/bin
8+
59
jobs:
610
macos:
711
runs-on: "macos-latest"
@@ -16,6 +20,18 @@ jobs:
1620

1721
steps:
1822
- uses: actions/checkout@v4
23+
#- uses: chickensoft-games/setup-godot@v1
24+
# name: 🤖 Setup Godot
25+
# with:
26+
# version: 4.3.0
27+
# use-dotnet: false
28+
#- name: 🔬 Verify Setup
29+
# run: |
30+
# godot --version
31+
# which godot
32+
# GODOT4_BIN=godot
33+
# brew install llvm
34+
# brew link llvm
1935
- name: Build
2036
uses: ./.github/actions/build
2137
with:
@@ -25,6 +41,8 @@ jobs:
2541
shell: sh
2642
run: |
2743
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
44+
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
45+
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
2846
- name: Mac Sign
2947
uses: ughuuu/godot-cpp-template/.github/actions/sign@add-more-stuff/options-to-build
3048
with:
@@ -45,3 +63,11 @@ jobs:
4563
bin${{ matrix.dimensions.short }}/**/*.dylib
4664
bin${{ matrix.dimensions.short }}/**/CodeResources
4765
if-no-files-found: error
66+
67+
- name: Upload Static
68+
uses: actions/upload-artifact@v4
69+
with:
70+
name: static-rapier-${{ matrix.dimensions.short }}-${{ matrix.precision }}-${{ matrix.features.name }}-${{ matrix.arch}}
71+
path: |
72+
bin${{ matrix.dimensions.short }}/**/*.a
73+
if-no-files-found: error

.github/workflows/module_builds.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Module Builds
2+
on:
3+
workflow_call:
4+
5+
jobs:
6+
godot:
7+
runs-on: "ubuntu-latest"
8+
name: ${{ matrix.dimensions }} ${{ matrix.precision }} ${{ matrix.features }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
precision: [single] #, double]
13+
dimensions: ["2d", "3d"]
14+
features: ["simd-parallel", "enhanced-determinism"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Upload
19+
uses: actions/upload-artifact@v4
20+
with:
21+
name: static-rapier-${{ matrix.dimensions }}-${{ matrix.precision }}-${{ matrix.features }}-module
22+
path: |
23+
module
24+
if-no-files-found: error

.github/workflows/release.yml

+40
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
contents: write
1010
steps:
1111
- uses: actions/checkout@v4
12+
# dynamic
1213
- name: Download artifacts 2d enchanced
1314
uses: actions/download-artifact@v4
1415
with:
@@ -37,6 +38,35 @@ jobs:
3738
merge-multiple: true
3839
path: godot-rapier-3d-single-simd-parallel
3940
name: godot-rapier-3d-single-simd-parallel
41+
# static
42+
- name: Download artifacts 2d enchanced static
43+
uses: actions/download-artifact@v4
44+
with:
45+
pattern: static-rapier-2d-single-enhanced-determinism-*
46+
merge-multiple: true
47+
path: static-rapier-2d-single-enhanced-determinism
48+
name: static-rapier-2d-single-enhanced-determinism
49+
- name: Download artifacts 2d parallel
50+
uses: actions/download-artifact@v4
51+
with:
52+
pattern: static-rapier-2d-single-simd-parallel-*
53+
merge-multiple: true
54+
path: static-rapier-2d-single-simd-parallel
55+
name: static-rapier-2d-single-simd-parallel
56+
- name: Download artifacts 3d enchanced static
57+
uses: actions/download-artifact@v4
58+
with:
59+
pattern: static-rapier-3d-single-enhanced-determinism-*
60+
merge-multiple: true
61+
path: static-rapier-3d-single-enhanced-determinism
62+
name: static-rapier-3d-single-enhanced-determinism
63+
- name: Download artifacts 3d parallel static
64+
uses: actions/download-artifact@v4
65+
with:
66+
pattern: static-rapier-3d-single-simd-parallel-*
67+
merge-multiple: true
68+
path: static-rapier-3d-single-simd-parallel
69+
name: static-rapier-3d-single-simd-parallel
4070
- name: Delete draft release(s)
4171
uses: hugo19941994/[email protected]
4272
env:
@@ -45,10 +75,16 @@ jobs:
4575
shell: sh
4676
run: |
4777
ls
78+
# dynamic
4879
zip -r "godot-rapier-2d-single-enhanced-determinism.zip" godot-rapier-2d-single-enhanced-determinism
4980
zip -r "godot-rapier-2d-single-simd-parallel.zip" godot-rapier-2d-single-simd-parallel
5081
zip -r "godot-rapier-3d-single-enhanced-determinism.zip" godot-rapier-3d-single-enhanced-determinism
5182
zip -r "godot-rapier-3d-single-simd-parallel.zip" godot-rapier-3d-single-simd-parallel
83+
# static
84+
zip -r "static-rapier-2d-single-enhanced-determinism.zip" static-rapier-2d-single-enhanced-determinism
85+
zip -r "static-rapier-2d-single-simd-parallel.zip" static-rapier-2d-single-simd-parallel
86+
zip -r "static-rapier-3d-single-enhanced-determinism.zip" static-rapier-3d-single-enhanced-determinism
87+
zip -r "static-rapier-3d-single-simd-parallel.zip" static-rapier-3d-single-simd-parallel
5288
- name: Release
5389
uses: softprops/action-gh-release@v2
5490
with:
@@ -58,6 +94,10 @@ jobs:
5894
godot-rapier-2d-single-simd-parallel.zip
5995
godot-rapier-3d-single-enhanced-determinism.zip
6096
godot-rapier-3d-single-simd-parallel.zip
97+
static-rapier-2d-single-enhanced-determinism.zip
98+
static-rapier-2d-single-simd-parallel.zip
99+
static-rapier-3d-single-enhanced-determinism.zip
100+
static-rapier-3d-single-simd-parallel.zip
61101
generate_release_notes: true
62102
draft: true
63103
prerelease: true

.github/workflows/runner.yml

+23-6
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,20 @@ jobs:
4444
name: Godot
4545
uses: ./.github/workflows/godot_builds.yml
4646

47+
module-build:
48+
name: Module
49+
uses: ./.github/workflows/module_builds.yml
50+
4751
web-build:
4852
name: 🌐 Web Builds
4953
uses: ./.github/workflows/web_builds.yml
5054

5155
merge:
5256
runs-on: ubuntu-latest
5357
name: Merge
54-
needs: [android-build, ios-build, linux-build, macos-build, windows-build, godot-build, web-build]
58+
needs: [android-build, ios-build, linux-build, macos-build, windows-build, godot-build, module-build, web-build]
5559
steps:
60+
# dynamic
5661
- uses: actions/upload-artifact/merge@v4
5762
with:
5863
name: godot-rapier-2d-single-simd-parallel
@@ -69,6 +74,23 @@ jobs:
6974
with:
7075
name: godot-rapier-3d-single-enhanced-determinism
7176
pattern: godot-rapier-3d-single-enhanced-determinism-*
77+
# static
78+
- uses: actions/upload-artifact/merge@v4
79+
with:
80+
name: static-rapier-2d-single-simd-parallel
81+
pattern: static-rapier-2d-single-simd-parallel-*
82+
- uses: actions/upload-artifact/merge@v4
83+
with:
84+
name: static-rapier-2d-single-enhanced-determinism
85+
pattern: static-rapier-2d-single-enhanced-determinism-*
86+
- uses: actions/upload-artifact/merge@v4
87+
with:
88+
name: static-rapier-3d-single-simd-parallel
89+
pattern: static-rapier-3d-single-simd-parallel-*
90+
- uses: actions/upload-artifact/merge@v4
91+
with:
92+
name: static-rapier-3d-single-enhanced-determinism
93+
pattern: static-rapier-3d-single-enhanced-determinism-*
7294

7395
release:
7496
name: Create Release
@@ -77,8 +99,3 @@ jobs:
7799
needs: [merge]
78100
uses: ./.github/workflows/release.yml
79101
if: github.ref == 'refs/heads/main'
80-
81-
deploy:
82-
name: Deploy Release to Godot Asset Library
83-
uses: ./.github/workflows/deploy.yml
84-
if: startsWith(github.event.ref, 'refs/tags/v')

0 commit comments

Comments
 (0)