Repository navigation
115 lines (91 loc) · 3.96 KB
/
Copy pathci-linux.yml
File metadata and controls
115 lines (91 loc) · 3.96 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Copyright (c) Files Community
# Licensed under the MIT License.
# Abstract:
# This CI builds the platform-neutral projects on Linux. It is executed on
# pushes to main and linux/** branches, (push runs also report on PRs).
# It is skipped if files not directly related to source code maintenance
# are updated.
name: Files CI (Linux)
on:
push:
branches:
- main
- 'linux/**'
paths-ignore:
- 'assets/**'
- 'builds/**'
- 'docs/**'
- '*.md'
run-name: ${{ github.event_name == 'pull_request' && 'Files Linux PR Validation' || 'Files Linux CI Validation' }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-linux:
runs-on: ubuntu-24.04
steps:
- name: Checkout the repository
uses: actions/checkout@v6
# The platform tests exercise the X11 clipboard (Xvfb + libX11), SkiaSharp (fontconfig) and the bubblewrap/ffmpeg/poppler thumbnail fallbacks.
- name: Install platform test dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends xvfb xauth x11-utils x11-xkb-utils xkb-data libx11-6 libfontconfig1 fonts-dejavu-core bubblewrap ffmpeg poppler-utils dbus
# Ubuntu 24.04 runners block unprivileged user namespaces, which bubblewrap needs.
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 || true
- name: Diagnose Xvfb
continue-on-error: true
run: |
Xvfb :191 -nolisten tcp -screen 0 320x200x24 &
sleep 3
ls -la /tmp/.X11-unix || true
DISPLAY=:191 xdpyinfo | head -5 || true
kill %1 || true
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
global-json-file: global.json
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Build Files.Shared
run: dotnet build src/Files.Shared/Files.Shared.csproj -c Release -warnaserror
- name: Build Files.Core.Storage
run: dotnet build src/Files.Core.Storage/Files.Core.Storage.csproj -c Release -warnaserror
- name: Build Files.Core.SourceGenerator
run: dotnet build src/Files.Core.SourceGenerator/Files.Core.SourceGenerator.csproj -c Release -warnaserror
- name: Build Files.Platform.Linux
run: dotnet build src/Files.Platform.Linux/Files.Platform.Linux.csproj -c Release -warnaserror
- name: Build Files.App.Controls (Uno desktop)
run: dotnet build src/Files.App.Controls/Files.App.Controls.csproj -c Release -f net10.0-desktop
- name: Build Files.App.Storage (Uno desktop)
run: dotnet build src/Files.App.Storage/Files.App.Storage.csproj -c Release -f net10.0-desktop
# Blocking: Win32 compat mode is off (the default since P4-Z), so no Win32/Shell code and no CsWin32 assembly may be needed.
- name: Build Files.App (Uno desktop, Win32 compat off)
run: dotnet build src/Files.App/Files.App.csproj -c Release -f net10.0-desktop -p:FilesWin32Compat=false
- name: Verify the desktop build did not build CsWin32
shell: bash
run: |
if [ -d src/Files.App.CsWin32/bin ] || [ -d src/Files.App.CsWin32/obj ]; then
echo "::error::Files.App.CsWin32 was built for the desktop target; something still depends on Win32 compat mode."
exit 1
fi
- name: Build and test platform test projects (if any)
shell: bash
run: |
shopt -s nullglob
projects=(tests/*.Platform.Tests/*.csproj tests/*.Linux.Tests/*.csproj)
if [ ${#projects[@]} -eq 0 ]; then
echo "No platform test projects found; skipping."
exit 0
fi
for project in "${projects[@]}"; do
dotnet build "$project" -c Release -warnaserror
dotnet test --project "$project" -c Release --no-build
done