2022-03-15 13:29:32 +01:00
|
|
|
name: 🐧 Linux Builds
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
# Global Settings
|
|
|
|
env:
|
2022-03-20 11:19:29 +01:00
|
|
|
PANDEMONIUM_BASE_BRANCH: master
|
2022-03-15 13:29:32 +01:00
|
|
|
SCONSFLAGS: verbose=yes warnings=all werror=yes
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-linux
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-linux:
|
2024-11-06 13:57:25 +01:00
|
|
|
# Stay one LTS before latest to increase portability of Linux artifacts.
|
|
|
|
runs-on: "ubuntu-22.04"
|
2022-03-15 13:29:32 +01:00
|
|
|
name: ${{ matrix.name }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
2022-03-16 11:06:30 +01:00
|
|
|
- name: Editor (target=release_debug, tools=yes)
|
|
|
|
cache-name: linux-editor
|
2022-03-15 13:29:32 +01:00
|
|
|
target: release_debug
|
|
|
|
tools: true
|
2022-03-23 20:46:05 +01:00
|
|
|
bin: "./bin/pandemonium.x11.opt.tools.64"
|
2022-03-15 13:29:32 +01:00
|
|
|
artifact: true
|
|
|
|
|
2022-03-16 11:06:30 +01:00
|
|
|
- name: Template (target=release, tools=no)
|
|
|
|
cache-name: linux-template
|
2022-03-15 13:29:32 +01:00
|
|
|
target: release
|
|
|
|
tools: false
|
2022-03-16 11:06:30 +01:00
|
|
|
sconsflags: debug_symbols=no
|
2022-03-15 13:29:32 +01:00
|
|
|
artifact: true
|
|
|
|
|
2024-01-06 01:48:06 +01:00
|
|
|
- name: Minimal template (target=release, tools=no, everything disabled)
|
|
|
|
cache-name: linux-template-minimal
|
|
|
|
target: release
|
|
|
|
tools: false
|
|
|
|
sconsflags: modules_enabled_by_default=no disable_3d=yes disable_advanced_gui=yes deprecated=no minizip=no debug_symbols=no
|
|
|
|
build-mono: false
|
|
|
|
artifact: false
|
|
|
|
|
2022-03-15 13:29:32 +01:00
|
|
|
steps:
|
2023-12-20 22:06:03 +01:00
|
|
|
- uses: actions/checkout@v4
|
2022-03-15 13:29:32 +01:00
|
|
|
|
|
|
|
- name: Linux dependencies
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2024-11-06 13:57:25 +01:00
|
|
|
# Azure repositories are flaky, remove them.
|
|
|
|
sudo rm -f /etc/apt/sources.list.d/{azure,microsoft}*
|
2022-03-15 13:29:32 +01:00
|
|
|
sudo apt-get update
|
2024-11-06 13:57:25 +01:00
|
|
|
# The actual dependencies.
|
|
|
|
sudo apt-get install --no-install-recommends build-essential pkg-config libx11-dev \
|
|
|
|
libxcursor-dev libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev \
|
|
|
|
libpulse-dev libdbus-1-dev libudev-dev libxi-dev libxrandr-dev yasm xvfb wget unzip \
|
2022-05-23 14:02:12 +02:00
|
|
|
libspeechd-dev speech-dispatcher
|
2022-03-15 13:29:32 +01:00
|
|
|
|
2023-08-01 14:28:56 +02:00
|
|
|
- name: Free disk space on runner
|
|
|
|
run: |
|
|
|
|
echo "Disk usage before:" && df -h
|
|
|
|
sudo rm -rf /usr/local/lib/android
|
|
|
|
echo "Disk usage after:" && df -h
|
|
|
|
|
2024-07-20 21:07:55 +02:00
|
|
|
- name: Restore Pandemonium build cache
|
|
|
|
uses: ./.github/actions/pandemonium-cache-restore
|
2022-03-15 13:29:32 +01:00
|
|
|
with:
|
|
|
|
cache-name: ${{ matrix.cache-name }}
|
|
|
|
continue-on-error: true
|
|
|
|
|
|
|
|
- name: Setup python and scons
|
2022-03-23 20:46:05 +01:00
|
|
|
uses: ./.github/actions/pandemonium-deps
|
2022-03-15 13:29:32 +01:00
|
|
|
|
|
|
|
- name: Compilation
|
2022-03-23 20:46:05 +01:00
|
|
|
uses: ./.github/actions/pandemonium-build
|
2022-03-15 13:29:32 +01:00
|
|
|
with:
|
|
|
|
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
|
|
|
|
platform: linuxbsd
|
|
|
|
target: ${{ matrix.target }}
|
|
|
|
tools: ${{ matrix.tools }}
|
|
|
|
|
2024-07-20 21:07:55 +02:00
|
|
|
- name: Save Pandemonium build cache
|
|
|
|
uses: ./.github/actions/pandemonium-cache-save
|
|
|
|
continue-on-error: true
|
|
|
|
|
2022-03-15 13:29:32 +01:00
|
|
|
- name: Prepare artifact
|
|
|
|
if: ${{ matrix.artifact }}
|
|
|
|
run: |
|
2022-03-23 20:46:05 +01:00
|
|
|
strip bin/pandemonium.*
|
2022-09-17 09:55:21 +02:00
|
|
|
chmod +x bin/pandemonium.*
|
2022-03-15 13:29:32 +01:00
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: ./.github/actions/upload-artifact
|
|
|
|
if: ${{ matrix.artifact }}
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.cache-name }}
|