diff --git a/.github/actions/import-assets/action.yml b/.github/actions/import-assets/action.yml index c9856ec..04c2d4e 100644 --- a/.github/actions/import-assets/action.yml +++ b/.github/actions/import-assets/action.yml @@ -1,7 +1,14 @@ name: Import assets +inputs: + godot-version: + required: true runs: using: "composite" steps: + - name: Setup Godot + uses: lihop/setup-godot@4aad9daa7dd81c11329c4b54fdc26dbd39eea7d6 + with: + version: ${{ inputs.godot-version }} - name: Import assets shell: bash run: | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 987ac06..054f81b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,6 +6,25 @@ on: - cron: 0 11 * * * jobs: + import_assets: + name: 'Import Assets' + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-22.04 ] + steps: + - uses: actions/checkout@v3 + - name: Import assets + uses: ./.github/actions/import-assets + with: + godot-version: v4.0-beta14 + - name: Upload imports + uses: actions/upload-artifact@v3 + with: + name: imports-${{ matrix.os }} + path: .godot/ + build_docker: name: 'Build Docker' runs-on: ubuntu-22.04 @@ -212,7 +231,7 @@ jobs: test: name: 'Test' - needs: [ build_docker ] #, build_native ] + needs: [ import_assets, build_docker ] #, build_native ] runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -240,14 +259,25 @@ jobs: with: name: libgodot-xterm-debug path: addons/godot_xterm/native/bin - - name: Import assets - uses: ./.github/actions/import-assets + - name: Download imports + uses: actions/download-artifact@v3 + with: + name: imports-${{ matrix.os }} + path: .godot - name: Run tests run: godot -s addons/gut/gut_cmdln.gd -gconfig=test/.gutconfig.ci.json - name: Run unix tests if: ${{ matrix.os != 'windows-2022' }} run: godot -s addons/gut/gut_cmdln.gd -gconfig=test/.gutconfig.unix.json + delete_imports: + name: 'Delete Imports' + needs: [ test ] + runs-on: ubuntu-22.04 + steps: + - uses: geekyeggo/delete-artifact@v2 + with: + name: imports-* # Git archive should only include addons/godot_xterm directory. check-archive: