Skip to content

Commit

Permalink
More GA fun
Browse files Browse the repository at this point in the history
  • Loading branch information
Gramps committed Feb 8, 2024
1 parent 3dbd2ee commit 43ac349
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 89 deletions.
53 changes: 50 additions & 3 deletions .github/workflows/build-linux-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ on:

jobs:
build-linux:
runs-on: self-hosted
runs-on: ubuntu-20.04

steps:
# Checkout Godot
Expand Down Expand Up @@ -56,25 +56,72 @@ jobs:
repository: ${{ secrets.steamworks_sdk_repo }}
token: ${{ secrets.steamworks_sdk_repo_token }}
ref: ${{ inputs.steamworks_sdk_tag }}

- name: Copy Steamworks
run: |
mkdir godot/modules/godotsteam_server/sdk/public
cp -r steamworks/public godot/modules/godotsteam_server/sdk
cp -r steamworks/redistributable_bin godot/modules/godotsteam_server/sdk
- name: Install gcc-multilib
if: ${{ startsWith(matrix.opts.arch, 'x86_32') && startsWith(matrix.opts.runner,'ubuntu-') }}
shell: sh
run: |
sudo apt-get update
sudo apt install gcc-multilib g++-multilib
- name: Install buildroot x86_64
shell: sh
run: |
sudo apt-get update
sudo apt-get install yasm
cd /opt
curl -LO https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
tar xf x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
rm -f x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
mv x86_64-godot-linux-gnu_sdk-buildroot buildroot
cd buildroot
./relocate-sdk.sh
- name: Set up Python
uses: actions/setup-python@v5

- name: Set up SCons
shell: bash
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons
scons --version
- name: Load .scons_cache directory
id: godot-extension-cache
uses: actions/cache@v4
with:
path: ${{github.workspace}}/.scons_cache/
key: ${{github.job}}-${{env.BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: |
${{github.job}}-${{env.BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.BASE_BRANCH}}-${{env.BASE_BRANCH}}
# Build the server module
- name: Build Linux Binary
shell: sh
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
SCONS_CACHE_LIMIT: 7168
working-directory: "godot"
run: |
PATH=/opt/x86_64-godot-linux-gnu_sdk-buildroot/bin:$PATH scons ${{ inputs.build_params }}
PATH=/opt/buildroot/bin:$PATH/bin:$PATH scons ${{ inputs.build_params }}
mv bin/${{ inputs.binary_name }} bin/${{ inputs.export_name }}
- name: Upload Linux Build
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact_name }}
path: godot/bin/${{ inputs.export_name }}
overwrite: true
retention-days: 1

- name: Upload Linux Steam File
uses: actions/upload-artifact@v4
with:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/build-macos-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
uses: actions/checkout@v4
with:
path: "godotsteam_server"

- name: Copy GodotSteam Server Module
run: |
cp -r godotsteam_server godot/modules/godotsteam_server
Expand All @@ -53,6 +54,7 @@ jobs:
repository: ${{ secrets.steamworks_sdk_repo }}
token: ${{ secrets.steamworks_sdk_repo_token }}
ref: ${{ inputs.steamworks_sdk_tag }}

- name: Copy Steamworks
run: |
cp -r steamworks/public godot/modules/godotsteam_server/sdk
Expand All @@ -78,6 +80,7 @@ jobs:
done
rm -f /tmp/vulkan-sdk.dmg
echo 'Vulkan SDK installed successfully!'
- name: Install Build Tools
run: |
brew install scons yasm
Expand All @@ -87,6 +90,7 @@ jobs:
working-directory: "godot"
run: |
scons ${{ inputs.build_params }}
- name: Upload MacOS Build
uses: actions/upload-artifact@v4
with:
Expand All @@ -95,6 +99,7 @@ jobs:
if-no-files-found: error
overwrite: true
retention-days: 1

- name: Upload MacOS Steam Dylib
uses: actions/upload-artifact@v4
with:
Expand All @@ -103,12 +108,14 @@ jobs:
if-no-files-found: error
overwrite: true
retention-days: 1

- name: Zip the MacOS Apps
run: |
pushd godot/misc/dist
zip -r ./macos_tools.zip ./macos_tools.app/
zip -r ./macos_template.zip ./macos_template.app/
popd
- name: Upload MacOS Tool App
uses: actions/upload-artifact@v4
with:
Expand All @@ -117,6 +124,7 @@ jobs:
if-no-files-found: error
overwrite: true
retention-days: 1

- name: Upload MacOS Template App
uses: actions/upload-artifact@v4
with:
Expand Down
171 changes: 85 additions & 86 deletions .github/workflows/build-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,86 +45,85 @@ jobs:
gv=${gv%-*}
echo "godot_version=${gv}" >> $GITHUB_OUTPUT
################# Linux 64 Builds #################
# Commented out until we fix up custom runners
# build-linux-editor:
# needs: [env-setup]
# uses: ./.github/workflows/build-linux-artifact.yml
# with:
# steamworks_sdk_tag: ${{ inputs.steamworks_sdk_tag }}
# godot_tag: ${{ inputs.godot_tag }}
# binary_name: "godot.linuxbsd.editor.x86_64"
# export_name: "linux-${{ needs.env-setup.outputs.godot_version }}-editor.x86_64"
# build_params: "-j4 platform=linuxbsd production=yes tools=yes target=editor bits=64 warnings=extra"
# artifact_name: "linux-editor"
# secrets:
# steamworks_sdk_repo: ${{ secrets.STEAMWORKS_SDK_REPO }}
# steamworks_sdk_repo_token: ${{ secrets.STEAMWORKS_SDK_REPO_TOKEN }}
#
# build-linux-release-template:
# needs: [env-setup]
# uses: ./.github/workflows/build-linux-artifact.yml
# with:
# steamworks_sdk_tag: ${{ inputs.steamworks_sdk_tag }}
# godot_tag: ${{ inputs.godot_tag }}
# binary_name: "godot.linuxbsd.template_release.x86_64"
# export_name: "linux-${{ needs.env-setup.outputs.godot_version }}-template.x86_64"
# build_params: "-j4 platform=linuxbsd production=yes tools=yes target=template_release bits=64 warnings=extra"
# artifact_name: "linux-release-template"
# secrets:
# steamworks_sdk_repo: ${{ secrets.STEAMWORKS_SDK_REPO }}
# steamworks_sdk_repo_token: ${{ secrets.STEAMWORKS_SDK_REPO_TOKEN }}
#
# build-linux-debug-template:
# needs: [env-setup]
# uses: ./.github/workflows/build-linux-artifact.yml
# with:
# steamworks_sdk_tag: ${{ inputs.steamworks_sdk_tag }}
# godot_tag: ${{ inputs.godot_tag }}
# binary_name: "godot.linuxbsd.template_debug.x86_64"
# export_name: "linux-${{ needs.env-setup.outputs.godot_version }}-debug-template.x86_64"
# build_params: "-j4 platform=linuxbsd production=yes tools=yes target=template_debug bits=64 warnings=extra"
# artifact_name: "linux-debug-template"
# secrets:
# steamworks_sdk_repo: ${{ secrets.STEAMWORKS_SDK_REPO }}
# steamworks_sdk_repo_token: ${{ secrets.STEAMWORKS_SDK_REPO_TOKEN }}
#
# create-linux-bundle:
# needs: [env-setup, build-linux-editor, build-linux-release-template, build-linux-debug-template]
# runs-on: ubuntu-latest
# steps:
# - name: Download Linux Editor
# uses: actions/download-artifact@v4
# with:
# name: linux-editor
# path: files
# - name: Download Linux Release Template
# uses: actions/download-artifact@v4
# with:
# name: linux-release-template
# path: files
# - name: Download Linux Debug Template
# uses: actions/download-artifact@v4
# with:
# name: linux-debug-template
# path: files
# - name: Download Linux Steam API
# uses: actions/download-artifact@v4
# with:
# name: linux-libsteam-api-so
# path: files
# - name: Create Linux Bundle
# run: |
# echo "480" >> files/steam_appid.txt
# zip -j linux64-server-${{ needs.env-setup.outputs.zip_tag }}.zip files/*
# - name: Upload Win64 bundle artifact
# uses: actions/upload-artifact@v4
# with:
# name: linux64-server-${{ needs.env-setup.outputs.zip_tag }}.zip
# path: linux64-server-${{ needs.env-setup.outputs.zip_tag }}.zip
# if-no-files-found: error
# overwrite: true
# retention-days: 1
################ Linux 64 Builds #################
build-linux-editor:
needs: [env-setup]
uses: ./.github/workflows/build-linux-artifact.yml
with:
steamworks_sdk_tag: ${{ inputs.steamworks_sdk_tag }}
godot_tag: ${{ inputs.godot_tag }}
binary_name: "godot.linuxbsd.editor.x86_64"
export_name: "linux-${{ needs.env-setup.outputs.godot_version }}-editor.x86_64"
build_params: "-j4 platform=linuxbsd production=yes tools=yes target=editor bits=64 warnings=extra"
artifact_name: "linux-editor"
secrets:
steamworks_sdk_repo: ${{ secrets.STEAMWORKS_SDK_REPO }}
steamworks_sdk_repo_token: ${{ secrets.STEAMWORKS_SDK_REPO_TOKEN }}

build-linux-release-template:
needs: [env-setup]
uses: ./.github/workflows/build-linux-artifact.yml
with:
steamworks_sdk_tag: ${{ inputs.steamworks_sdk_tag }}
godot_tag: ${{ inputs.godot_tag }}
binary_name: "godot.linuxbsd.template_release.x86_64"
export_name: "linux-${{ needs.env-setup.outputs.godot_version }}-template.x86_64"
build_params: "-j4 platform=linuxbsd production=yes tools=yes target=template_release bits=64 warnings=extra"
artifact_name: "linux-release-template"
secrets:
steamworks_sdk_repo: ${{ secrets.STEAMWORKS_SDK_REPO }}
steamworks_sdk_repo_token: ${{ secrets.STEAMWORKS_SDK_REPO_TOKEN }}

build-linux-debug-template:
needs: [env-setup]
uses: ./.github/workflows/build-linux-artifact.yml
with:
steamworks_sdk_tag: ${{ inputs.steamworks_sdk_tag }}
godot_tag: ${{ inputs.godot_tag }}
binary_name: "godot.linuxbsd.template_debug.x86_64"
export_name: "linux-${{ needs.env-setup.outputs.godot_version }}-debug-template.x86_64"
build_params: "-j4 platform=linuxbsd production=yes tools=yes target=template_debug bits=64 warnings=extra"
artifact_name: "linux-debug-template"
secrets:
steamworks_sdk_repo: ${{ secrets.STEAMWORKS_SDK_REPO }}
steamworks_sdk_repo_token: ${{ secrets.STEAMWORKS_SDK_REPO_TOKEN }}

create-linux-bundle:
needs: [env-setup, build-linux-editor, build-linux-release-template, build-linux-debug-template]
runs-on: ubuntu-latest
steps:
- name: Download Linux Editor
uses: actions/download-artifact@v4
with:
name: linux-editor
path: files
- name: Download Linux Release Template
uses: actions/download-artifact@v4
with:
name: linux-release-template
path: files
- name: Download Linux Debug Template
uses: actions/download-artifact@v4
with:
name: linux-debug-template
path: files
- name: Download Linux Steam API
uses: actions/download-artifact@v4
with:
name: linux-libsteam-api-so
path: files
- name: Create Linux Bundle
run: |
echo "480" >> files/steam_appid.txt
zip -j linux64-server-${{ needs.env-setup.outputs.zip_tag }}.zip files/*
- name: Upload Win64 bundle artifact
uses: actions/upload-artifact@v4
with:
name: linux64-server-${{ needs.env-setup.outputs.zip_tag }}.zip
path: linux64-server-${{ needs.env-setup.outputs.zip_tag }}.zip
if-no-files-found: error
overwrite: true
retention-days: 1

################# Win64 Builds #################

Expand Down Expand Up @@ -214,7 +213,7 @@ jobs:
with:
steamworks_sdk_tag: ${{ inputs.steamworks_sdk_tag }}
godot_tag: ${{ inputs.godot_tag }}
export_name: "godot.server.macos.editor.x86_64"
export_name: "godot.macos.editor.x86_64"
build_params: "-j6 platform=macos arch=x86_64 production=yes tools=yes target=editor --jobs=$(sysctl -n hw.logicalcpu) warnings=extra"
artifact_name: "macos-editor-x86_64"
secrets:
Expand All @@ -226,7 +225,7 @@ jobs:
with:
steamworks_sdk_tag: ${{ inputs.steamworks_sdk_tag }}
godot_tag: ${{ inputs.godot_tag }}
export_name: "godot.server.macos.template_release.x86_64"
export_name: "godot.macos.template_release.x86_64"
build_params: "-j6 platform=macos arch=x86_64 production=yes tools=no target=template_release --jobs=$(sysctl -n hw.logicalcpu) warnings=extra"
artifact_name: "macos-release-template-x86_64"
secrets:
Expand All @@ -238,7 +237,7 @@ jobs:
with:
steamworks_sdk_tag: ${{ inputs.steamworks_sdk_tag }}
godot_tag: ${{ inputs.godot_tag }}
export_name: "godot.server.macos.template_debug.x86_64"
export_name: "godot.macos.template_debug.x86_64"
build_params: "-j6 platform=macos arch=x86_64 production=yes tools=no target=template_debug --jobs=$(sysctl -n hw.logicalcpu) warnings=extra"
artifact_name: "macos-debug-template-x86_64"
secrets:
Expand All @@ -250,7 +249,7 @@ jobs:
with:
steamworks_sdk_tag: ${{ inputs.steamworks_sdk_tag }}
godot_tag: ${{ inputs.godot_tag }}
export_name: "godot.server.macos.editor.arm64"
export_name: "godot.macos.editor.arm64"
build_params: "-j6 platform=macos arch=arm64 production=yes tools=yes target=editor --jobs=$(sysctl -n hw.logicalcpu) warnings=extra"
artifact_name: "macos-editor-arm64"
secrets:
Expand All @@ -262,7 +261,7 @@ jobs:
with:
steamworks_sdk_tag: ${{ inputs.steamworks_sdk_tag }}
godot_tag: ${{ inputs.godot_tag }}
export_name: "godot.server.macos.template_release.arm64"
export_name: "godot.macos.template_release.arm64"
build_params: "-j6 platform=macos arch=arm64 production=yes tools=no target=template_release --jobs=$(sysctl -n hw.logicalcpu) warnings=extra"
artifact_name: "macos-release-template-arm64"
secrets:
Expand All @@ -274,7 +273,7 @@ jobs:
with:
steamworks_sdk_tag: ${{ inputs.steamworks_sdk_tag }}
godot_tag: ${{ inputs.godot_tag }}
export_name: "godot.server.macos.template_debug.arm64"
export_name: "godot.macos.template_debug.arm64"
build_params: "-j6 platform=macos arch=arm64 production=yes tools=no target=template_debug --jobs=$(sysctl -n hw.logicalcpu) warnings=extra"
artifact_name: "macos-debug-template-arm64"
secrets:
Expand Down

0 comments on commit 43ac349

Please sign in to comment.