Skip to content

Commit 1928820

Browse files
committed
rel: Finish Release-24.08
2 parents cd0f639 + 9280f21 commit 1928820

File tree

107 files changed

+13142
-3357
lines changed

Some content is hidden

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

107 files changed

+13142
-3357
lines changed

.cirrus.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
# SPDX-License-Identifier: MPL-2.0
12
task:
23
name: FreeBSD
34
env:
4-
GITHUB_TOKEN: ENCRYPTED[!9dec9949a2f8e3df89062aa2eaee35279bf7c62a43f6e8a5a4407cde75f05f48ffdb157363d0090a91616da307c71832!]
5+
GITHUB_TOKEN: ENCRYPTED[!ee1c9f1da9e4736edb4f543b3d2431949b17e6a86877e95ca4323f677185f7fbaae52c6afeb8145f0735bad487291a27!]
56
freebsd_instance:
67
matrix:
7-
image_family: freebsd-14-0
8-
image_family: freebsd-13-2
9-
image_family: freebsd-12-4
8+
image_family: freebsd-14-1
9+
image_family: freebsd-13-3
1010
install_script: pkg install -y git meson
1111
submodules_script: git submodule update --init --recursive --progress
1212
release_script: |

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# SPDX-License-Identifier: MPL-2.0
12
#this file specifies some rules on specific files for line endings and more.
23
#it also has a section on which files should NOT be part of an export (git archive) command.
34

.github/workflows/c-cpp.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# SPDX-License-Identifier: MPL-2.0
12
name: C/C++ CI
23

34
on:
@@ -37,7 +38,7 @@ jobs:
3738
shell: bash
3839

3940
steps:
40-
- uses: actions/checkout@v3
41+
- uses: actions/checkout@v4
4142
with:
4243
submodules: recursive
4344

@@ -69,12 +70,13 @@ jobs:
6970
${{ matrix.config.archive_command }} "${DESTDIR}${ARCHIVE_EXT}" ../${{ matrix.config.builddir }}/openseachest_exes
7071
7172
- name: Uploading artifacts
72-
uses: actions/upload-artifact@v3
73+
uses: actions/upload-artifact@v4
7374
with:
75+
name: ${{ format('{0}', env.DESTDIR) }}
7476
path: ${{ format('./build/{0}{1}', env.DESTDIR, matrix.config.release_extension) }}
7577

7678
# - name: Publish release
7779
# if: ${{ startsWith(github.ref, 'refs/tags/v') && matrix.config.publish_release }}
78-
# uses: softprops/action-gh-release@v1
80+
# uses: softprops/action-gh-release@v2
7981
# with:
8082
# files: ${{ format('./build/{0}{1}', env.DESTDIR, matrix.config.release_extension) }}

.github/workflows/codeql-analysis.yml

Lines changed: 46 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# SPDX-License-Identifier: MPL-2.0
12
# For most projects, this workflow file will not need changing; you simply need
23
# to commit it to your repository.
34
#
@@ -17,8 +18,7 @@ on:
1718
jobs:
1819
analyze:
1920
name: Analyze
20-
runs-on: ubuntu-latest
21-
21+
runs-on: ${{ matrix.config.os }}
2222
strategy:
2323
fail-fast: false
2424
matrix:
@@ -27,15 +27,50 @@ jobs:
2727
language: ['cpp']
2828
# Learn more...
2929
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
30+
config:
31+
- {
32+
name: "Windows MSVC x64",
33+
os: windows-latest,
34+
cc: "cl.exe",
35+
cxx: "cl.exe",
36+
arch: "x64",
37+
meson_opts: "-Db_vscrt=static_from_buildtype"
38+
}
39+
- {
40+
name: "Windows MSVC x86",
41+
os: windows-latest,
42+
cc: "cl.exe",
43+
cxx: "cl.exe",
44+
arch: "x64_x86",
45+
meson_opts: "-Db_vscrt=static_from_buildtype"
46+
}
47+
- {
48+
name: "Ubuntu GCC",
49+
os: ubuntu-latest,
50+
cc: "gcc",
51+
cxx: "g++"
52+
}
53+
- {
54+
name: "Ubuntu Clang",
55+
os: ubuntu-latest,
56+
cc: "clang",
57+
cxx: "clang++"
58+
}
3059

