|
| 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 "Importing resources" |
| 25 | + ${{ inputs.bin }} --headless --path misc/test_project/ --import 2>&1 | tee log.txt || true |
| 26 | +
|
| 27 | + echo "Exporting project for Linux (PCK)" |
| 28 | + ${{ inputs.bin }} --headless --path misc/test_project/ --export-pack "Linux" /tmp/test_project.pck 2>&1 | tee log.txt || true |
| 29 | + GODOT_CHECK_CI_LOG_ALL_ERRORS=1 misc/scripts/check_ci_log.py log.txt |
| 30 | +
|
| 31 | + echo "Exporting project for Linux (ZIP)" |
| 32 | + ${{ inputs.bin }} --headless --path misc/test_project/ --export-pack "Linux" /tmp/test_project.zip 2>&1 | tee log.txt || true |
| 33 | + GODOT_CHECK_CI_LOG_ALL_ERRORS=1 misc/scripts/check_ci_log.py log.txt |
| 34 | +
|
| 35 | + echo "Exporting project for Linux as dedicated server (PCK)" |
| 36 | + ${{ inputs.bin }} --headless --path misc/test_project/ --export-pack "Linux Server" /tmp/test_project_server.pck 2>&1 | tee log.txt || true |
| 37 | + GODOT_CHECK_CI_LOG_ALL_ERRORS=1 misc/scripts/check_ci_log.py log.txt |
| 38 | +
|
| 39 | + - name: Run project files from folder |
| 40 | + shell: sh |
| 41 | + run: | |
| 42 | + # For all project runs, wait several frames before quitting to ensure we don't quit while audio is still playing, |
| 43 | + # as this would cause an ObjectDB leaked instances warning, causing CI to fail (see GH-76745). |
| 44 | + xvfb-run ${{ inputs.bin }} --path misc/test_project/ --language fr --audio-driver Dummy --resolution 64x64 --write-movie /tmp/test_project_folder.png --quit-after 2 2>&1 | tee log.txt || true |
| 45 | + GODOT_CHECK_CI_LOG_ALL_ERRORS=1 misc/scripts/check_ci_log.py log.txt |
| 46 | +
|
| 47 | + ${{ inputs.bin }} --headless --path misc/test_project/ --quit-after 2 2>&1 | tee log.txt || true |
| 48 | + GODOT_CHECK_CI_LOG_ALL_ERRORS=1 misc/scripts/check_ci_log.py log.txt |
| 49 | +
|
| 50 | + - name: Run exported project PCK/ZIP |
| 51 | + shell: sh |
| 52 | + run: | |
| 53 | + xvfb-run ${{ inputs.bin }} --main-pack /tmp/test_project.pck --language fr --audio-driver Dummy --resolution 64x64 --write-movie /tmp/test_project_pck.png --quit-after 2 2>&1 | tee log.txt || true |
| 54 | + GODOT_CHECK_CI_LOG_ALL_ERRORS=1 misc/scripts/check_ci_log.py log.txt |
| 55 | +
|
| 56 | + xvfb-run ${{ inputs.bin }} --main-pack /tmp/test_project.zip --language fr --audio-driver Dummy --resolution 64x64 --write-movie /tmp/test_project_zip.png --quit-after 2 2>&1 | tee log.txt || true |
| 57 | + GODOT_CHECK_CI_LOG_ALL_ERRORS=1 misc/scripts/check_ci_log.py log.txt |
| 58 | +
|
| 59 | + # Headless mode is implied for dedicated server PCKs. |
| 60 | + ${{ inputs.bin }} --main-pack /tmp/test_project_server.pck --quit-after 2 2>&1 | tee log.txt || true |
| 61 | + GODOT_CHECK_CI_LOG_ALL_ERRORS=1 misc/scripts/check_ci_log.py log.txt |
| 62 | +
|
| 63 | + echo "Checking whether video output from project folder and exported project match..." |
| 64 | + md5sum /tmp/test_project*.png | md5sum --check |
| 65 | +
|
| 66 | + echo "Checking whether audio output from project folder and exported project match..." |
| 67 | + md5sum /tmp/test_project*.wav | md5sum --check |
0 commit comments