-
Notifications
You must be signed in to change notification settings - Fork 68
153 lines (145 loc) · 5.86 KB
/
Copy pathbuild.yaml
File metadata and controls
153 lines (145 loc) · 5.86 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: build
on:
pull_request:
branches: ['master', 'release/**']
push:
branches: ['master', 'release/**']
jobs:
path-filter:
runs-on: ubuntu-latest
outputs:
should_build: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
code:
- '**.h'
- '**.hpp'
- '**.c'
- '**.cpp'
- '**.cc'
- 'po/**'
- '**.cmake'
- '**/CMakeLists.txt'
build-u24-x64:
needs: path-filter
if: ${{ needs.path-filter.outputs.should_build == 'true' }}
name: build on ubuntu-24.04 with Qt6
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: >-
cmake ninja-build debhelper-compat erofs-utils erofsfuse intltool libcap-dev
libcli11-dev libcurl4-openssl-dev libdeflate-dev libelf-dev libexpected-dev
libfuse3-dev libglib2.0-dev libgmock-dev libgtest-dev liblz4-dev liblzma-dev
libostree-dev libpcre2-dev libselinux1-dev libssl-dev libsystemd-dev libyaml-cpp-dev
libzstd-dev nlohmann-json3-dev pkg-config zlib1g-dev libwayland-dev wayland-protocols libgl1-mesa-dev
qt6-base-dev qt6-base-private-dev
version: 1.0
- name: Configure CMake
run: |
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCPM_LOCAL_PACKAGES_ONLY=ON -DLINGLONG_ENABLE_WAYLAND_SEC_CTX_SUPPORT=ON
- name: Build
run: cmake --build build --parallel
- name: Run tests
run: cmake --build build --target test
build-u24-arm:
needs: path-filter
if: ${{ needs.path-filter.outputs.should_build == 'true' }}
name: build on ubuntu-24.04-arm with Qt6
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: >-
cmake ninja-build debhelper-compat erofs-utils erofsfuse intltool libcap-dev
libcli11-dev libcurl4-openssl-dev libdeflate-dev libelf-dev libexpected-dev
libfuse3-dev libglib2.0-dev libgmock-dev libgtest-dev liblz4-dev liblzma-dev
libostree-dev libpcre2-dev libselinux1-dev libssl-dev libsystemd-dev libyaml-cpp-dev
libzstd-dev nlohmann-json3-dev pkg-config zlib1g-dev libwayland-dev wayland-protocols libgl1-mesa-dev
qt6-base-dev qt6-base-private-dev
version: 1.0
- name: Configure CMake
run: |
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCPM_LOCAL_PACKAGES_ONLY=ON -DLINGLONG_ENABLE_WAYLAND_SEC_CTX_SUPPORT=ON
- name: Build
run: cmake --build build --parallel
- name: Run tests
run: cmake --build build --target test
build-u22-x64:
needs: path-filter
if: ${{ needs.path-filter.outputs.should_build == 'true' }}
name: build on ubuntu-22.04 with Qt5
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: >-
cmake ninja-build debhelper-compat erofs-utils erofsfuse intltool libcap-dev
libcli11-dev libcurl4-openssl-dev libdeflate-dev libelf-dev libexpected-dev
libfuse3-dev libglib2.0-dev libgmock-dev libgtest-dev liblz4-dev liblzma-dev
libostree-dev libpcre2-dev libselinux1-dev libssl-dev libsystemd-dev libyaml-cpp-dev
libzstd-dev nlohmann-json3-dev pkg-config zlib1g-dev libgl1-mesa-dev
qtbase5-dev qtbase5-private-dev
version: 1.0
- name: Configure CMake
run: |
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCPM_LOCAL_PACKAGES_ONLY=ON -DENABLE_TESTING=OFF
- name: Build
run: cmake --build build --parallel
build-u22-arm:
needs: path-filter
if: ${{ needs.path-filter.outputs.should_build == 'true' }}
name: build on ubuntu-22.04-arm with Qt5
runs-on: ubuntu-22.04-arm
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: >-
cmake ninja-build debhelper-compat erofs-utils erofsfuse intltool libcap-dev
libcli11-dev libcurl4-openssl-dev libdeflate-dev libelf-dev libexpected-dev
libfuse3-dev libglib2.0-dev libgmock-dev libgtest-dev liblz4-dev liblzma-dev
libostree-dev libpcre2-dev libselinux1-dev libssl-dev libsystemd-dev libyaml-cpp-dev
libzstd-dev nlohmann-json3-dev pkg-config zlib1g-dev libgl1-mesa-dev
qtbase5-dev qtbase5-private-dev
version: 1.0
- name: Configure CMake
run: |
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCPM_LOCAL_PACKAGES_ONLY=ON -DENABLE_TESTING=OFF
- name: Build
run: cmake --build build --parallel
build-status:
name: Final build Status
needs:
[path-filter, build-u24-x64, build-u24-arm, build-u22-x64, build-u22-arm]
if: always()
runs-on: ubuntu-latest
steps:
- name: Decide status
run: |
U24_X64="${{ needs.build-u24-x64.result }}"
U24_ARM="${{ needs.build-u24-arm.result }}"
U22_X64="${{ needs.build-u22-x64.result }}"
U22_ARM="${{ needs.build-u22-arm.result }}"
if [[ "$U24_X64" == "failure" || "$U24_ARM" == "failure" || "$U22_X64" == "failure" || "$U22_ARM" == "failure" ]]; then
echo "One or more builds failed."
exit 1
fi
echo "All builds successful or skipped."
exit 0