3160
steps:
3261
- name: Checkout repository
33-
uses: actions/checkout@v3
62+
uses: actions/checkout@v4
3463
with:
3564
# We must fetch at least the immediate parents so that if this is
3665
# a pull request then we can checkout the head.
3766
fetch-depth: 2
3867
submodules: recursive
68+
69+
- name: Settings vars for MSVC
70+
if: startsWith(matrix.config.name, 'Windows MSVC')
71+
uses: ilammy/msvc-dev-cmd@v1
72+
with:
73+
arch: ${{ matrix.config.arch }}
3974

4075
# If this run was triggered by a pull request event, then checkout
4176
# the head of the pull request instead of the merge commit.
@@ -44,7 +79,7 @@ jobs:
4479

4580
# Initializes the CodeQL tools for scanning.
4681
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v2
82+
uses: github/codeql-action/init@v3
4883
with:
4984
languages: ${{ matrix.language }}
5085
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -65,11 +100,12 @@ jobs:
65100
# uses a compiled language
66101

67102
- name: Configuring and compiling with meson
68-
uses: BSFishy/meson-build@v1.0.3
69-
with:
70-
action: build
71-
options: --verbose
72-
meson-version: 0.60.1
103+
env:
104+
CC: ${{ matrix.config.cc }}
105+
CXX: ${{ matrix.config.cxx }}
106+
run: |
107+
pip install meson ninja
108+
meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ ${{ matrix.config.meson_opts }} --buildtype=release
73109
74110
- name: Perform CodeQL Analysis
75-
uses: github/codeql-action/analyze@v2
111+
uses: github/codeql-action/analyze@v3

.github/workflows/meson.yml

Lines changed: 80 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# SPDX-License-Identifier: MPL-2.0
12
name: CI for meson build
23

34
on:
@@ -40,6 +41,18 @@ jobs:
4041
release_extension: ".zip",
4142
archive_command: "7z a -tzip -mmt"
4243
}
44+
- {
45+
name: "Windows MSVC ARM64",
46+
os: windows-latest,
47+
cc: "cl.exe",
48+
cxx: "cl.exe",
49+
arch: "x64_arm64",
50+
publish_release: true,
51+
meson_opts: "-Db_vscrt=static_from_buildtype --cross-file=./meson_crosscompile/msvc_arm64.txt",
52+
release_name: "win-ARM64",
53+
release_extension: ".zip",
54+
archive_command: "7z a -tzip -mmt"
55+
}
4356
- {
4457
name: "Windows GCC",
4558
os: windows-latest,
@@ -54,6 +67,7 @@ jobs:
5467
os: windows-latest,
5568
cc: "clang.exe",
5669
cxx: "clang++.exe",
70+
meson_opts: "--native-file=./meson_crosscompile/Windows-Clang.txt",
5771
release_name: "win-x86_64-clang",
5872
release_extension: ".zip",
5973
archive_command: "7z a -tzip -mmt"
@@ -76,24 +90,13 @@ jobs:
7690
release_extension: ".tar.xz",
7791
archive_command: "tar cvfJ"
7892
}
79-
- {
80-
name: "Manylinux GCC",
81-
os: ubuntu-latest,
82-
image: "quay.io/pypa/manylinux2014_x86_64",
83-
cc: "gcc",
84-
cxx: "g++",
85-
publish_release: true,
86-
create_package: true,
87-
release_name: "linux-x86_64-manylinux",
88-
release_extension: ".tar.xz",
89-
archive_command: "tar cvfJ"
90-
}
9193
- {
9294
name: "MUSL Cross Compile x86_64",
9395
os: ubuntu-latest,
9496
cc: "",
9597
cxx: "",
9698
publish_release: true,
99+
create_package: true,
97100
meson_opts: "--cross-file=./meson_crosscompile/x86_64-linux-musl-cross.txt",
98101
cross_compiler_arch: "x86_64",
99102
release_name: "linux-x86_64-portable",
@@ -184,9 +187,24 @@ jobs:
184187
release_extension: ".tar.xz",
185188
archive_command: "tar cvfJ"
186189
}
190+
outputs: #where hashes need to be stored for slsa provenance
191+
#NOTE: Only doing this for builds with "publish_release: true"
192+
#format is hash-${{release_name}} for the zipped packages
193+
#
194+
hash-win-x64: ${{ steps.hash.outputs.hash-win-x64 }}
195+
hash-win-x86: ${{ steps.hash.outputs.hash-win-x86 }}
196+
hash-win-ARM64: ${{ steps.hash.outputs.hash-win-ARM64 }}
197+
hash-linux-x86_64-portable: ${{ steps.hash.outputs.hash-linux-x86_64-portable }}
198+
hash-linux-i686-portable: ${{ steps.hash.outputs.hash-linux-i686-portable }}
199+
hash-linux-aarch64-portable: ${{ steps.hash.outputs.hash-linux-aarch64-portable }}
200+
hash-linux-armv7l-portable: ${{ steps.hash.outputs.hash-linux-armv7l-portable }}
201+
hash-linux-armv6-portable: ${{ steps.hash.outputs.hash-linux-armv6-portable }}
202+
hash-linux-armv5l-portable: ${{ steps.hash.outputs.hash-linux-armv5l-portable }}
203+
hash-linux-powerpc64-portable: ${{ steps.hash.outputs.hash-linux-powerpc64-portable }}
204+
hash-linux-powerpc64le-portable: ${{ steps.hash.outputs.hash-linux-powerpc64le-portable }}
187205

188206
steps:
189-
- uses: actions/checkout@v3
207+
- uses: actions/checkout@v4
190208
with:
191209
submodules: recursive
192210

@@ -210,7 +228,7 @@ jobs:
210228
- name: Restore LLVM from cache
211229
if: startsWith(matrix.config.name, 'Windows Clang')
212230
id: llvm-cache
213-
uses: actions/cache@v3
231+
uses: actions/cache@v4
214232
with:
215233
path: C:/Program Files/LLVM
216234
key: 'llvm-llvm-project-relid-${{ env.LLVM_RELID }}'
@@ -222,13 +240,6 @@ jobs:
222240
Invoke-WebRequest -Headers $headers -OutFile "LLVM.exe" ((Invoke-WebRequest -Headers $headers "https://api.github.com/repos/llvm/llvm-project/releases/$($env:LLVM_RELID)").Content | ConvertFrom-Json | Select-Object -ExpandProperty assets | Where -Property name -Like "*win64.exe" | Select-Object -First 1).browser_download_url
223241
7z x LLVM.exe -y -o"C:/Program Files/LLVM"
224242
225-
- name: Setup toolchain for Manylinux
226-
if: ${{ matrix.config.image == 'quay.io/pypa/manylinux2014_x86_64' }}
227-
shell: bash
228-
run: |
229-
if [[ ${{ matrix.config.cc }} == "clang" ]] ; then yum install -y clang compat-gcc-44 ; fi
230-
echo "/opt/python/cp310-cp310/bin" >> $GITHUB_PATH
231-
232243
- name: Escape backslash in branch name
233244
shell: bash
234245
run: echo "BRANCH_NAME=$(echo ${{ github.ref_name }} | tr / -)" >> $GITHUB_ENV
@@ -245,7 +256,7 @@ jobs:
245256
CC: ${{ matrix.config.cc }}
246257
CXX: ${{ matrix.config.cxx }}
247258
run: |
248-
pip install meson==0.60.3 ninja
259+
pip install meson ninja
249260
meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ ${{ matrix.config.meson_opts }} --buildtype=release
250261
meson install -C build
251262
@@ -258,16 +269,17 @@ jobs:
258269
shell: bash
259270

260271
# add `GOBIN` to the `PATH` otherwise nfpm in next step can't be found
261-
- uses: actions/setup-go@v3
272+
- uses: actions/setup-go@v5
262273
if: ${{ matrix.config.create_package }}
263274
with:
264275
go-version: 'stable'
276+
cache: false
265277

266278
- name: Create packages
267279
if: ${{ matrix.config.create_package }}
268280
working-directory: ${{ format('build/{0}', env.DESTDIR) }}
269281
run: | # https://nfpm.goreleaser.com/install/
270-
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.22.2
282+
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.36.1
271283
if [[ ${{ github.ref }} =~ ^refs/tags/v[0-9\.]+$ ]]; then
272284
version=$(echo ${{ github.ref_name }} | tr -d 'v')
273285
else
@@ -278,19 +290,61 @@ jobs:
278290
nfpm package -f ../../nfpm.yaml -p rpm -t ..
279291
shell: bash
280292

293+
- name: Generate Hashes
294+
if: ${{ matrix.config.publish_release }}
295+
shell: bash
296+
id: hash
297+
run: |
298+
# sha256sum generates sha256 hash for all artifacts.
299+
# base64 -w0 encodes to base64 and outputs on a single line.
300+
# sha256sum artifact | base64 -w0
301+
# NOTE: Using suggested method to generate sha across OS's from slsa documentation
302+
# https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/generic/README.md#provenance-for-artifacts-built-across-multiple-operating-systems
303+
set -euo pipefail
304+
(sha256sum -t ${{ format('./build/{0}{1}', env.DESTDIR, matrix.config.release_extension) }} || shasum -a 256 ${{ format('./build/{0}{1}', env.DESTDIR, matrix.config.release_extension) }}) > checksum
305+
echo "hash-${{ matrix.config.release_name }}=$(base64 -w0 checksum || base64 checksum)" >> "${GITHUB_OUTPUT}"
306+
281307
- name: Uploading artifacts
282-
uses: actions/upload-artifact@v3
308+
uses: actions/upload-artifact@v4
283309
with:
310+
name: ${{ format('{0}', matrix.config.release_name) }}
284311
path: |
285312
${{ format('./build/{0}{1}', env.DESTDIR, matrix.config.release_extension) }}
286313
build/*.deb
287314
build/*.rpm
288315
289316
- name: Publish release
290317
if: ${{ startsWith(github.ref, 'refs/tags/v') && matrix.config.publish_release }}
291-
uses: softprops/action-gh-release@v1
318+
uses: softprops/action-gh-release@v2
292319
with:
293320
files: |
294321
${{ format('./build/{0}{1}', env.DESTDIR, matrix.config.release_extension) }}
295322
build/*.deb
296323
build/*.rpm
324+
325+
# This step takes all the generated hashes from all build targets and combines them so slsa provenance step can run
326+
combine_hashes:
327+
runs-on: ubuntu-latest
328+
needs: [build]
329+
outputs:
330+
hashes: ${{ steps.hashes.outputs.hashes }}
331+
env:
332+
HASHES: ${{ toJSON(needs.build.outputs) }}
333+
steps:
334+
- id: hashes
335+
run: |
336+
echo "$HASHES"
337+
echo "$HASHES" | jq -r '.[] | @base64d' | sed "/^$/d" > hashes.txt
338+
echo "hashes=$(cat hashes.txt | base64 -w0)" >> "$GITHUB_OUTPUT"
339+
340+
# Generate the slsa provenance
341+
provenance:
342+
needs: [combine_hashes]
343+
permissions:
344+
actions: read # To read the workflow path.
345+
id-token: write # To sign the provenance.
346+
contents: write # To add assets to a release.
347+
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.0.0
348+
with:
349+
base64-subjects: "${{ needs.combine_hashes.outputs.hashes }}"
350+
upload-assets: true # Optional: Upload to a new release

.github/workflows/msbuild.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# SPDX-License-Identifier: MPL-2.0
12
name: MSBuild
23

34
on:
@@ -23,41 +24,26 @@ env:
2324

2425
jobs:
2526
build:
26-
runs-on: windows-2019 # Windows latest is now Win11, which codeQL will not run on
27+
runs-on: windows-latest
2728
strategy:
2829
matrix:
2930
platform: [ x64, x86 ]
3031
language: ['cpp']
3132

3233
steps:
33-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
3435
with:
3536
submodules: recursive
3637

3738
- name: Add MSBuild to PATH
38-
uses: microsoft/setup-msbuild@v1
39+
uses: microsoft/setup-msbuild@v2
3940

4041
- name: Restore NuGet packages
4142
working-directory: ${{env.GITHUB_WORKSPACE}}
4243
run: nuget restore ${{env.SOLUTION_FILE_PATH}}
4344

44-
# Initializes the CodeQL tools for scanning.
45-
- name: Initialize CodeQL
46-
if: ${{ startsWith(github.ref, 'refs/heads/develop') || startsWith(github.ref, 'refs/heads/master') }}
47-
uses: github/codeql-action/init@v2
48-
with:
49-
languages: ${{ matrix.language }}
50-
# If you wish to specify custom queries, you can do so here or in a config file.
51-
# By default, queries listed here will override any specified in a config file.
52-
# Prefix the list here with "+" to use these queries and those in the config file.
53-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
54-
5545
- name: Build
5646
working-directory: ${{env.GITHUB_WORKSPACE}}
5747
# Add additional options to the MSBuild command line here (like platform or verbosity level).
5848
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
5949
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} /p:Platform=${{matrix.platform}}
60-
61-
- name: Perform CodeQL Analysis
62-
if: ${{ startsWith(github.ref, 'refs/heads/develop') || startsWith(github.ref, 'refs/heads/master') }}
63-
uses: github/codeql-action/analyze@v2

0 commit comments

Comments
 (0)