-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Add initial GitHub Actions setup for main platforms
- Loading branch information
Showing
7 changed files
with
195 additions
and
10 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
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,25 @@ | ||
name: Build GDSiON extension | ||
description: Build the exntesion with provided options. | ||
|
||
inputs: | ||
target: | ||
description: The build configuration target (template_release, template_debug). | ||
default: "template_release" | ||
sconsflags: | ||
default: "" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Build with scons | ||
shell: sh | ||
env: | ||
SCONSFLAGS: ${{ inputs.sconsflags }} | ||
run: | | ||
echo "Building with flags:" platform=${{ env.SCONS_PLATFORM }} target=${{ inputs.target }} ${{ env.SCONSFLAGS }} | ||
scons platform=${{ env.SCONS_PLATFORM }} target=${{ inputs.target }} ${{ env.SCONSFLAGS }} | ||
echo "Build results:" | ||
ls -l bin/ | ||
echo "Example project build results:" | ||
ls -l example/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,29 @@ | ||
name: Install build dependencies | ||
description: Set up python, install the pip version of scons. | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v5 | ||
with: | ||
# Semantic version range syntax or exact version of a Python version | ||
python-version: "3.x" | ||
|
||
- name: Install scons | ||
shell: bash | ||
run: | | ||
python -c "import sys; print(sys.version)" | ||
python -m pip install scons==4.4.0 | ||
scons --version | ||
- name: Install Emscripten (Web) | ||
if: ${{ env.SCONS_PLATFORM == 'web' }} | ||
uses: mymindstorm/setup-emsdk@v14 | ||
with: | ||
version: 3.1.39 | ||
|
||
- name: Verify Emscripten (Web) | ||
if: ${{ env.SCONS_PLATFORM == 'web' }} | ||
run: | | ||
emcc -v |
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,30 @@ | ||
name: Upload GDSiON release | ||
description: Strip and upload the build artifacts. | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Prepare the binaries (Linux) | ||
if: ${{ env.SCONS_PLATFORM == 'linux' }} | ||
run: | | ||
strip bin/libgdsion.linux.* | ||
chmod +x bin/libgdsion.linux.* | ||
- name: Prepare the binaries (macOS) | ||
if: ${{ env.SCONS_PLATFORM == 'macos' }} | ||
run: | | ||
strip bin/libgdsion.macos.* | ||
chmod +x bin/libgdsion.macos.* | ||
- name: Prepare the binaries (Windows) | ||
if: ${{ env.SCONS_PLATFORM == 'windows' }} | ||
run: | | ||
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force | ||
- name: Upload the binaries | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: libgdsion-${{ env.SCONS_PLATFORM }} | ||
path: "bin/*" | ||
retention-days: 14 | ||
|
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,98 @@ | ||
name: Built Unstable (main branch) | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
# Make sure jobs cannot overlap. | ||
concurrency: | ||
group: build-unstable-main | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-linux: | ||
name: Compile and publish Linux version | ||
runs-on: ubuntu-latest | ||
env: | ||
SCONS_PLATFORM: linux | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install build dependencies | ||
uses: ./.github/actions/install-deps | ||
|
||
- name: Setup GCC problem matcher | ||
uses: ammaraskar/gcc-problem-matcher@master | ||
|
||
- name: Build GDSiON | ||
uses: ./.github/actions/build-extension | ||
with: | ||
target: template_release | ||
|
||
- name: Upload release | ||
uses: ./.github/actions/upload-extension | ||
|
||
build-macos: | ||
name: Compile and publish macOS version | ||
runs-on: macos-latest | ||
env: | ||
SCONS_PLATFORM: macos | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install build dependencies | ||
uses: ./.github/actions/install-deps | ||
|
||
- name: Build GDSiON | ||
uses: ./.github/actions/build-extension | ||
with: | ||
target: template_release | ||
|
||
- name: Upload release | ||
uses: ./.github/actions/upload-extension | ||
|
||
build-windows: | ||
name: Compile and publish Windows version | ||
runs-on: windows-latest | ||
env: | ||
SCONS_PLATFORM: windows | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install build dependencies | ||
uses: ./.github/actions/install-deps | ||
|
||
- name: Setup MSVC problem matcher | ||
uses: ammaraskar/msvc-problem-matcher@master | ||
|
||
- name: Build GDSiON | ||
uses: ./.github/actions/build-extension | ||
with: | ||
target: template_release | ||
|
||
- name: Upload release | ||
uses: ./.github/actions/upload-extension | ||
|
||
build-web: | ||
name: Compile and publish Web version | ||
runs-on: ubuntu-latest | ||
env: | ||
SCONS_PLATFORM: web | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install build dependencies | ||
uses: ./.github/actions/install-deps | ||
|
||
- name: Build GDSiON | ||
uses: ./.github/actions/build-extension | ||
with: | ||
target: template_release | ||
|
||
- name: Upload release | ||
uses: ./.github/actions/upload-extension |
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
bin/* | ||
!bin/*.gdextension | ||
example/bin/ | ||
example/export/ | ||
|
||
### Godot project development ### | ||
|
||
|
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