|
| 1 | +name: 🧪 Test Export (Headless) |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main ] |
| 6 | + pull_request: |
| 7 | + types: [opened, synchronize, reopened] |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +env: |
| 11 | + GODOT_VERSION: 4.5 |
| 12 | + |
| 13 | +jobs: |
| 14 | + export-linux-only: |
| 15 | + name: Export demo (Linux) |
| 16 | + runs-on: ubuntu-22.04 |
| 17 | + steps: |
| 18 | + - name: Checkout |
| 19 | + uses: actions/checkout@v4 |
| 20 | + with: |
| 21 | + lfs: true |
| 22 | + submodules: recursive |
| 23 | + |
| 24 | + - name: Cache Godot binary |
| 25 | + id: cache-godot |
| 26 | + uses: actions/cache@v4 |
| 27 | + with: |
| 28 | + path: Godot_v${GODOT_VERSION}-stable_linux.x86_64 |
| 29 | + key: godot-${GODOT_VERSION}-linux-x86_64 |
| 30 | + |
| 31 | + - name: Download Godot (Linux) |
| 32 | + if: steps.cache-godot.outputs.cache-hit != 'true' |
| 33 | + run: | |
| 34 | + wget https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip |
| 35 | + unzip -q Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip |
| 36 | + rm Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip |
| 37 | + chmod +x Godot_v${GODOT_VERSION}-stable_linux.x86_64 |
| 38 | +
|
| 39 | + - name: Cache Godot export templates |
| 40 | + id: cache-templates |
| 41 | + uses: actions/cache@v4 |
| 42 | + with: |
| 43 | + path: ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable |
| 44 | + key: godot-templates-${GODOT_VERSION} |
| 45 | + |
| 46 | + - name: Download Godot export templates |
| 47 | + if: steps.cache-templates.outputs.cache-hit != 'true' |
| 48 | + run: | |
| 49 | + mkdir -p ~/.local/share/godot/export_templates/ |
| 50 | + wget https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_export_templates.tpz |
| 51 | + mkdir -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable |
| 52 | + unzip -q Godot_v${GODOT_VERSION}-stable_export_templates.tpz -d ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable |
| 53 | + rm Godot_v${GODOT_VERSION}-stable_export_templates.tpz |
| 54 | +
|
| 55 | + - name: Export demo (Linux preset) |
| 56 | + run: | |
| 57 | + mkdir -p build/linux |
| 58 | + export EXPORT_DIR=$(readlink -f build/linux) |
| 59 | + cd demo |
| 60 | + ../Godot_v${GODOT_VERSION}-stable_linux.x86_64 --headless --verbose --export-release "Linux/X11" "$EXPORT_DIR/demo.x86_64" |
| 61 | +
|
| 62 | +
|
0 commit comments