From 43ac349c10d7b6e5ad66fda30b81809ad953ba85 Mon Sep 17 00:00:00 2001 From: GP Garcia Date: Wed, 7 Feb 2024 19:28:49 -0600 Subject: [PATCH] More GA fun --- .github/workflows/build-linux-artifact.yml | 53 ++++++- .github/workflows/build-macos-artifact.yml | 8 + .github/workflows/build-releases.yml | 171 ++++++++++----------- 3 files changed, 143 insertions(+), 89 deletions(-) diff --git a/.github/workflows/build-linux-artifact.yml b/.github/workflows/build-linux-artifact.yml index 3a5db2b..0cd8d4d 100644 --- a/.github/workflows/build-linux-artifact.yml +++ b/.github/workflows/build-linux-artifact.yml @@ -28,7 +28,7 @@ on: jobs: build-linux: - runs-on: self-hosted + runs-on: ubuntu-20.04 steps: # Checkout Godot @@ -56,18 +56,64 @@ 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: @@ -75,6 +121,7 @@ jobs: path: godot/bin/${{ inputs.export_name }} overwrite: true retention-days: 1 + - name: Upload Linux Steam File uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/build-macos-artifact.yml b/.github/workflows/build-macos-artifact.yml index abb43a3..0f7f009 100644 --- a/.github/workflows/build-macos-artifact.yml +++ b/.github/workflows/build-macos-artifact.yml @@ -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 @@ -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 @@ -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 @@ -87,6 +90,7 @@ jobs: working-directory: "godot" run: | scons ${{ inputs.build_params }} + - name: Upload MacOS Build uses: actions/upload-artifact@v4 with: @@ -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: @@ -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: @@ -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: diff --git a/.github/workflows/build-releases.yml b/.github/workflows/build-releases.yml index 7c67e20..f39c51d 100644 --- a/.github/workflows/build-releases.yml +++ b/.github/workflows/build-releases.yml @@ -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 ################# @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: