|
| 1 | +name: Export Godot project |
| 2 | +description: Export a test Godot project. |
| 3 | + |
| 4 | +inputs: |
| 5 | + bin: |
| 6 | + description: The path to the Godot executable |
| 7 | + required: true |
| 8 | + |
| 9 | +runs: |
| 10 | + using: composite |
| 11 | + steps: |
| 12 | + - name: Build test GDExtension |
| 13 | + shell: sh |
| 14 | + run: | |
| 15 | + cd misc/test_project/addons/test_extension/ |
| 16 | + git clone --depth=1 https://github.com/godotengine/godot-cpp.git src/godot-cpp/ |
| 17 | + scons target=template_debug |
| 18 | + scons target=template_release |
| 19 | + cd ../../../../ |
| 20 | +
|
| 21 | + - name: Import resources and export project |
| 22 | + shell: sh |
| 23 | + run: | |
| 24 | + echo "Exporting project for Linux (PCK)" |
| 25 | + xvfb-run ${{ inputs.bin }} --headless --path misc/test_project/ --export-pack "Linux" /tmp/test_project.pck 2>&1 | tee log.txt || true |
| 26 | + misc/scripts/check_ci_log.py log.txt |
| 27 | +
|
| 28 | + echo "Exporting project for Linux (ZIP)" |
| 29 | + xvfb-run ${{ inputs.bin }} --headless --path misc/test_project/ --export-pack "Linux" /tmp/test_project.zip 2>&1 | tee log.txt || true |
| 30 | + misc/scripts/check_ci_log.py log.txt |
| 31 | +
|
| 32 | + echo "Exporting project for Linux as dedicated server (PCK)" |
| 33 | + xvfb-run ${{ inputs.bin }} --headless --path misc/test_project/ --export-pack "Linux Server" /tmp/test_project_server.pck 2>&1 | tee log.txt || true |
| 34 | + misc/scripts/check_ci_log.py log.txt |
| 35 | +
|
| 36 | + - name: Run project files from folder |
| 37 | + shell: sh |
| 38 | + run: | |
| 39 | + xvfb-run ${{ inputs.bin }} --path misc/test_project/ --audio-driver Dummy --resolution 64x64 --write-movie /tmp/test_project_folder.png --quit |
| 40 | + # FIXME: Not checked currently, as leaked resources on exit cause CI failures. |
| 41 | + # misc/scripts/check_ci_log.py log.txt |
| 42 | +
|
| 43 | + xvfb-run ${{ inputs.bin }} --path misc/test_project/ --headless --quit |
| 44 | +
|
| 45 | + - name: Run exported project PCK/ZIP |
| 46 | + shell: sh |
| 47 | + run: | |
| 48 | + xvfb-run ${{ inputs.bin }} --main-pack /tmp/test_project.pck --audio-driver Dummy --resolution 64x64 --write-movie /tmp/test_project_pck.png --quit |
| 49 | + # FIXME: Not checked currently, as leaked resources on exit cause CI failures. |
| 50 | + # misc/scripts/check_ci_log.py log.txt |
| 51 | +
|
| 52 | + xvfb-run ${{ inputs.bin }} --main-pack /tmp/test_project.zip --audio-driver Dummy --resolution 64x64 --write-movie /tmp/test_project_zip.png --quit |
| 53 | +
|
| 54 | + # Headless mode is implied for dedicated server PCKs. |
| 55 | + xvfb-run ${{ inputs.bin }} --main-pack /tmp/test_project_server.pck --quit |
| 56 | +
|
| 57 | + echo "Checking whether video output from project folder and exported project match..." |
| 58 | + md5sum /tmp/test_project*.png | md5sum --check |
| 59 | +
|
| 60 | + echo "Checking whether audio output from project folder and exported project match..." |
| 61 | + md5sum /tmp/test_project*.wav | md5sum --check |
0 commit comments