builds godot
Diffstat (limited to '.github/workflows/reusable-build.yml')
| -rw-r--r-- | .github/workflows/reusable-build.yml | 133 |
1 files changed, 68 insertions, 65 deletions
diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index b8b09f2..0b6f9f7 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -19,10 +19,6 @@ on: build-name: type: string required: true - make-release: - type: string - default: "yes" - required: true concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.ref }} @@ -33,6 +29,7 @@ env: ref: ${{ inputs.ref }} flags: ${{ inputs.flags }} modules: ${{ inputs.modules-path }} + tools: no jobs: linux: @@ -44,14 +41,14 @@ jobs: bits: [64] steps: - name: Compilation - uses: bend-n/godot-builds/.github/actions/build-godot@main + uses: bend-n/godot-builds/.github/actions/[email protected] with: target: ${{ matrix.target }} flags: bits=${{ matrix.bits }} ${{ env.flags }} platform: linuxbsd - name: Upload artifact - uses: bend-n/godot-builds/.github/actions/upload-artifact@main + uses: bend-n/godot-builds/.github/actions/[email protected] with: path: godot/bin/*.64 @@ -64,14 +61,14 @@ jobs: runs-on: windows-latest steps: - name: Compilation - uses: bend-n/godot-builds/.github/actions/build-godot@main + uses: bend-n/godot-builds/.github/actions/[email protected] with: target: ${{ matrix.target }} flags: bits=${{ matrix.bits }} ${{ env.flags }} platform: windows - name: Upload artifact - uses: bend-n/godot-builds/.github/actions/upload-artifact@main + uses: bend-n/godot-builds/.github/actions/[email protected] with: path: godot/bin/*.exe @@ -82,21 +79,21 @@ jobs: matrix: target: [release, release_debug] steps: - - name: Set up Java 17 + - name: Set up Java 11 uses: actions/setup-java@v3 with: - java-version: 17 + java-version: 11 distribution: temurin - name: Compilation (armv7) - uses: bend-n/godot-builds/.github/actions/build-godot@main + uses: bend-n/godot-builds/.github/actions/[email protected] with: target: ${{ matrix.target }} flags: android_arch=armv7 ${{ env.flags }} platform: android - name: Compilation (arm64v8) - uses: bend-n/godot-builds/.github/actions/build-godot@main + uses: bend-n/godot-builds/.github/actions/[email protected] with: target: ${{ matrix.target }} flags: android_arch=arm64v8 ${{ env.flags }} @@ -108,7 +105,7 @@ jobs: (cd platform/android/java && ./gradlew generateGodotTemplates) - name: Upload artifact - uses: bend-n/godot-builds/.github/actions/upload-artifact@main + uses: bend-n/godot-builds/.github/actions/[email protected] with: path: godot/bin/*.apk @@ -121,17 +118,33 @@ jobs: runs-on: macos-latest steps: - name: Install MoltenVK - run: curl https://raw.githubusercontent.com/godotengine/godot/master/misc/scripts/install_vulkan_sdk_macos.sh -s | sh - + run: | # curl https://raw.githubusercontent.com/godotengine/godot/master/misc/scripts/install_vulkan_sdk_macos.sh + curl -L "https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.dmg" -o /tmp/vulkan-sdk.dmg + hdiutil attach /tmp/vulkan-sdk.dmg -mountpoint /Volumes/vulkan-sdk + /Volumes/vulkan-sdk/InstallVulkan.app/Contents/MacOS/InstallVulkan \ + --accept-licenses --default-answer --confirm-command install + + cnt=5 + until hdiutil detach -force /Volumes/vulkan-sdk + do + [[ cnt -eq "0" ]] && break + sleep 1 + ((cnt--)) + done + + rm -f /tmp/vulkan-sdk.dmg + + echo 'Vulkan SDK installed successfully! You can now build Godot by running "scons".' + - name: Compilation(x86_64) - uses: bend-n/godot-builds/.github/actions/build-godot@main + uses: bend-n/godot-builds/.github/actions/[email protected] with: flags: arch=x86_64 ${{ env.flags }} target: ${{ matrix.target }} platform: macos - name: Compilation(arm64) - uses: bend-n/godot-builds/.github/actions/build-godot@main + uses: bend-n/godot-builds/.github/actions/[email protected] with: flags: arch=arm64 ${{ env.flags }} target: ${{ matrix.target }} @@ -139,7 +152,7 @@ jobs: - name: Create universal run: | - [[ "${{ matrix.target }}" == *"release_debug"* ]] && target='.debug' + [[ "${{ matrix.target }}" == *"debug"* ]] && target='.debug' cd godot intel=bin/godot.osx.*.x86_64 arm=bin/godot.osx.*.arm64 @@ -147,14 +160,14 @@ jobs: strip "bin/godot.osx.opt$target.universal" - name: Upload artifact - uses: bend-n/godot-builds/.github/actions/upload-artifact@main + uses: bend-n/godot-builds/.github/actions/[email protected] with: path: godot/bin/*.universal - web: + javascript: strategy: matrix: - target: [release] + target: [release, release_debug] flags: [gdnative_enabled=yes, threads_enabled=yes, ""] name: JS temps @@ -169,34 +182,30 @@ jobs: run: emcc -v - name: Compilation - uses: bend-n/godot-builds/.github/actions/build-godot@main + uses: bend-n/godot-builds/.github/actions/[email protected] with: target: ${{ matrix.target }} flags: ${{ env.flags }} ${{ matrix.flags }} - platform: web + platform: javascript - name: Upload artifact - uses: bend-n/godot-builds/.github/actions/upload-artifact@main + uses: bend-n/godot-builds/.github/actions/[email protected] with: path: godot/bin/*.zip - name: ${{ inputs.name }}-${{ matrix.target }}-${{ matrix.flags }} templates: - needs: [web, macos, windows, linux, android] + needs: [javascript, macos, windows, linux, android] name: Bundle all templates - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest env: tmps: "templates" steps: - name: Download all artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 - name: List all downloaded files run: ls -R - - name: flatten - run: find . -mindepth 2 -type f -exec mv -t . -i '{}' + - - name: Getdot uses: actions/checkout@v3 with: @@ -206,85 +215,79 @@ jobs: - name: Prepare files run: | - rel="template_release" - bug="template_debug" - mkdir -vp "$tmps" + mkdir -vp ${tmps} echo "Preparing linux" - linux="godot.x11.opt" - mv "$linux.64" "$tmps/linux_x11_debug.x86_64" - mv "$linux.debug.64" "$tmps/linux_x11_release.x86_64" - + mv linux/godot.x11.opt.64 ${tmps}/linux_x11_64_release + mv linux/godot.x11.opt.debug.64 ${tmps}/linux_x11_64_debug echo "Preparing windows" - windows="godot.windows.opt" - # mv "windows/$windows.debug.64.exe" "$tmps/windows_debug_x86_64.exe" - mv "$windows.64.exe" "$tmps/windows_release_x86_64.exe" - + mv windows/godot.windows.opt.64.exe ${tmps}/windows_64_release.exe + mv windows/godot.windows.opt.debug.64.exe ${tmps}/windows_64_debug.exe echo "Preparing android" - # mv "android/android_debug.apk" "$tmps/android_debug.apk" - mv "android_release.apk" "$tmps/android_release.apk" - + mv android/android_debug.apk ${tmps}/android_debug.apk + mv android/android_release.apk ${tmps}/android_release.apk echo "Preparing macos" - mac="godot.osx.opt" - cp -r "godot-repo/misc/dist/osx_template.app" "." - mkdir -p "osx_template.app/Contents/MacOS" - cp "$mac.universal" "osx_template.app/Contents/MacOS/godot_osx_release.64" - # cp "macos/$mac.debug.universal" "osx_template.app/Contents/MacOS/godot_osx_debug.64" - chmod +x osx_template.app/Contents/MacOS/*.64 - zip -q -9 -r "$tmps/osz.zip" "osx_template.app" - + cp -r godot-repo/misc/dist/osx_template.app . + mkdir -p osx_template.app/Contents/MacOS + cp macos/godot.osx.opt.universal osx_template.app/Contents/MacOS/godot_osx_release.64 + cp macos/godot.osx.opt.debug.universal osx_template.app/Contents/MacOS/godot_osx_debug.64 + chmod +x osx_template.app/Contents/MacOS/godot_osx_*.64 + zip -q -9 -r ${tmps}/osx.zip osx_template.app echo "Preparing web" - web="godot.javascript.opt" - mv "$web.zip" "$tmps/webassembly_release.zip" - mv "$web.gdnative.zip" "$tmps/webassembly_gdnative_release.zip" + mv javascript/godot.javascript.opt.zip ${tmps}/webassembly_release.zip + mv javascript/godot.javascript.opt.debug.zip ${tmps}/webassembly_debug.zip + mv javascript/godot.javascript.opt.threads.zip ${tmps}/webassembly_threads_release.zip + mv javascript/godot.javascript.opt.debug.threads.zip ${tmps}/webassembly_threads_debug.zip + mv javascript/godot.javascript.opt.gdnative.zip ${tmps}/webassembly_gdnative_release.zip + mv javascript/godot.javascript.opt.debug.gdnative.zip ${tmps}/webassembly_gdnative_debug.zip - name: Prepare bundle run: cd "${tmps}" && zip -qr9 templates.tpz ./* - name: Upload artifact - uses: bend-n/godot-builds/.github/actions/upload-artifact@main + uses: bend-n/godot-builds/.github/actions/[email protected] with: path: ${{ env.tmps }}/templates.tpz - name: templates editor: strategy: matrix: platform: [server, linuxbsd] + name: Linux editor runs-on: ubuntu-20.04 steps: - name: Compilation - uses: bend-n/godot-builds/.github/actions/build-godot@main + uses: bend-n/godot-builds/.github/actions/[email protected] with: platform: ${{ matrix.platform }} target: release_debug - tools: "yes" + env: + tools: yes + flags: "" # override flags - name: Upload artifact - uses: bend-n/godot-builds/.github/actions/upload-artifact@main + uses: bend-n/godot-builds/.github/actions/[email protected] with: name: ${{ matrix.platform }}-editor-release path: godot/bin/*.64 image: - if: inputs.make-release == 'yes' permissions: write-all name: Docker image runs-on: ubuntu-latest needs: [editor, templates] steps: - - uses: bend-n/godot-builds/.github/actions/build-upload-image@main + - uses: bend-n/godot-builds/.github/actions/[email protected] with: github-token: ${{ secrets.GITHUB_TOKEN }} name: ${{ inputs.name }} release: - if: inputs.make-release == 'yes' name: Create/update a release runs-on: ubuntu-latest needs: [editor, templates] steps: - - uses: bend-n/godot-builds/.github/actions/release@main + - uses: bend-n/godot-builds/.github/actions/[email protected] with: github-token: ${{ secrets.GITHUB_TOKEN }} name: ${{ inputs.name }} |