Skip to content

Commit d2a35ad

Browse files
committed
rel: Finish v25.05
2 parents 1a04b81 + d9052c7 commit d2a35ad

File tree

113 files changed

+29615
-10748
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+29615
-10748
lines changed

.cirrus.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
task:
33
name: FreeBSD
44
env:
5-
GITHUB_TOKEN: ENCRYPTED[!ee1c9f1da9e4736edb4f543b3d2431949b17e6a86877e95ca4323f677185f7fbaae52c6afeb8145f0735bad487291a27!]
5+
GITHUB_TOKEN: ENCRYPTED[!9434dd6eb694444496d0049dd361ea798f7b4247c163cf9e90ba3367791f951b1209e803e52d1720a49a84ac48b2ed74!]
66
freebsd_instance:
77
matrix:
8-
image_family: freebsd-14-1
9-
image_family: freebsd-13-3
8+
image_family: freebsd-14-2
9+
image_family: freebsd-13-5
10+
image_family: freebsd-13-4
1011
install_script: pkg install -y git meson
1112
submodules_script: git submodule update --init --recursive --progress
1213
release_script: |

.clang-format

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Use the Microsoft coding style
2+
# This is the style our code already mostly followed-TJE
3+
BasedOnStyle: Microsoft
4+
5+
# Additional Customizations
6+
PointerAlignment: Left
7+
AlignConsecutiveAssignments: true
8+
AlignConsecutiveDeclarations: true
9+
AlignTrailingComments: true
10+
AlignAfterOpenBracket: true
11+
BinPackParameters: false
12+
AllowAllParametersOfDeclarationOnNextLine: false
13+
AlignConsecutiveMacros: 'AcrossEmptyLines'
14+
BraceWrapping:
15+
AfterControlStatement: true
16+
AllowShortBlocksOnASingleLine: Never
17+
AllowShortIfStatementsOnASingleLine: Never
18+
IndentPPDirectives: AfterHash
19+
BreakBeforeBraces: Allman

.clang-tidy

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Checks:
2+
'-*,
3+
modernize-*,
4+
cert-*,
5+
bugprone-*,
6+
-bugprone-easily-swappable-parameters,
7+
clang-analyzer-*,
8+
-clang-analyzer-deadcode.DeadStores,
9+
misc-*,
10+
-misc-no-recursion,
11+
-misc-unused-parameters,
12+
readability-non-const-parameter,
13+
readability-inconsistent-declaration-parameter-name,
14+
readability-redundant-control-flow,
15+
readability-duplicate-include,
16+
readability-avoid-const-params-in-decls,
17+
readability-function-cognitive-complexity'
18+
19+
# Other available checks:
20+
# clang-analyzer-*, performance-*, readability-*, misc-*
21+
22+
# Disabled checks:
23+
# - bugprone-easily-swappable-parameters:
24+
# Warns a LOT. Sometimes on functions meant to look like standardized C11 annex k functions.
25+
# While overall useful, it's too noisy right now and may complicate API usability.
26+
# - clang-analyzer-deadcode.DeadStores:
27+
# Generates many warnings. Cleanup is needed, but focus on more pressing issues first.
28+
# - misc-no-recursion:
29+
# Recursion is useful in our code, so this check is not applicable.
30+
# - misc-unused-parameters:
31+
# Too many false positives.
32+
# - readability-*:
33+
# Currently generates too many warnings. Manually adding rules until we can address these issues later.
34+
35+
WarningsAsErrors: ''
36+
HeaderFilterRegex: '.*'
37+
AnalyzeTemporaryDtors: false
38+
FormatStyle: 'file'

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
version: 2
3+
updates:
4+
- package-ecosystem: "gitsubmodule"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
- package-ecosystem: "github-actions"
9+
directory: "/.github/workflows"
10+
schedule:
11+
interval: "weekly"

