-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into bindnode-crossplatform
- Loading branch information
Showing
2 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build and Distribute Dynamic Library (Linux) | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: "source" | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Swift | ||
uses: swift-actions/setup-swift@v2 | ||
with: | ||
swift-version: '5.9' | ||
|
||
- name: Build dynamic library | ||
run: | | ||
swift build -c release | ||
- name: Create libraries directory | ||
run: mkdir -p libraries | ||
|
||
- name: Copy dynamic library | ||
run: cp .build/release/libPlatformer3D.so libraries/ | ||
|
||
- name: Find and copy dependencies | ||
run: | | ||
for lib in $(ldd .build/release/libPlatformer3D.so | grep "=> /" | awk '{print $3}'); do | ||
cp $lib libraries/ | ||
done | ||
- name: Install zip | ||
run: sudo apt-get install -y zip | ||
|
||
- name: Create zip archive | ||
run: zip -r ~/linux-build.zip libraries | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dynamic-libraries | ||
path: ~/linux-build.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Build and Distribute Dynamic Library (Windows) | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
defaults: | ||
run: | ||
working-directory: "source" | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Swift | ||
uses: compnerd/gha-setup-swift@main | ||
with: | ||
branch: swift-5.9.1-release | ||
tag: 5.9.1-RELEASE | ||
|
||
- name: Build dynamic library | ||
run: | | ||
swift build -c release | ||
- name: Create libraries directory | ||
run: New-Item -Path libraries -ItemType Directory | ||
|
||
- name: Copy dynamic library | ||
run: Copy-Item .build\release\*.dll libraries\ | ||
|
||
- name: Create zip archive | ||
run: Compress-Archive -Path libraries\* -DestinationPath windows-build.zip | ||
shell: pwsh | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dynamic-libraries | ||
path: ./source/windows-build.zip |