From 0c0ce3e112dab8a3c642376e9fda3d79bd63baba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mikrut?= <41945903+qarmin@users.noreply.github.com> Date: Mon, 22 Mar 2021 14:49:15 +0100 Subject: [PATCH] Add exported build (#29) --- .github/workflows/exported.yml | 81 ++++++++++++++++++++++++++ .github/workflows/long.yml | 2 +- .github/workflows/required.yml | 2 +- .github/workflows/stress.yml | 2 +- .github/workflows/thread_sanitizer.yml | 2 +- 5 files changed, 85 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/exported.yml diff --git a/.github/workflows/exported.yml b/.github/workflows/exported.yml new file mode 100644 index 0000000..427d067 --- /dev/null +++ b/.github/workflows/exported.yml @@ -0,0 +1,81 @@ +name: 🐧 Exported Build +on: [push, pull_request] + +jobs: + linux-sanitizer: + runs-on: "ubuntu-20.04" + name: Editor and exported project with sanitizers (target=debug/release, tools=yes/no, debug_symbols=yes, use_ubsan=yes, use_asan=yes) + + steps: + - uses: actions/checkout@v2 + + # Azure repositories are not reliable, we need to prevent azure giving us packages. + - name: Make apt sources.list use the default Ubuntu repositories + run: | + sudo rm -f /etc/apt/sources.list.d/* + sudo cp -f misc/ci/sources.list /etc/apt/sources.list + sudo apt-get update + + # Install all packages (except scons) + - name: Configure dependencies + run: | + sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \ + libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm \ + xvfb wget2 unzip python scons git + +# - name: Download Godot +# run: | +# wget2 https://downloads.tuxfamily.org/godotengine/3.2.4/beta1/Godot_v3.2.4-beta1_x11.64.zip +# unzip Godot_v3.2.4-beta1_x11.64.zip +# rm Godot_v3.2.4-beta1_x11.64.zip +# mv Godot_v3.2.4-beta1_x11.64 godot.x11.tools.64s +# wget2 https://downloads.tuxfamily.org/godotengine/3.2.4/beta1/Godot_v3.2.4-beta1_export_templates.tpz +# unzip Godot_v3.2.4-beta1_export_templates.tpz +# mv templates/linux_x11_64_debug godot.x11.opt.64s +# rm -rf templates +# rm Godot_v3.2.4-beta1_export_templates.tpz +# ls -alr + +# - name: Download Godot(ZIP) +# run: | +# wget2 https://github.com/godotengine/godot/archive/3.2.zip +# unzip 3.2.zip +# rm 3.2.zip + + + - name: Download Godot(GIT) + run: | + git clone https://github.com/godotengine/godot.git + cd godot + git checkout 3.x + cd ../ + + - name: Compile Godot + run: | + cd godot + scons p=x11 -j2 use_asan=yes use_ubsan=yes CCFLAGS="-fsanitize=shift,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr" + cp bin/godot.x11.tools.64s ../ + git clean -xqdf + scons tools=no target=release debug_symbols=yes use_asan=yes use_ubsan=yes optimize=none CCFLAGS="-fsanitize=shift,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr" + cp bin/godot.x11.opt.64s ../ + cd ../ + rm -rf godot + + - name: Use Godot + run: | + echo "-------------------- OPEN EDITOR TO IMPORT PROJECT -----------------------" + DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s --audio-driver Dummy -e -q --path $(pwd) 2>&1 | tee sanitizers_log.txt || true + misc/check_ci_log.py sanitizers_log.txt + echo "-------------------- RUN PROJECT -----------------------" + DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s 3600 --audio-driver Dummy --video-driver GLES3 --path $(pwd) 2>&1 | tee sanitizers_log.txt || true + misc/check_ci_log.py sanitizers_log.txt + + # Export project and run it to check for possible leaks and invalid memory usage + - name: Exporting and running project + run: | + curr="$(pwd)/godot.x11.opt.64s" + sed -i "s|PATH_TO_CHANGE|$curr|" export_presets.cfg + DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s --export-debug "Linux/X11" test_project 2>&1 | tee sanitizers_log.txt || true + misc/check_ci_log.py sanitizers_log.txt + DRI_PRIME=0 xvfb-run ./test_project 3600 --audio-driver Dummy 2>&1 | tee sanitizers_log.txt || true + misc/check_ci_log.py sanitizers_log.txt diff --git a/.github/workflows/long.yml b/.github/workflows/long.yml index 9975c29..3b7fca6 100644 --- a/.github/workflows/long.yml +++ b/.github/workflows/long.yml @@ -47,7 +47,7 @@ jobs: run: | git clone https://github.com/godotengine/godot.git cd godot - git checkout 3.2 + git checkout 3.x cd ../ - name: Compile Godot diff --git a/.github/workflows/required.yml b/.github/workflows/required.yml index 1b84423..c47df33 100644 --- a/.github/workflows/required.yml +++ b/.github/workflows/required.yml @@ -47,7 +47,7 @@ jobs: run: | git clone https://github.com/godotengine/godot.git cd godot - git checkout 3.2 + git checkout 3.x cd ../ - name: Compile Godot diff --git a/.github/workflows/stress.yml b/.github/workflows/stress.yml index fb5ef9d..7b4ca33 100644 --- a/.github/workflows/stress.yml +++ b/.github/workflows/stress.yml @@ -47,7 +47,7 @@ jobs: run: | git clone https://github.com/godotengine/godot.git cd godot - git checkout 3.2 + git checkout 3.x cd ../ - name: Compile Godot diff --git a/.github/workflows/thread_sanitizer.yml b/.github/workflows/thread_sanitizer.yml index 29bc137..3a8f822 100644 --- a/.github/workflows/thread_sanitizer.yml +++ b/.github/workflows/thread_sanitizer.yml @@ -47,7 +47,7 @@ jobs: run: | git clone https://github.com/godotengine/godot.git cd godot - git checkout 3.2 + git checkout 3.x cd ../ - name: Compile Godot