.github/workflows/flawfinder.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: flawfinder
7+
8+
on:
9+
push:
10+
branches: [ "develop", "master", "release/*" ]
11+
pull_request:
12+
# The branches below must be a subset of the branches above
13+
branches: [ "develop" ]
14+
schedule:
15+
- cron: '39 23 * * 1'
16+
17+
jobs:
18+
flawfinder:
19+
name: Flawfinder
20+
runs-on: ubuntu-latest
21+
permissions:
22+
actions: read
23+
contents: read
24+
security-events: write
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
29+
- name: flawfinder_scan
30+
uses: david-a-wheeler/flawfinder@c57197cd6061453f10a496f30a732bc1905918d1
31+
with:
32+
arguments: '--sarif ./'
33+
output: 'flawfinder_results.sarif'
34+
35+
- name: Upload analysis results to GitHub Security tab
36+
uses: github/codeql-action/upload-sarif@v3
37+
with:
38+
sarif_file: ${{github.workspace}}/flawfinder_results.sarif

.github/workflows/meson.yml

Lines changed: 93 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: CI for meson build
44
on:
55
push:
66
branches: [ develop, master, release/*, feature/*, hotfix/* ]
7-
tags: [ v* ]
7+
tags: [ v*, test-ci* ]
88
pull_request:
99
branches: [ develop ]
1010

@@ -67,7 +67,7 @@ jobs:
6767
os: windows-latest,
6868
cc: "clang.exe",
6969
cxx: "clang++.exe",
70-
meson_opts: "--native-file=./meson_crosscompile/Windows-Clang.txt",
70+
meson_opts: "--native-file=./meson_crosscompile/Windows-Clang.txt -Db_pie=false",
7171
release_name: "win-x86_64-clang",
7272
release_extension: ".zip",
7373
archive_command: "7z a -tzip -mmt"
@@ -101,7 +101,8 @@ jobs:
101101
cross_compiler_arch: "x86_64",
102102
release_name: "linux-x86_64-portable",
103103
release_extension: ".tar.xz",
104-
archive_command: "tar cvfJ"
104+
archive_command: "tar cvfJ",
105+
image: "vonericsen/muslcc@sha256:04b60fc27f45b69896855da46f5be09fa9816b00e9948bf86cc82e56b8ce4468"
105106
}
106107
- {
107108
name: "MUSL Cross Compile i686",
@@ -113,7 +114,8 @@ jobs:
113114
cross_compiler_arch: "i686",
114115
release_name: "linux-i686-portable",
115116
release_extension: ".tar.xz",
116-
archive_command: "tar cvfJ"
117+
archive_command: "tar cvfJ",
118+
image: "vonericsen/muslcc@sha256:04b60fc27f45b69896855da46f5be09fa9816b00e9948bf86cc82e56b8ce4468"
117119
}
118120
- {
119121
name: "MUSL Cross Compile aarch64",
@@ -125,7 +127,8 @@ jobs:
125127
cross_compiler_arch: "aarch64",
126128
release_name: "linux-aarch64-portable",
127129
release_extension: ".tar.xz",
128-
archive_command: "tar cvfJ"
130+
archive_command: "tar cvfJ",
131+
image: "vonericsen/muslcc@sha256:04b60fc27f45b69896855da46f5be09fa9816b00e9948bf86cc82e56b8ce4468"
129132
}
130133
- {
131134
name: "MUSL Cross Compile armv7l",
@@ -137,7 +140,8 @@ jobs:
137140
cross_compiler_arch: "armv7l",
138141
release_name: "linux-armv7l-portable",
139142
release_extension: ".tar.xz",
140-
archive_command: "tar cvfJ"
143+
archive_command: "tar cvfJ",
144+
image: "vonericsen/muslcc@sha256:04b60fc27f45b69896855da46f5be09fa9816b00e9948bf86cc82e56b8ce4468"
141145
}
142146
- {
143147
name: "MUSL Cross Compile armv6",
@@ -149,7 +153,8 @@ jobs:
149153
cross_compiler_arch: "armv6",
150154
release_name: "linux-armv6-portable",
151155
release_extension: ".tar.xz",
152-
archive_command: "tar cvfJ"
156+
archive_command: "tar cvfJ",
157+
image: "vonericsen/muslcc@sha256:04b60fc27f45b69896855da46f5be09fa9816b00e9948bf86cc82e56b8ce4468"
153158
}
154159
- {
155160
name: "MUSL Cross Compile armv5l",
@@ -161,7 +166,8 @@ jobs:
161166
cross_compiler_arch: "armv5l",
162167
release_name: "linux-armv5l-portable",
163168
release_extension: ".tar.xz",
164-
archive_command: "tar cvfJ"
169+
archive_command: "tar cvfJ",
170+
image: "vonericsen/muslcc@sha256:04b60fc27f45b69896855da46f5be09fa9816b00e9948bf86cc82e56b8ce4468"
165171
}
166172
- {
167173
name: "MUSL Cross Compile powerpc64",
@@ -173,7 +179,8 @@ jobs:
173179
cross_compiler_arch: "powerpc64",
174180
release_name: "linux-powerpc64-portable",
175181
release_extension: ".tar.xz",
176-
archive_command: "tar cvfJ"
182+
archive_command: "tar cvfJ",
183+
image: "vonericsen/muslcc@sha256:04b60fc27f45b69896855da46f5be09fa9816b00e9948bf86cc82e56b8ce4468"
177184
}
178185
- {
179186
name: "MUSL Cross Compile powerpc64le",
@@ -185,7 +192,8 @@ jobs:
185192
cross_compiler_arch: "powerpc64le",
186193
release_name: "linux-powerpc64le-portable",
187194
release_extension: ".tar.xz",
188-
archive_command: "tar cvfJ"
195+
archive_command: "tar cvfJ",
196+
image: "vonericsen/muslcc@sha256:04b60fc27f45b69896855da46f5be09fa9816b00e9948bf86cc82e56b8ce4468"
189197
}
190198
outputs: #where hashes need to be stored for slsa provenance
191199
#NOTE: Only doing this for builds with "publish_release: true"
@@ -214,16 +222,39 @@ jobs:
214222
with:
215223
arch: ${{ matrix.config.arch }}
216224

217-
- name: Setup for MUSL Cross Compilation
218-
if: startsWith(matrix.config.name, 'MUSL Cross Compile')
219-
run: |
220-
sudo ./meson_crosscompile/install-muslcc.sh -a ${{ matrix.config.cross_compiler_arch }}
221-
222225
- name: Get latest LLVM version
223226
if: startsWith(matrix.config.name, 'Windows Clang')
224227
run: |
225228
$headers = @{ Authorization = 'Bearer ${{ secrets.GITHUB_TOKEN }}' }
226-
echo "LLVM_RELID=$((Invoke-WebRequest -Headers $headers 'https://api.github.com/repos/llvm/llvm-project/releases/latest').Content | ConvertFrom-Json | Select-Object -ExpandProperty id)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
229+
$latestRelease = Invoke-WebRequest -Headers $headers 'https://api.github.com/repos/llvm/llvm-project/releases/latest'
230+
$releaseData = $latestRelease.Content | ConvertFrom-Json
231+
$assets = $releaseData.assets | Where-Object { $_.name -like "*win64.exe" }
232+
233+
if ($assets) {
234+
$downloadUrl = $assets.browser_download_url
235+
echo "LLVM_RELID=$($releaseData.id)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
236+
echo "LLVM_DOWNLOAD_URL=$downloadUrl" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
237+
} else {
238+
Write-Host "No current Windows build available for the latest release. Searching for previous releases..."
239+
$releases = Invoke-WebRequest -Headers $headers 'https://api.github.com/repos/llvm/llvm-project/releases'
240+
$found = $false
241+
242+
foreach ($release in $releases.Content | ConvertFrom-Json) {
243+
$assets = $release.assets | Where-Object { $_.name -like "*win64.exe" }
244+
if ($assets) {
245+
$downloadUrl = $assets.browser_download_url
246+
echo "LLVM_RELID=$($release.id)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
247+
echo "LLVM_DOWNLOAD_URL=$downloadUrl" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
248+
$found = $true
249+
break
250+
}
251+
}
252+
253+
if (-not $found) {
254+
Write-Host "No Windows build available for any recent releases."
255+
exit 0
256+
}
257+
}
227258
228259
- name: Restore LLVM from cache
229260
if: startsWith(matrix.config.name, 'Windows Clang')
@@ -251,7 +282,15 @@ jobs:
251282
echo "DESTDIR=${DESTDIR}" >> $GITHUB_ENV
252283
shell: bash
253284

254-
- name: Configuring and compiling with meson
285+
- name: Install Meson and Ninja and Build (MUSL container)
286+
if: matrix.config.image != ''
287+
run: |
288+
meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ ${{ matrix.config.meson_opts }} --buildtype=release
289+
meson install -C build
290+
291+
292+
- name: Install Meson and Ninja and Build (Github runners)
293+
if: matrix.config.image == ''
255294
env:
256295
CC: ${{ matrix.config.cc }}
257296
CXX: ${{ matrix.config.cxx }}
@@ -260,14 +299,6 @@ jobs:
260299
meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ ${{ matrix.config.meson_opts }} --buildtype=release
261300
meson install -C build
262301
263-
- name: Packing release
264-
env:
265-
ARCHIVE_EXT: ${{ matrix.config.release_extension }}
266-
run: |
267-
cd build
268-
${{ matrix.config.archive_command }} "${DESTDIR}${ARCHIVE_EXT}" $DESTDIR
269-
shell: bash
270-
271302
# add `GOBIN` to the `PATH` otherwise nfpm in next step can't be found
272303
- uses: actions/setup-go@v5
273304
if: ${{ matrix.config.create_package }}
@@ -290,6 +321,41 @@ jobs:
290321
nfpm package -f ../../nfpm.yaml -p rpm -t ..
291322
shell: bash
292323

324+
- name: Set ownership of executables to root:root
325+
if: ${{ matrix.config.os != 'windows-latest' }}
326+
run: |
327+
if [[ -z "${{ matrix.config.image }}" ]]; then
328+
sudo chown -R root:root build
329+
else
330+
chown -R root:root build
331+
fi
332+
333+
- name: Packing release
334+
env:
335+
ARCHIVE_EXT: ${{ matrix.config.release_extension }}
336+
run: |
337+
cd build
338+
if [[ "${{ matrix.config.os }}" != "windows-latest" ]]; then
339+
if [[ -z "${{ matrix.config.image }}" ]]; then
340+
sudo ${{ matrix.config.archive_command }} "${DESTDIR}${ARCHIVE_EXT}" $DESTDIR
341+
else
342+
${{ matrix.config.archive_command }} "${DESTDIR}${ARCHIVE_EXT}" $DESTDIR
343+
fi
344+
else
345+
${{ matrix.config.archive_command }} "${DESTDIR}${ARCHIVE_EXT}" $DESTDIR
346+
fi
347+
shell: bash
348+
349+
- name: Set ownership of tar archive to root:root
350+
if: ${{ matrix.config.os != 'windows-latest' }}
351+
run: |
352+
if [[ -z "${{ matrix.config.image }}" ]]; then
353+
sudo chown root:root build/"${DESTDIR}${ARCHIVE_EXT}"
354+
else
355+
chown root:root build/"${DESTDIR}${ARCHIVE_EXT}"
356+
fi
357+
358+
293359
- name: Generate Hashes
294360
if: ${{ matrix.config.publish_release }}
295361
shell: bash
@@ -314,7 +380,7 @@ jobs:
314380
build/*.rpm
315381
316382
- name: Publish release
317-
if: ${{ startsWith(github.ref, 'refs/tags/v') && matrix.config.publish_release }}
383+
if: ${{ (startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/test-ci')) && matrix.config.publish_release }}
318384
uses: softprops/action-gh-release@v2
319385
with:
320386
files: |
@@ -344,7 +410,7 @@ jobs:
344410
actions: read # To read the workflow path.
345411
id-token: write # To sign the provenance.
346412
contents: write # To add assets to a release.
347-
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.0.0
413+
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0
348414
with:
349415
base64-subjects: "${{ needs.combine_hashes.outputs.hashes }}"
350416
upload-assets: true # Optional: Upload to a new release

0 commit comments

Comments
 (0)