From 60054e7ee0b900a6ccae8b124ac163e3fd11448d Mon Sep 17 00:00:00 2001 From: Leroy Hopson Date: Sat, 24 Feb 2024 15:48:48 +1300 Subject: [PATCH] Remove asset import job --- .github/actions/import-assets/action.yml | 21 ----- .../actions/import-assets/monitor_import.sh | 10 --- .github/workflows/main.yml | 80 +++---------------- 3 files changed, 12 insertions(+), 99 deletions(-) delete mode 100644 .github/actions/import-assets/action.yml delete mode 100755 .github/actions/import-assets/monitor_import.sh diff --git a/.github/actions/import-assets/action.yml b/.github/actions/import-assets/action.yml deleted file mode 100644 index 369d61b..0000000 --- a/.github/actions/import-assets/action.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Import assets -inputs: - godot-version: - required: true -runs: - using: "composite" - steps: - - name: Setup Godot - uses: lihop/setup-godot@v2 - with: - version: ${{ inputs.godot-version }} - - name: Install just - uses: taiki-e/install-action@just - - name: Install dev dependencies - shell: bash - run: just install - - name: Import assets - shell: bash - run: | - # HACK: See https://github.com/godotengine/godot-proposals/issues/1362. - (for i in {1..4}; do godot --editor --headless & sleep 5 && .github/actions/import-assets/monitor_import.sh; done) || true diff --git a/.github/actions/import-assets/monitor_import.sh b/.github/actions/import-assets/monitor_import.sh deleted file mode 100755 index d5ca3a1..0000000 --- a/.github/actions/import-assets/monitor_import.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# Source: https://github.com/godotengine/godot/pull/68461#issuecomment-1328177902 - -while [ "$(printf "%.0f\n" $(top -n 1 -b | awk '/^%Cpu/{print $2}'))" -gt 10 ]; -do -echo "$(top -n 1 -b | awk '/^%Cpu/{print $2}')"; -done -echo "Finished importing. Killing godot editor process"; -kill -9 $(pgrep -o godot) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 91527fe..17441e3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,32 +6,6 @@ on: - cron: 0 11 * * * jobs: - import-assets: - name: "Import Assets" - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - platform: [linux, macos, windows] - include: - - platform: linux - os: ubuntu-22.04 - - platform: macos - os: macos-12 - - platform: windows - os: windows-2022 - steps: - - uses: actions/checkout@v4 - - name: Import assets - uses: ./.github/actions/import-assets - with: - godot-version: v4.2.1-stable - - name: Upload imports - uses: actions/upload-artifact@v4 - with: - name: imports-${{ matrix.platform }} - path: .godot/ - build-linux: name: Build (linux, ${{ matrix.arch }}, ${{ matrix.target }}) runs-on: ubuntu-22.04 @@ -206,18 +180,8 @@ jobs: uses: lihop/setup-godot@v2 with: version: "4.2.1-stable" - export-templates: true - - name: Wait for asset import - uses: fountainhead/action-wait-for-check@v1.1.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - checkName: Import Assets (linux) - ref: ${{ github.event.pull_request.head.sha || github.sha }} - - name: Download imports - uses: actions/download-artifact@v4 - with: - name: imports-linux - path: .godot + - name: Import assets + run: godot --editor --headless --quit-after 100 || true - name: Wait for build uses: fountainhead/action-wait-for-check@v1.1.0 with: @@ -227,7 +191,6 @@ jobs: - name: Install binary build artifacts uses: actions/download-artifact@v4 with: - name: libgodot-xterm-web-wasm32-release path: addons/godot_xterm/native/bin # Some remaining steps temporarily disabled. - name: Export HTML5 @@ -308,19 +271,16 @@ jobs: uses: lihop/setup-godot@v2 with: version: "4.2.1-stable" - - uses: taiki-e/install-action@just - - run: just install - - name: Wait for asset import - uses: fountainhead/action-wait-for-check@v1.1.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - checkName: Import Assets (${{ matrix.platform }}) - ref: ${{ github.event.pull_request.head.sha || github.sha }} - - name: Download imports - uses: actions/download-artifact@v4 - with: - name: imports-${{ matrix.platform }} - path: .godot + - name: Install molten-vk + if: ${{ matrix.platform == 'macos' && matrix.test-type == 'rendering' }} + run: brew install molten-vk + - name: Install just + uses: taiki-e/install-action@just + - name: Install dependencies + run: just install + - name: Import assets + shell: bash + run: godot --editor --headless --quit-after 100 || true - name: Wait for build uses: fountainhead/action-wait-for-check@v1.1.0 with: @@ -330,14 +290,7 @@ jobs: - name: Install binary build artifacts uses: actions/download-artifact@v4 with: - name: libgodot-xterm-${{ matrix.platform }}-${{ matrix.arch }}-debug path: addons/godot_xterm/native/bin - - name: Install molten-vk - if: ${{ matrix.platform == 'macos' && matrix.test-type == 'rendering' }} - run: brew install molten-vk - - name: Re-run editor - if: ${{ matrix.platform == 'macos' }} - run: godot --editor --headless --quit-after 100 || true # Required for macos to detect GutUtils class. - name: Test shell: bash run: | @@ -361,15 +314,6 @@ jobs: pattern: "*-${{ matrix.target }}" delete-merged: true - delete-asset-imports: - name: Delete Asset Imports - runs-on: ubuntu-22.04 - needs: [test, html5-export] - steps: - - uses: geekyeggo/delete-artifact@v2 - with: - name: imports-* - # Git archive should only include addons/godot_xterm directory. check-archive: name: "Check Archive"