Skip to content

Commit 3e82324

Browse files
committed
probably broken github actions
1 parent 43cfdec commit 3e82324

9 files changed

Lines changed: 173 additions & 254 deletions

File tree

.github/actions/build-plugin/action.yml

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@ inputs:
66
required: true
77
default: ''
88
description: Rust target platform.
9-
extra_flags:
10-
required: false
11-
default: ''
12-
description: Rust extra flags.
13-
features:
14-
required: false
15-
default: ''
16-
description: simd-nightly,simd-stable,parallel,enhanced-determinism
179

1810
runs:
1911
using: composite
@@ -26,33 +18,27 @@ runs:
2618
shell: sh
2719
run: |
2820
rustc --print=target-list
29-
- name: Rust Add target
21+
- name: Add additional arm64 target for macOS
22+
shell: sh
23+
if: ${{ inputs.arch == 'x86_64-apple-darwin'}}
24+
rustup target add aarch64-apple-darwin
25+
- name: Rust add current target
3026
shell: sh
3127
run: |
3228
rustup target add ${{ inputs.arch }}
33-
#--features="${{ inputs.features }}" --no-default-features
34-
- name: Build
29+
- name: Build for Windows and Linux
3530
shell: sh
31+
if: ${{ inputs.arch == 'x86_64-apple-darwin'}}
32+
run: |
33+
just build-patchwork release ${{ inputs.arch }}
34+
- name: Build for Mac
35+
shell: sh
36+
if: ${{ inputs.arch == 'x86_64-apple-darwin'}}
3637
run: |
37-
cargo build --target=${{ inputs.arch }} --release ${{ inputs.extra_flags}}
38+
just build-patchwork release "all-apple-darwin"
3839
- name: Copy to release
3940
shell: sh
4041
run: |
4142
mkdir -p target/release
4243
rm -rf target/release
4344
cp -rf target/${{ inputs.arch }}/release target/release
44-
- name: Build Rapier Macos Universal
45-
shell: sh
46-
# we already built for x86_64-apple-darwin for mac, now build arm64
47-
if: ${{ inputs.arch == 'x86_64-apple-darwin'}}
48-
run: |
49-
mkdir -p target/release
50-
rustup target add aarch64-apple-darwin
51-
cargo build --target=aarch64-apple-darwin --release
52-
lipo -create -output target/release/libpatchwork_rust_core.dylib target/aarch64-apple-darwin/release/libpatchwork_rust_core.dylib target/x86_64-apple-darwin/release/libpatchwork_rust_core.dylib
53-
- name: Move Static Libs macOS
54-
shell: sh
55-
if: ${{ inputs.arch == 'x86_64-apple-darwin'}}
56-
run: |
57-
mv target/x86_64-apple-darwin/release/libpatchwork_rust_core.a target/release/libpatchwork_rust_core.x86_64.a
58-
mv target/aarch64-apple-darwin/release/libpatchwork_rust_core.a target/release/libpatchwork_rust_core.arm64.a

.github/workflows/all_editor_builds.yml

Lines changed: 16 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Editor All Platforms
1+
name: 🤖 Build Godot for All Platforms
22
on:
33
workflow_call:
44

@@ -7,7 +7,8 @@ on:
77
env:
88
GODOT_REPOSITORY: godotengine/godot
99
GODOT_BASE_BRANCH: master
10-
# Change Developers.md too
10+
# Change Developers.md and Justfile too
11+
# TODO (Lilith): Input these values from a .env file in both justfile and here
1112
GODOT_MAIN_SYNC_REF: bb92a4c8e27e30cdec05ab6d540d724b9b3cfb72
1213
SCONSFLAGS: verbose=yes warnings=all werror=no module_text_server_fb_enabled=yes minizip=yes deprecated=yes module_patchwork_editor_enabled=yes
1314
SCONSFLAGS_TEMPLATE: no_editor_splash=yes module_camera_enabled=no module_mobile_vr_enabled=no module_upnp_enabled=no module_websocket_enabled=no module_csg_enabled=yes module_gridmap_enabled=yes use_static_cpp=yes builtin_freetype=yes builtin_libpng=yes builtin_zlib=yes builtin_libwebp=yes builtin_libvorbis=yes builtin_libogg=yes disable_3d=no
@@ -26,15 +27,15 @@ jobs:
2627
fail-fast: false
2728
matrix:
2829
include:
29-
- name: "Windows Editor"
30+
- name: "🪟 Build Godot for Windows"
3031
os: "windows-latest"
3132
id: windows-editor
3233
platform: windows
3334
target: editor
3435
sconsflags: tests=yes debug_symbols=yes
3536
bin: ./bin/godot.windows.editor.x86_64.exe
3637

