Skip to content

Commit

Permalink
Merge pull request #5 from FibreFoX/github_workflows
Browse files Browse the repository at this point in the history
Add GitHub workflows for generating binaries
  • Loading branch information
JekSun97 authored Aug 25, 2024
2 parents 0431c1f + dd6bead commit 22e3f67
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 2 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/build-with-github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build With Github
on: [push]
jobs:
Build-Linux:
strategy:
matrix:
godot_cpp_branch: [4.1, 4.2, 4.3]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
# clone current repo
- uses: actions/checkout@v4
# clone required Godot source code into subfolder
- uses: actions/checkout@v4
with:
repository: 'godotengine/godot-cpp'
ref: ${{ matrix.godot_cpp_branch }}
path: 'godot-cpp'
submodules: true
- uses: actions/setup-python@v5
with:
python-version: '3.11'
# install build dependencies/tools
- run: python -m pip install scons
- name: Install and cache required 32bit packages
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: awalsh128/[email protected]
with:
packages: gcc-multilib g++-multilib
# compile binaries
- name: build binaries
if: ${{ matrix.os != 'macos-latest' }}
run: |
scons target=template_debug arch=x86_32 debug_symbols=yes production=yes
scons target=template_release arch=x86_32 debug_symbols=yes production=yes
scons target=template_debug arch=x86_64 debug_symbols=yes production=yes
scons target=template_release arch=x86_64 debug_symbols=yes production=yes
- name: build MacOS binaries
if: ${{ matrix.os == 'macos-latest' }}
run: |
scons target=template_debug arch=x86_64
scons target=template_release arch=x86_64
scons target=template_debug arch=arm64
scons target=template_release arch=arm64
lipo -create demo/addons/tree3d/libtree3d.macos.template_release.framework/libtree3d.macos.template_release.arm64 demo/addons/tree3d/libtree3d.macos.template_release.framework/libtree3d.macos.template_release.x86_64 -output demo/addons/tree3d/libtree3d.macos.template_release.framework/libtree3d.macos.template_release.universal
lipo -create demo/addons/tree3d/libtree3d.macos.template_debug.framework/libtree3d.macos.template_debug.arm64 demo/addons/tree3d/libtree3d.macos.template_debug.framework/libtree3d.macos.template_debug.x86_64 -output demo/addons/tree3d/libtree3d.macos.template_debug.framework/libtree3d.macos.template_debug.universal
- name: archive built binaries
uses: actions/upload-artifact@v4
with:
name: ${{ format('binaries-{0}-{1}', matrix.os, matrix.godot_cpp_branch) }}
if-no-files-found: 'error'
path: |
demo/addons/tree3d/libtree3d.*
4 changes: 2 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ sources = Glob("src/*.cpp")

if env["platform"] == "macos":
library = env.SharedLibrary(
"demo/addons/tree3d/libtree3d.{}.{}.framework/libtree3d.{}.{}".format(
env["platform"], env["target"], env["platform"], env["target"]
"demo/addons/tree3d/libtree3d.{}.{}.framework/libtree3d.{}.{}.{}".format(
env["platform"], env["target"], env["platform"], env["target"], env["arch"]
),
source=sources,
)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 22e3f67

Please sign in to comment.