From d0e42b6a6b67a5ef6d81c93bf6382b8098a0cb12 Mon Sep 17 00:00:00 2001 From: Alexander Loren Date: Wed, 26 Aug 2026 11:42:32 -0700 Subject: [PATCH] Action to build and archive the libraries --- .gitea/actions/Build Library.yml | 93 ++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 .gitea/actions/Build Library.yml diff --git a/.gitea/actions/Build Library.yml b/.gitea/actions/Build Library.yml new file mode 100644 index 0000000..33f3203 --- /dev/null +++ b/.gitea/actions/Build Library.yml @@ -0,0 +1,93 @@ +name: Build and Bundle + +on: + push: + workflow_dispatch: + +jobs: + macos: + name: macOS + runs-on: macos-26 + defaults: + run: + working-directory: ./Swift + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build + run: | + swift build -c release + BIN_PATH=$(swift build -c release --show-bin-path) + mkdir -p artifacts + cp "$BIN_PATH/libLogic.dylib" artifacts/ + cp "$BIN_PATH/libSwiftGodot.dylib" artifacts/ + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: Logic-macOS + path: artifacts/* + + windows: + name: Windows + runs-on: windows-11 + defaults: + run: + working-directory: ./Swift + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build + run: | + swift build -c release + $binPath = swift build -c release --show-bin-path + New-Item -ItemType Directory -Path artifacts -Force + Copy-Item -Path "$binPath/libLogic.dll" -Destination artifacts/ + + - name: Bundle DLLs + uses: https://git.omgitsalexl.me/omgitsalexl/windows-collect-dependencies@v1.0.3 + with: + executable: artifacts/libLogic.dll + output: artifacts/ + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: Logic-windows + path: artifacts/* + + ubuntu: + name: Ubuntu + runs-on: ubuntu-24.04 + defaults: + run: + working-directory: ./Swift + container: + image: git.omgitsalexl.me/omgitsalexl/ci-swift:6.3.3 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build + run: | + swift build -c release + BIN_PATH=$(swift build -c release --show-bin-path) + mkdir -p artifacts + cp -r "$BIN_PATH/libLogic.so" artifacts/ + + - name: Bundle Shared Libraries + uses: https://git.omgitsalexl.me/omgitsalexl/linux-collect-dependencies@v1.0.1 + with: + executable: artifacts/libLogic.so + output: artifacts/ + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: Logic-ubuntu + path: artifacts/*