Add more CI - exported and thread sanitizer (#37)

This commit is contained in:
Rafał Mikrut 2021-04-07 14:10:47 +02:00 committed by GitHub
parent e3e0bc4be5
commit 0391628dbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 163 additions and 5 deletions

View File

@ -0,0 +1,81 @@
name: 🐧 SwiftShader Exported 1h
on: [push, pull_request]
jobs:
vulkan-normal:
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://archive.hugo.pro/builds/godot/master/editor/godot-linux-nightly-x86_64.zip
# unzip godot-linux-nightly-x86_64.zip
# rm godot-linux-nightly-x86_64.zip
# mv godot godot.linuxbsd.tools.64s
# - 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 master
cd ../
- name: Compile Godot
run: |
cd godot
sed -i "s|ERR_FAIL_COND_V(p_rasterization_state.patch_control_points|//ERR_FAIL_COND_V(p_rasterization_state.patch_control_points|" drivers/vulkan/rendering_device_vulkan.cpp
scons p=linuxbsd -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.linuxbsd.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.linuxbsd.opt.64s ../
cd ../
rm -rf godot
# Download, unzip and setup SwiftShader library
- name: Download SwiftShader
run: |
wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/swiftshader.zip
unzip swiftshader.zip
rm swiftshader.zip
curr="$(pwd)/libvk_swiftshader.so"
sed -i "s|PATH_TO_CHANGE|$curr|" vk_swiftshader_icd.json
# Export project and run it to check for possible leaks and invalid memory usage
- name: Export project
run: |
curr="$(pwd)/godot.linuxbsd.opt.64s"
sed -i "s|PATH_TO_CHANGE|$curr|" export_presets.cfg
echo "-------------------- Export project -----------------------"
VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run ./godot.linuxbsd.tools.64s --export-debug "Linux/X11" test_project 2>&1 | tee sanitizers_log.txt || true
misc/check_ci_log.py sanitizers_log.txt
- name: Run project
run: |
echo "-------------------- RUN PROJECT -----------------------"
VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json 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

View File

@ -0,0 +1,73 @@
name: 🐧 SwiftShader Thread Sanitizer 1h
on: [push, pull_request]
jobs:
vulkan-normal:
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 llvm clang
# - name: Download Godot
# run: |
# wget2 https://archive.hugo.pro/builds/godot/master/editor/godot-linux-nightly-x86_64.zip
# unzip godot-linux-nightly-x86_64.zip
# rm godot-linux-nightly-x86_64.zip
# mv godot godot.linuxbsd.tools.64s
# - 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 master
cd ../
- name: Compile Godot
run: |
cd godot
sed -i "s|ERR_FAIL_COND_V(p_rasterization_state.patch_control_points|//ERR_FAIL_COND_V(p_rasterization_state.patch_control_points|" drivers/vulkan/rendering_device_vulkan.cpp
scons -j2 use_tsan=yes use_llvm=yes
cp bin/godot.linuxbsd.tools.64.llvms ../
cd ../
rm -rf godot
# Download, unzip and setup SwiftShader library
- name: Download SwiftShader
run: |
wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/swiftshader.zip
unzip swiftshader.zip
rm swiftshader.zip
curr="$(pwd)/libvk_swiftshader.so"
sed -i "s|PATH_TO_CHANGE|$curr|" vk_swiftshader_icd.json
- name: Use Godot
run: |
sed -i "s|NUMBER_OF_INSTANCES : int = 1|NUMBER_OF_INSTANCES : int = 10|" Start.gd
echo "-------------------- OPEN EDITOR -----------------------"
VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run ./godot.linuxbsd.tools.64.llvms --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 -----------------------"
VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run ./godot.linuxbsd.tools.64.llvms 3600 --audio-driver Dummy --path $(pwd) 2>&1 | tee sanitizers_log.txt || true
misc/check_ci_log.py sanitizers_log.txt

View File

@ -8,18 +8,22 @@ export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
patch_list=PoolStringArray( )
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
script_export_mode=1
script_encryption_key=""
[preset.0.options]
custom_template/debug="PATH_TO_CHANGE"
custom_template/release=""
binary_format/64_bits=true
binary_format/embed_pck=false
texture_format/bptc=false
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
texture_format/no_bptc_fallbacks=true
binary_format/64_bits=true
binary_format/embed_pck=false
custom_template/release=""
custom_template/debug="PATH_TO_CHANGE"