-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74cb8aa
commit 9e3e106
Showing
25 changed files
with
293 additions
and
510 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,19 @@ | ||
name: scons | ||
description: Install SCons | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install SCons for Linux | ||
if: runner.os == 'linux' | ||
run: python -m pip install scons | ||
shell: bash | ||
- name: Install SCons for MacOS | ||
if: runner.os == 'macos' | ||
run: brew install scons | ||
shell: bash | ||
- name: Print versions | ||
run: | | ||
python --version | ||
scons --version | ||
shell: bash |
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 |
---|---|---|
@@ -1,88 +1,36 @@ | ||
name: Build CI | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
on: [push, pull_request, workflow_dispatch, workflow_call] | ||
|
||
jobs: | ||
linux-debug: | ||
name: Linux debug build | ||
runs-on: ubuntu-latest | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
target: [template_debug, template_release] | ||
include: | ||
- os: ubuntu-latest | ||
platform: linux | ||
- os: macos-latest | ||
platform: macos | ||
- target: template_debug | ||
target-type: debug | ||
- target: template_release | ||
target-type: release | ||
name: ${{ matrix.platform }} ${{ matrix.target-type }} build | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Install SCons | ||
run: | | ||
python -m pip install scons | ||
python --version | ||
scons --version | ||
uses: ./.github/composite/scons | ||
- name: Build library | ||
run: ./build_linux.sh debug | ||
run: scons platform=${{ matrix.platform }} target=${{ matrix.target }} | ||
- name: Upload artificat | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: linux-debug-${{ github.sha }} | ||
name: ${{ matrix.platform }}-${{ matrix.target-type }}-${{ github.sha }} | ||
if-no-files-found: error | ||
path: bin/ | ||
|
||
linux-release: | ||
name: Linux release build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: Install SCons | ||
run: | | ||
python -m pip install scons | ||
python --version | ||
scons --version | ||
- name: Build library | ||
run: ./build_linux.sh release | ||
- name: Upload artificat | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: linux-release-${{ github.sha }} | ||
if-no-files-found: error | ||
path: bin/ | ||
|
||
macos-debug: | ||
name: MacOS debug build | ||
runs-on: macos-11 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: Install SCons | ||
run: | | ||
brew install scons | ||
python --version | ||
scons --version | ||
- name: Build library | ||
run: ./build_mac.sh debug | ||
- name: Upload artificat | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: macos-debug-${{ github.sha }} | ||
if-no-files-found: error | ||
path: bin/ | ||
|
||
macos-release: | ||
name: MacOS release build | ||
runs-on: macos-11 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: Install SCons | ||
run: | | ||
brew install scons | ||
python --version | ||
scons --version | ||
- name: Build library | ||
run: ./build_mac.sh release | ||
- name: Upload artificat | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: macos-release-${{ github.sha }} | ||
if-no-files-found: error | ||
path: bin/ |
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,55 @@ | ||
name: Draft new release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+*' | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
release: | ||
name: Create release draft | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
env: | ||
package: godot-unix-socket-${{ github.ref_name }}.zip | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: bin | ||
|
||
- name: Generate addon files | ||
shell: bash | ||
run: | | ||
DIR=addons/unix-socket | ||
mkdir -p $DIR | ||
cp -r bin/*/* $DIR | ||
cat <<EOF > $DIR/lib.gdextension | ||
[configuration] | ||
entry_symbol = "unixsocket_library_init" | ||
[libraries] | ||
linux.debug.x86_64 = "$DIR/libunixsocket.linux.template_debug.x86_64.so" | ||
linux.release.x86_64 = "$DIR/libunixsocket.linux.template_release.x86_64.so" | ||
macos.debug = "$DIR/libunixsocket.macos.template_debug.framework" | ||
macos.release = "$DIR/libunixsocket.macos.tempalte_release.framework" | ||
EOF | ||
zip $package -r $DIR | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
name: Godot UNIX Socket ${{ github.ref_name }} | ||
files: | | ||
${{ env.package }} | ||
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[submodule "godot-cpp"] | ||
path = godot-cpp | ||
url = https://github.com/godotengine/godot-cpp | ||
branch = 3.x | ||
branch = master |
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
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
Oops, something went wrong.