Repository navigation
81 lines (70 loc) · 3.85 KB
/
Copy pathlinux.yml
File metadata and controls
81 lines (70 loc) · 3.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Purpose: Guard the Linux build and the portable core. Stage one of the port is complete but was
# unprotected: nothing on any commit built CMake or Linux, so the headless suite could rot silently
# between one deliberate check and the next. See docs/linux.md.
#
# Ubuntu LTS deliberately, not a rolling distribution: this is the version-floor leg of the matrix
# described in docs/linux.md, so the floor is enforced by the build rather than by intention.
name: Linux
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
build:
# The x64 legs keep their names; the legs on Arm's runner add arm64, and there FFmpeg's configure
# chooses its aarch64 assembly and nasm goes unused.
name: build (${{ matrix.config }}${{ matrix.os == 'ubuntu-24.04-arm' && ', arm64' || '' }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
config: [ Debug, Release ]
os: [ ubuntu-24.04, ubuntu-24.04-arm ]
steps:
- uses: actions/checkout@v4
with:
lfs: true
# The vendored build is the default (DIFFRACTOR_PREFER_SYSTEM is OFF), so these are the
# toolchain rather than the dependencies. FFmpeg is driven by its own configure and make.
# libdesktop-render's window layer sets text with Pango and drives X11 and Wayland through SDL3,
# which it builds from its pin, so it needs their development packages. libdesktop-platform's
# web client is the system's libcurl and its JPEG decoder the system's libjpeg-turbo; SDL3 builds
# its PulseAudio, ALSA and PipeWire audio backends only where their development packages are
# installed; and a phone or camera is reached over MTP through libmtp, which speaks USB through libusb.
- name: Install toolchain
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build pkg-config ccache nasm \
libpango1.0-dev libfontconfig-dev libfreetype-dev \
libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev \
libxkbcommon-dev libwayland-dev wayland-protocols libegl-dev libgl-dev libgles-dev libdrm-dev \
libgbm-dev libdecor-0-dev libdbus-1-dev libudev-dev \
libcurl4-openssl-dev libjpeg-dev libpulse-dev libasound2-dev libpipewire-0.3-dev libmtp-dev \
libusb-1.0-0-dev
# FFmpeg and the 25 vendored CMake modules are most of the build time and change rarely.
# CCACHE_DIR is set rather than assumed: ccache 4.x defaults to ~/.cache/ccache, not ~/.ccache,
# so caching the older path would silently cache nothing. An ARM64 leg's key names its
# architecture, so neither architecture restores the other's objects.
- name: Cache compiler output
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ runner.os }}${{ runner.arch == 'ARM64' && '-ARM64' || '' }}-${{ matrix.config }}-${{ github.sha }}
restore-keys: |
ccache-${{ runner.os }}${{ runner.arch == 'ARM64' && '-ARM64' || '' }}-${{ matrix.config }}-
# bash ./dd rather than ./dd: the launcher is checked in from Windows and carries no
# executable bit. It prefers pwsh and falls back to tools/dd.py, which is what runs here.
- name: Build
run: bash ./dd build --config ${{ matrix.config }}
# The whole suite, not a subset: docs/linux.md records that Linux runs the six tests guarded
# by #ifndef _DEBUG in both configurations, because _DEBUG is an MSVC macro.
- name: Run tests
run: bash ./dd test
# FFmpeg is configured twice and nothing else notices when the two answers drift. It only
# needs one configuration, since the comparison is against the checked-in Windows config.
- name: Compare FFmpeg configurations
if: matrix.config == 'Release'
run: python3 tools/compare_ffmpeg_config.py