2020-08-22 23:04:57 +02:00
|
|
|
name: 🐧 Linux Builds
|
2020-07-24 10:19:19 +02:00
|
|
|
on: [push, pull_request]
|
|
|
|
|
2020-10-22 13:27:03 +02:00
|
|
|
# Global Settings
|
2020-07-24 10:19:19 +02:00
|
|
|
env:
|
2021-04-19 14:37:47 +02:00
|
|
|
GODOT_BASE_BRANCH: 3.x
|
2021-09-01 17:26:01 +02:00
|
|
|
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
2020-07-24 10:19:19 +02:00
|
|
|
|
2021-09-01 17:26:01 +02:00
|
|
|
concurrency:
|
|
|
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-linux
|
|
|
|
cancel-in-progress: true
|
2020-07-24 10:19:19 +02:00
|
|
|
|
2021-09-01 17:26:01 +02:00
|
|
|
jobs:
|
|
|
|
build-linux:
|
2020-07-24 10:19:19 +02:00
|
|
|
runs-on: "ubuntu-20.04"
|
2021-09-01 17:26:01 +02:00
|
|
|
name: ${{ matrix.name }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- name: Editor w/ Mono (target=release_debug, tools=yes)
|
|
|
|
cache-name: linux-editor-mono
|
|
|
|
target: release_debug
|
|
|
|
tools: true
|
|
|
|
sconsflags: module_mono_enabled=yes mono_glue=no
|
|
|
|
bin: "./bin/godot.x11.opt.tools.64.mono"
|
|
|
|
build-mono: true
|
|
|
|
artifact: true
|
|
|
|
|
|
|
|
- name: Editor and sanitizers (target=debug, tools=yes, use_asan=yes, use_ubsan=yes)
|
|
|
|
cache-name: linux-editor-sanitizers
|
|
|
|
target: debug
|
|
|
|
tools: true
|
|
|
|
sconsflags: use_asan=yes use_ubsan=yes
|
|
|
|
test: true
|
|
|
|
bin: "./bin/godot.x11.tools.64s"
|
|
|
|
build-mono: false
|
|
|
|
# Skip 2GiB artifact speeding up action.
|
|
|
|
artifact: false
|
|
|
|
|
|
|
|
- name: Template w/ Mono (target=release, tools=no)
|
|
|
|
cache-name: linux-template-mono
|
|
|
|
target: release
|
|
|
|
tools: false
|
|
|
|
sconsflags: module_mono_enabled=yes mono_glue=no
|
|
|
|
build-mono: false
|
|
|
|
artifact: true
|
2020-07-24 10:19:19 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2021-09-01 17:26:01 +02:00
|
|
|
- name: Linux dependencies
|
|
|
|
shell: bash
|
2020-07-24 10:19:19 +02:00
|
|
|
run: |
|
2021-09-01 17:26:01 +02:00
|
|
|
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
2020-10-22 13:27:03 +02:00
|
|
|
sudo rm -f /etc/apt/sources.list.d/*
|
2020-07-24 10:19:19 +02:00
|
|
|
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
|
|
|
|
sudo apt-get update
|
2021-09-01 17:26:01 +02:00
|
|
|
# The actual dependencies
|
2020-07-24 10:19:19 +02:00
|
|
|
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
|
2021-09-01 17:26:01 +02:00
|
|
|
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev \
|
|
|
|
libdbus-1-dev libudev-dev libxi-dev libxrandr-dev yasm xvfb wget unzip
|
2020-07-24 10:19:19 +02:00
|
|
|
|
2021-09-01 17:26:01 +02:00
|
|
|
- name: Setup Godot build cache
|
|
|
|
uses: ./.github/actions/godot-cache
|
2020-07-24 10:19:19 +02:00
|
|
|
with:
|
2021-09-01 17:26:01 +02:00
|
|
|
cache-name: ${{ matrix.cache-name }}
|
2021-08-18 21:00:56 +02:00
|
|
|
continue-on-error: true
|
2020-07-24 10:19:19 +02:00
|
|
|
|
2021-09-01 17:26:01 +02:00
|
|
|
- name: Setup python and scons
|
|
|
|
uses: ./.github/actions/godot-deps
|
2020-07-24 10:19:19 +02:00
|
|
|
|
|
|
|
- name: Compilation
|
2021-09-01 17:26:01 +02:00
|
|
|
uses: ./.github/actions/godot-build
|
2020-10-22 13:27:03 +02:00
|
|
|
with:
|
2021-09-01 17:26:01 +02:00
|
|
|
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
|
|
|
|
platform: linuxbsd
|
|
|
|
target: ${{ matrix.target }}
|
|
|
|
tools: ${{ matrix.tools }}
|
|
|
|
|
|
|
|
# Generate mono glue
|
|
|
|
- name: Generate Mono glue code
|
|
|
|
if: ${{ matrix.build-mono }}
|
2020-08-14 12:15:58 +02:00
|
|
|
run: |
|
2021-09-01 17:26:01 +02:00
|
|
|
DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --generate-mono-glue modules/mono/glue || true
|
2020-08-14 12:15:58 +02:00
|
|
|
|
2021-09-01 17:26:01 +02:00
|
|
|
# Rebuild with mono
|
|
|
|
- name: Compilation (mono_glue=yes)
|
|
|
|
uses: ./.github/actions/godot-build
|
|
|
|
if: ${{ matrix.build-mono }}
|
2020-08-14 12:15:58 +02:00
|
|
|
with:
|
2021-09-01 17:26:01 +02:00
|
|
|
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} mono_glue=yes
|
|
|
|
platform: linuxbsd
|
|
|
|
target: ${{ matrix.target }}
|
|
|
|
tools: ${{ matrix.tools }}
|
|
|
|
|
|
|
|
# Download and extract zip archive with project, folder is renamed to be able to easy change used project
|
|
|
|
- name: Download test project
|
|
|
|
if: ${{ matrix.test }}
|
2020-08-14 12:15:58 +02:00
|
|
|
run: |
|
2021-09-01 17:26:01 +02:00
|
|
|
wget https://github.com/qarmin/RegressionTestProject/archive/3.x.zip
|
2021-03-22 18:26:18 +01:00
|
|
|
unzip 3.x.zip
|
|
|
|
mv "RegressionTestProject-3.x" "test_project"
|
2020-10-30 07:49:57 +01:00
|
|
|
|
2021-09-01 17:26:01 +02:00
|
|
|
# Editor is quite complicated piece of software, so it is easy to introduce bug here
|
|
|
|
- name: Open and close editor
|
|
|
|
if: ${{ matrix.test }}
|
|
|
|
run: |
|
|
|
|
DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --audio-driver Dummy -e -q --path test_project 2>&1 | tee sanitizers_log.txt || true
|
2020-10-30 07:49:57 +01:00
|
|
|
misc/scripts/check_ci_log.py sanitizers_log.txt
|
|
|
|
|
2021-09-01 17:26:01 +02:00
|
|
|
# Run test project
|
|
|
|
- name: Run project
|
|
|
|
if: ${{ matrix.test }}
|
|
|
|
run: |
|
|
|
|
DRI_PRIME=0 xvfb-run ${{ matrix.bin }} 30 --video-driver GLES3 --audio-driver Dummy --path test_project 2>&1 | tee sanitizers_log.txt || true
|
2020-08-14 12:15:58 +02:00
|
|
|
misc/scripts/check_ci_log.py sanitizers_log.txt
|
2021-05-03 21:41:42 +02:00
|
|
|
|
|
|
|
# Check class reference
|
|
|
|
- name: Check for class reference updates
|
2021-09-01 17:26:01 +02:00
|
|
|
if: ${{ matrix.test }}
|
2021-05-03 21:41:42 +02:00
|
|
|
run: |
|
|
|
|
echo "Running --doctool to see if this changes the public API without updating the documentation."
|
|
|
|
echo -e "If a diff is shown, it means that your code/doc changes are incomplete and you should update the class reference with --doctool.\n\n"
|
2021-09-01 17:26:01 +02:00
|
|
|
DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --doctool . 2>&1 > /dev/null || true
|
|
|
|
git diff --color --exit-code && ! git ls-files --others --exclude-standard | sed -e 's/^/New doc file missing in PR: /' | grep 'xml$'
|
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: ./.github/actions/upload-artifact
|
|
|
|
if: ${{ matrix.artifact }}
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.cache-name }}
|