Debug and release builds now as separate actions
This commit is contained in:
@@ -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 -Xswiftc -no-verify-emitted-module-interface
|
||||||
|
BIN_PATH=$(swift build --show-bin-path)
|
||||||
|
mkdir -p 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: 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/"
|
||||||
|
|
||||||
|
- name: Bundle 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: Build
|
||||||
|
run: |
|
||||||
|
swift build -Xswiftc -no-verify-emitted-module-interface
|
||||||
|
BIN_PATH=$(swift build --show-bin-path)
|
||||||
|
mkdir -p artifacts
|
||||||
|
cp "$BIN_PATH/libLogic.so" "${{github.workspace}}/artifacts/"
|
||||||
|
|
||||||
|
- name: Bundle Shared 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/*"
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
name: Build and Bundle
|
name: Build and Bundle
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -21,14 +20,14 @@ jobs:
|
|||||||
swift build -c release -Xswiftc -no-verify-emitted-module-interface
|
swift build -c release -Xswiftc -no-verify-emitted-module-interface
|
||||||
BIN_PATH=$(swift build -c release --show-bin-path)
|
BIN_PATH=$(swift build -c release --show-bin-path)
|
||||||
mkdir -p artifacts
|
mkdir -p artifacts
|
||||||
cp "$BIN_PATH/libLogic.dylib" artifacts/
|
cp "$BIN_PATH/libLogic.dylib" "${{github.workspace}}/artifacts/"
|
||||||
cp "$BIN_PATH/libSwiftGodot.dylib" artifacts/
|
cp "$BIN_PATH/libSwiftGodot.dylib" "${{github.workspace}}/artifacts/"
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Logic-macOS
|
name: Logic-macOS
|
||||||
path: artifacts/*
|
path: "${{github.workspace}}/artifacts/*"
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
name: Windows
|
name: Windows
|
||||||
@@ -90,4 +89,4 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Logic-ubuntu
|
name: Logic-ubuntu
|
||||||
path: "${{github.workspace}}/artifacts/*
|
path: "${{github.workspace}}/artifacts/*"
|
||||||
Reference in New Issue
Block a user