37-
- name: "🐧 Linux Editor"
38+
- name: "🐧 Build Godot for Linux"
3839
os: "ubuntu-22.04"
3940
id: linux-editor
4041
platform: linux
@@ -43,7 +44,7 @@ jobs:
4344
sconsflags-template: optimize=size use_lto=yes debug_symbols=no
4445
bin: ./bin/godot.linuxbsd.editor.x86_64
4546

46-
- name: "🍎 macOS Editor"
47+
- name: "🍎 Build Godot for macOS"
4748
os: "macos-14"
4849
id: macos-editor
4950
platform: macos
@@ -58,16 +59,21 @@ jobs:
5859
repository: ${{env.GODOT_REPOSITORY}}
5960
ref: ${{env.GODOT_MAIN_SYNC_REF}}
6061

61-
- name: checkout-patchwork_editor
62+
- name: checkout-patchwork-godot-plugin
6263
uses: actions/checkout@v4
6364
with:
64-
path: modules/patchwork_editor
65+
path: tmp/patchwork-godot-plugin
6566
fetch-depth: 0
67+
68+
- name: copy editor directory
69+
shell: bash
70+
run: |
71+
cp -R tmp/patchwork-godot-plugin/editor modules/patchwork_editor
6672
6773
- name: copy actions
6874
shell: bash
6975
run: |
70-
cp -R modules/patchwork_editor/.github/actions/* .github/actions/
76+
cp -R tmp/patchwork-godot-plugin/.github/actions/* .github/actions/
7177
7278
- name: Select Xcode 16
7379
if: matrix.platform == 'macos'
@@ -171,8 +177,8 @@ jobs:
171177
- uses: actions/upload-artifact@v4
172178
if: matrix.id != 'linux-sanitizers'
173179
with:
174-
name: patchwork_editor-${{ matrix.platform }}
175-
path: ${{github.workspace}}/bin/*
180+
name: godot-with-patchwork-${{ matrix.platform }}
181+
path: ${{ github.workspace }}/bin/*
176182
retention-days: 90
177183

178184
# test:
@@ -231,46 +237,3 @@ jobs:
231237
# shell: bash
232238
# run: |
233239
# ${{matrix.bin}} --headless --test --force-colors "--test-case=[patchwork_editor]*"
234-
235-
release:
236-
if: startsWith(github.ref, 'refs/tags/')
237-
runs-on: "ubuntu-latest"
238-
permissions:
239-
contents: write
240-
needs: [build]
241-
steps:
242-
- name: Download Linux artifact
243-
uses: actions/download-artifact@v4
244-
with:
245-
name: patchwork_editor-linux
246-
path: artifacts/linux
247-
- name: Download MacOS artifact
248-
uses: actions/download-artifact@v4
249-
with:
250-
name: patchwork_editor-macos
251-
path: artifacts/macos
252-
- name: Download Windows artifact
253-
uses: actions/download-artifact@v4
254-
with:
255-
name: patchwork_editor-windows
256-
path: artifacts/windows
257-
- name: Zip artifacts
258-
run: |
259-
ls -la artifacts/*
260-
cd artifacts/windows
261-
zip -r9 "../patchwork_editor-${{ github.ref_name }}-windows.zip" *
262-
cd ../..
263-
cd artifacts/macos
264-
chmod a+x godot_macos_editor.app/Contents/MacOS/Godot
265-
zip -r9 "../patchwork_editor-${{ github.ref_name }}-macos.zip" *
266-
cd ../..
267-
cd artifacts/linux
268-
chmod a+x *
269-
zip -r9 "../patchwork_editor-${{ github.ref_name }}-linux.zip" *
270-
- name: Release
271-
uses: nikitalita/action-gh-release@v1.0
272-
with:
273-
files: |
274-
artifacts/patchwork_editor-${{ github.ref_name }}-windows.zip
275-
artifacts/patchwork_editor-${{ github.ref_name }}-macos.zip
276-
artifacts/patchwork_editor-${{ github.ref_name }}-linux.zip
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: 🧵 Compose Projects
2+
on:
3+
workflow_call:
4+
5+
jobs:
6+
compose-projects:
7+
runs-on: "ubuntu-latest"
8+
name: 🪡 Compose ${{ matrix.project.name }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
# TODO (Lilith): Input these values from a .env file in both justfile and here
13+
project:
14+
- name: threadbare
15+
repo: endlessm/threadbare
16+
ref: godot-4.6
17+
- name: moddable-platformer
18+
repo: endlessm/moddable-platformer
19+
ref: godot-4.6
20+
steps:
21+
- name: Checkout project
22+
uses: actions/checkout@v4
23+
with:
24+
repository: ${{ matrix.project.repo }}
25+
ref: ${{ matrix.project.ref }}
26+
path: ${{ matrix.project.name }}
27+
fetch-depth: 0
28+
persist-credentials: false
29+
- name: Download Patchwork
30+
uses: actions/download-artifact@v4
31+
with:
32+
pattern: patchwork-godot-plugin
33+
path: ${{ matrix.project.name }}/addons/patchwork
34+
- name: Upload
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: ${{ matrix.project.name }}-with-patchwork
38+
path: |
39+
${{ matrix.project.name }}
40+
if-no-files-found: error
41+

.github/workflows/linux_builds.yml

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: 🐧 Linux Builds
1+
name: 🐧 Build Patchwork for Linux
22
on:
33
workflow_call:
44

55
jobs:
66
linux:
77
runs-on: "ubuntu-22.04"
8-
name: linux ${{ matrix.arch }}
8+
name: 📐 Build ${{ matrix.arch }}
99
strategy:
1010
fail-fast: false
1111
matrix:
@@ -15,10 +15,9 @@ jobs:
1515
#"armv7-unknown-linux-gnueabihf", # TODO: fix this, newer godot-rust is failing to build for arm32
1616
#"i686-unknown-linux-gnu"
1717
]
18-
include-static-libs: [false]
19-
2018
steps:
2119
- uses: actions/checkout@v4
20+
2221
- name: "Install dependencies"
2322
shell: sh
2423
run: |
@@ -43,25 +42,12 @@ jobs:
4342
uses: ./.github/actions/build-plugin
4443
with:
4544
arch: ${{ matrix.arch }}
46-
# features: ${{ matrix.features.feature }},${{ matrix.precision }}-${{ matrix.dimensions.feature }}
47-
- name: Copy to bin
48-
shell: sh
49-
run: |
50-
mkdir -p rust/plugin/linux
51-
cp target/release/libpatchwork_rust_core.so rust/plugin/linux/libpatchwork_rust_core.linux.${{ matrix.arch }}.so
52-
ls -la rust/plugin/linux
53-
- name: Copy static lib
54-
if: ${{ matrix.include-static-libs }}
55-
shell: sh
56-
run: |
57-
mkdir -p rust/plugin/linux
58-
cp target/release/libpatchwork_rust_core.a rust/plugin/linux/libpatchwork_rust_core.linux.${{ matrix.arch }}.a
59-
ls -la rust/plugin/linux
45+
6046
- name: Upload
6147
uses: actions/upload-artifact@v4
6248
with:
63-
name: patchwork-godot-linux-${{ matrix.arch }}
49+
name: patchwork-build-linux-${{ matrix.arch }}
6450
path: |
65-
rust/plugin/linux/*
51+
build/patchwork/*
6652
if-no-files-found: error
6753

.github/workflows/macos_builds.yml

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 🍎 macOS Builds
1+
name: 🍎 Build Patchwork for macOS
22
on:
33
workflow_call:
44

@@ -8,17 +8,14 @@ env:
88
jobs:
99
macos:
1010
runs-on: "macos-14"
11-
name: ${{ matrix.arch }}
11+
name: 📐 Build ${{ matrix.arch }}
1212
strategy:
1313
fail-fast: false
1414
matrix:
1515
arch: ["x86_64-apple-darwin"]
16-
include-static-libs: [false]
17-
1816
steps:
1917
- uses: actions/checkout@v4
2018

21-
# restore cache
2219
- name: Restore Cache
2320
uses: Swatinem/rust-cache@v2
2421
with:
@@ -28,39 +25,23 @@ jobs:
2825
uses: ./.github/actions/build-plugin
2926
with:
3027
arch: ${{ matrix.arch }}
31-
# features: ${{ matrix.features.feature }},${{ matrix.precision }}-${{ matrix.dimensions.feature }}
32-
33-
- name: Copy to bin
34-
shell: sh
35-
run: |
36-
mkdir -p rust/plugin/macos/libpatchwork_rust_core.macos.framework
37-
cp target/release/libpatchwork_rust_core.dylib rust/plugin/macos/libpatchwork_rust_core.macos.framework/libpatchwork_rust_core.macos.dylib
38-
ls -la rust/plugin/macos/libpatchwork_rust_core.macos.framework
39-
40-
- name: Copy static libs
41-
if: ${{ matrix.include-static-libs }}
42-
shell: sh
43-
run: |
44-
mkdir -p rust/plugin/macos/libpatchwork_rust_core.macos.framework
45-
cp target/release/libpatchwork_rust_core.arm64.a rust/plugin/macos/libpatchwork_rust_core.macos.framework/libpatchwork_rust_core.macos.arm64.a
46-
cp target/release/libpatchwork_rust_core.x86_64.a rust/plugin/macos/libpatchwork_rust_core.macos.framework/libpatchwork_rust_core.macos.x86_64.a
47-
ls -la rust/plugin/macos/libpatchwork_rust_core.macos.framework
4828

4929
- name: Mac Sign
5030
uses: ./.github/actions/macos-sign
5131
with:
52-
FRAMEWORK_PATH: ${{ github.workspace }}/rust/plugin/macos/libpatchwork_rust_core.macos.framework
32+
FRAMEWORK_PATH: ${{ github.workspace }}/build/patchwork/bin/libpatchwork_rust_core.macos.framework
5333
SIGN_FLAGS: "--deep"
5434
APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
5535
APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }}
5636
APPLE_DEV_PASSWORD: ${{ secrets.APPLE_DEV_PASSWORD }}
5737
APPLE_DEV_ID: ${{ secrets.APPLE_DEV_ID }}
5838
APPLE_DEV_TEAM_ID: ${{ secrets.APPLE_DEV_TEAM_ID }}
5939
APPLE_DEV_APP_ID: ${{ secrets.APPLE_DEV_APP_ID }}
40+
6041
- name: Upload
6142
uses: actions/upload-artifact@v4
6243
with:
63-
name: patchwork-godot-macos-${{ matrix.arch}}
44+
name: patchwork-build-macos-${{ matrix.arch }}
6445
path: |
65-
rust/plugin/macos/**/*
46+
build/patchwork/*
6647
if-no-files-found: error

.github/workflows/merge_builds.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: 🧩 Merge Patchwork Builds
2+
on:
3+
workflow_call:
4+
5+
jobs:
6+
merge-builds:
7+
runs-on: "ubuntu-latest"
8+
name: 🧩 Merge Patchwork Builds
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
# TODO (Lilith): Input these values from a .env file in both justfile and here
13+
project:
14+
- name: threadbare
15+
repo: endlessm/threadbare
16+
ref: godot-4.6
17+
- name: moddable-platformer
18+
repo: endlessm/moddable-platformer
19+
ref: godot-4.6
20+
steps:
21+
# just download the artifacts from the macos, windows and linux plugin builds
22+
- name: Download artifacts
23+
uses: actions/download-artifact@v4
24+
with:
25+
pattern: patchwork-build-*
26+
path: ${{ GITHUB_WORKSPACE }}/patchwork-godot-plugin
27+
merge-multiple: true
28+
- name: Wut
29+
run: |
30+
ls -la ${{ GITHUB_WORKSPACE }}/patchwork-godot-plugin/bin || echo "No artifacts"
31+
32+
- name: Upload patchwork-godot-plugin
33+
uses: actions/upload-artifact@v4
34+
with:
35+
path: patchwork-godot-plugin
36+
name: patchwork-godot-plugin

0 commit comments

Comments
 (0)