builds godot
Diffstat (limited to '.github/workflows/reusable-build.yml')
| -rw-r--r-- | .github/workflows/reusable-build.yml | 124 |
1 files changed, 75 insertions, 49 deletions
diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 2c0a0db..0b6f9f7 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -4,24 +4,25 @@ on: workflow_call: inputs: ref: - required: true type: string + required: true flags: type: string - default: disable_3d=yes + default: "" required: false modules-path: type: string - default: ./.github/2d-build-modules.py - required: false + required: true name: type: string - default: godot-2d - required: false + required: true build-name: type: string - default: 2d - required: false + required: true + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.ref }} + cancel-in-progress: true env: BUILD_NAME: ${{ inputs.build-name }} @@ -40,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: x11 + 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 @@ -60,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 @@ -79,19 +80,20 @@ jobs: target: [release, release_debug] steps: - name: Set up Java 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: 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 }} @@ -103,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 @@ -112,18 +114,37 @@ jobs: matrix: target: [release, release_debug] - name: MacOS temps + name: macOS temps runs-on: macos-latest steps: + - name: Install MoltenVK + 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 +160,7 @@ 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 @@ -152,24 +173,23 @@ jobs: name: JS temps runs-on: ubuntu-20.04 steps: - - name: Set up Emscripten 3.1.10 - uses: mymindstorm/setup-emsdk@v10 + - name: Set up Emscripten 3.1.18 + uses: mymindstorm/setup-emsdk@v12 with: - version: 3.1.10 + version: 3.1.18 - name: Verify Emscripten setup - run: | - emcc -v + 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: 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 @@ -183,22 +203,28 @@ jobs: - name: Download all artifacts uses: actions/download-artifact@v3 + - name: List all downloaded files + run: ls -R + + - name: Getdot + uses: actions/checkout@v3 + with: + repository: godotengine/godot + ref: ${{ inputs.ref }} + path: godot-repo + - name: Prepare files run: | mkdir -vp ${tmps} - git clone --depth 1 'https://github.com/godotengine/godot' -b 3.x godot-repo echo "Preparing linux" 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" 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/android_release.apk ${tmps}/android_release.apk - echo "Preparing macos" cp -r godot-repo/misc/dist/osx_template.app . mkdir -p osx_template.app/Contents/MacOS @@ -206,7 +232,6 @@ jobs: 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" mv javascript/godot.javascript.opt.zip ${tmps}/webassembly_release.zip mv javascript/godot.javascript.opt.debug.zip ${tmps}/webassembly_debug.zip @@ -216,23 +241,23 @@ jobs: mv javascript/godot.javascript.opt.debug.gdnative.zip ${tmps}/webassembly_gdnative_debug.zip - name: Prepare bundle - run: "cd ${tmps} && zip -q -9 -r templates.tpz ./*" + 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 - tools: + editor: strategy: matrix: - platform: [server, x11] + platform: [server, linuxbsd] - name: Build linux tools - runs-on: ubuntu-18.04 + name: Linux editor + runs-on: ubuntu-20.04 steps: - - name: Build editor - uses: bend-n/godot-builds/.github/actions/build-godot@main + - name: Compilation + uses: bend-n/godot-builds/.github/actions/[email protected] with: platform: ${{ matrix.platform }} target: release_debug @@ -241,17 +266,18 @@ jobs: 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 }}-tools-release + name: ${{ matrix.platform }}-editor-release path: godot/bin/*.64 - build-image: - name: Build docker image + image: + permissions: write-all + name: Docker image runs-on: ubuntu-latest - needs: [tools, templates] + 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 }} @@ -259,9 +285,9 @@ jobs: release: name: Create/update a release runs-on: ubuntu-latest - needs: [tools, templates] + 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 }} |