2020-08-22 21:04:57 +00:00
|
|
|
name: 🐧 Linux Builds
|
2020-07-24 08:19:19 +00:00
|
|
|
on: [push, pull_request]
|
|
|
|
|
2020-10-22 11:27:03 +00:00
|
|
|
# Global Settings
|
2020-07-24 08:19:19 +00:00
|
|
|
env:
|
2021-04-19 12:37:47 +00:00
|
|
|
GODOT_BASE_BRANCH: 3.x
|
2021-09-21 19:54:55 +00:00
|
|
|
SCONSFLAGS: verbose=yes warnings=all werror=yes
|
2020-07-24 08:19:19 +00:00
|
|
|
|
2021-09-01 15:26:01 +00:00
|
|
|
concurrency:
|
|
|
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-linux
|
|
|
|
cancel-in-progress: true
|
2020-07-24 08:19:19 +00:00
|
|
|
|
2021-09-01 15:26:01 +00:00
|
|
|
jobs:
|
|
|
|
build-linux:
|
2020-07-24 08:19:19 +00:00
|
|
|
runs-on: "ubuntu-20.04"
|
2021-09-01 15:26:01 +00: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
|
2022-02-22 12:10:12 +00:00
|
|
|
sconsflags: module_mono_enabled=yes mono_static=yes mono_glue=no
|
2021-09-01 15:26:01 +00:00
|
|
|
bin: "./bin/godot.x11.opt.tools.64.mono"
|
|
|
|
build-mono: true
|
|
|
|
artifact: true
|
|
|
|
|
2022-07-21 09:35:38 +00:00
|
|
|
- name: Editor and sanitizers (target=debug, tools=yes, use_asan=yes, use_ubsan=yes, linker=gold)
|
2021-09-01 15:26:01 +00:00
|
|
|
cache-name: linux-editor-sanitizers
|
|
|
|
target: debug
|
|
|
|
tools: true
|
2022-07-21 09:35:38 +00:00
|
|
|
sconsflags: use_asan=yes use_ubsan=yes linker=gold
|
2021-09-01 15:26:01 +00:00
|
|
|
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
|
2022-02-22 12:10:12 +00:00
|
|
|
sconsflags: module_mono_enabled=yes mono_static=yes mono_glue=no debug_symbols=no
|
2021-09-01 15:26:01 +00:00
|
|
|
build-mono: false
|
|
|
|
artifact: true
|
2020-07-24 08:19:19 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2021-09-01 15:26:01 +00:00
|
|
|
- name: Linux dependencies
|
|
|
|
shell: bash
|
2020-07-24 08:19:19 +00:00
|
|
|
run: |
|
2021-09-01 15:26:01 +00:00
|
|
|
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
2020-10-22 11:27:03 +00:00
|
|
|
sudo rm -f /etc/apt/sources.list.d/*
|
2020-07-24 08:19:19 +00:00
|
|
|
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
|
|
|
|
sudo apt-get update
|
2021-09-01 15:26:01 +00:00
|
|
|
# The actual dependencies
|
2020-07-24 08:19:19 +00:00
|
|
|
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
|
2021-09-01 15:26:01 +00:00
|
|
|
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev \
|
2022-05-23 12:02:12 +00:00
|
|
|
libdbus-1-dev libudev-dev libxi-dev libxrandr-dev yasm xvfb wget unzip \
|
|
|
|
libspeechd-dev speech-dispatcher
|
2020-07-24 08:19:19 +00:00
|
|
|
|
2021-09-01 15:26:01 +00:00
|
|
|
- name: Setup Godot build cache
|
|
|
|
uses: ./.github/actions/godot-cache
|
2020-07-24 08:19:19 +00:00
|
|
|
with:
|
2021-09-01 15:26:01 +00:00
|
|
|
cache-name: ${{ matrix.cache-name }}
|
2021-08-18 19:00:56 +00:00
|
|
|
continue-on-error: true
|
2020-07-24 08:19:19 +00:00
|
|
|
|
2021-09-01 15:26:01 +00:00
|
|
|
- name: Setup python and scons
|
|
|
|
uses: ./.github/actions/godot-deps
|
2020-07-24 08:19:19 +00:00
|
|
|
|
|
|
|
- name: Compilation
|
2021-09-01 15:26:01 +00:00
|
|
|
uses: ./.github/actions/godot-build
|
2020-10-22 11:27:03 +00:00
|
|
|
with:
|
2021-09-01 15:26:01 +00: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 10:15:58 +00:00
|
|
|
run: |
|
2021-09-01 15:26:01 +00:00
|
|
|
DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --generate-mono-glue modules/mono/glue || true
|
2020-08-14 10:15:58 +00:00
|
|
|
|
2021-09-01 15:26:01 +00:00
|
|
|
# Rebuild with mono
|
|
|
|
- name: Compilation (mono_glue=yes)
|
|
|
|
uses: ./.github/actions/godot-build
|
|
|
|
if: ${{ matrix.build-mono }}
|
2020-08-14 10:15:58 +00:00
|
|
|
with:
|
2021-09-01 15:26:01 +00: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 10:15:58 +00:00
|
|
|
run: |
|
2022-01-06 11:01:00 +00:00
|
|
|
wget https://github.com/godotengine/regression-test-project/archive/3.x.zip
|
2021-03-22 17:26:18 +00:00
|
|
|
unzip 3.x.zip
|
2022-01-06 11:01:00 +00:00
|
|
|
mv "regression-test-project-3.x" "test_project"
|
2020-10-30 06:49:57 +00:00
|
|
|
|
2021-09-01 15:26:01 +00: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 06:49:57 +00:00
|
|
|
misc/scripts/check_ci_log.py sanitizers_log.txt
|
|
|
|
|
2021-09-01 15:26:01 +00: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 10:15:58 +00:00
|
|
|
misc/scripts/check_ci_log.py sanitizers_log.txt
|
2021-05-03 19:41:42 +00:00
|
|
|
|
|
|
|
# Check class reference
|
|
|
|
- name: Check for class reference updates
|
2021-09-01 15:26:01 +00:00
|
|
|
if: ${{ matrix.test }}
|
2021-05-03 19:41:42 +00: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 15:26:01 +00: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$'
|
|
|
|
|
2021-09-21 19:54:55 +00:00
|
|
|
- name: Prepare artifact
|
|
|
|
if: ${{ matrix.artifact }}
|
|
|
|
run: |
|
|
|
|
strip bin/godot.*
|
|
|
|
|
2021-09-01 15:26:01 +00:00
|
|
|
- name: Upload artifact
|
|
|
|
uses: ./.github/actions/upload-artifact
|
|
|
|
if: ${{ matrix.artifact }}
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.cache-name }}
|