Files
godot-build-action-example/.gitea/workflows/Build Debug Library.yml
T
omgitsalexl 3b746e285b
Build Debug Library / Ubuntu (push) Successful in 2m48s
Build Debug Library / macOS (push) Successful in 4m3s
Build Debug Library / Windows (push) Successful in 10m41s
Added caching the build artifacts
2026-08-27 11:39:02 -07:00

120 lines
3.5 KiB
YAML

name: Build Debug Library
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: Cache Build
uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-swift-${{ hashFiles('Package.resolved') }}
restore-keys: |
${{ runner.os }}-swift-
- name: Build
run: |
swift build -Xswiftc -no-verify-emitted-module-interface
BIN_PATH=$(swift build --show-bin-path)
mkdir -p "${{github.workspace}}/artifacts/"
cp "$BIN_PATH/libLogic.dylib" "${{github.workspace}}/artifacts/"
cp "$BIN_PATH/libSwiftGodot.dylib" "${{github.workspace}}/artifacts/"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: Logic-macOS
path: "${{github.workspace}}/artifacts/*"
windows:
name: Windows
runs-on: windows-11
defaults:
run:
working-directory: ./Swift
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Build
uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-swift-${{ hashFiles('Package.resolved') }}
restore-keys: |
${{ runner.os }}-swift-
- name: Build
run: |
swift build -Xswiftc -no-verify-emitted-module-interface
$binPath = swift build --show-bin-path
New-Item -ItemType Directory -Path "${{github.workspace}}/artifacts" -Force
Copy-Item -Path "$binPath/Logic.dll" -Destination "${{github.workspace}}/artifacts/"
Copy-Item -Path "$binPath/SwiftGodot.dll" -Destination "${{github.workspace}}/artifacts/"
- name: Bundle Logic DLLs
uses: https://git.omgitsalexl.me/omgitsalexl/windows-collect-dependencies@v1.0.3
with:
executable: "${{github.workspace}}/artifacts/Logic.dll"
output: "${{github.workspace}}/artifacts/"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: Logic-windows
path: "${{github.workspace}}/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: Cache Build
uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-swift-${{ hashFiles('Package.resolved') }}
restore-keys: |
${{ runner.os }}-swift-
- name: Build
run: |
swift build -Xswiftc -no-verify-emitted-module-interface
BIN_PATH=$(swift build --show-bin-path)
mkdir -p "${{github.workspace}}/artifacts/"
cp "$BIN_PATH/libLogic.so" "${{github.workspace}}/artifacts/"
cp "$BIN_PATH/libSwiftGodot.so" "${{github.workspace}}/artifacts/"
- name: Bundle libLogic Libraries
uses: https://git.omgitsalexl.me/omgitsalexl/linux-collect-dependencies@v1.0.1
with:
executable: "${{github.workspace}}/artifacts/libLogic.so"
output: "${{github.workspace}}/artifacts/"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: Logic-ubuntu
path: "${{github.workspace}}/artifacts/*"