Skip to content

Commit 1c157dc

Browse files
committed
Merging develop into feature branch
2 parents 7d8aca6 + e778de7 commit 1c157dc

114 files changed

Lines changed: 6681 additions & 4336 deletions

File tree

Some content is hidden

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

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ updates:
1313
directory: "/.github/workflows"
1414
schedule:
1515
interval: "weekly"
16+
cooldown:
17+
default-days: 7

.github/workflows/c-cpp.yml

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# SPDX-License-Identifier: MPL-2.0
22
name: C/C++ CI
33

4+
permissions: {}
5+
46
on:
57
push:
68
branches: [ develop, master, release/*, feature/*, hotfix/* ]
@@ -46,49 +48,64 @@ jobs:
4648

4749
steps:
4850
- name: Harden Runner
49-
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.14.1
51+
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.14.1
5052
with:
5153
egress-policy: audit
5254

53-
- uses: actions/checkout@v6.0.2
55+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5456
continue-on-error: true # rsync code 24: harmless cleanup-phase race during VM setup
5557
with:
58+
persist-credentials: false
5659
submodules: recursive
5760

5861
- name: Escape backslash in branch name
5962
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
6063

6164
- name: Set release name
65+
id: release_vars
66+
env:
67+
RELEASE_NAME: ${{ matrix.config.release_name }}
6268
run: |
63-
DESTDIR="openSeaChest-${BRANCH_NAME}-${{ matrix.config.release_name }}"
69+
DESTDIR="openSeaChest-${BRANCH_NAME}-${RELEASE_NAME}"
6470
echo "DESTDIR=${DESTDIR}" >> $GITHUB_ENV
71+
echo "destdir=${DESTDIR}" >> $GITHUB_OUTPUT
6572
6673
- name: Add Mingw-w64 to path
6774
if: startsWith(matrix.config.name, 'Windows GCC')
6875
run: |
6976
echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH
7077
7178
- name: Make buildjsonc.sh executable
72-
run: chmod +x Make/buildjsonc.sh
79+
run: |
80+
chmod +x Make/buildjsonc.sh
81+
chmod +x subprojects/opensea-jsonformat/Make/buildjsonc.sh
7382
7483
- name: make
7584
working-directory: ${{ matrix.config.builddir }}
85+
env:
86+
MAKEFILE_NAME: ${{ matrix.config.makefile }}
7687
run: |
77-
make release -f ${{ matrix.config.makefile }}
88+
make release JSONOUTPUTSUPPORT=1 -f "$MAKEFILE_NAME"
7889
7990
- name: Packing release
8091
env:
92+
DESTDIR: ${{ steps.release_vars.outputs.destdir }}
8193
ARCHIVE_EXT: ${{ matrix.config.release_extension }}
94+
RELEASE_BUILD_DIR: ${{ matrix.config.builddir }}
8295
run: |
8396
mkdir build
8497
cd build
85-
${{ matrix.config.archive_command }} "${DESTDIR}${ARCHIVE_EXT}" ../${{ matrix.config.builddir }}/openseachest_exes
98+
if [[ "$ARCHIVE_EXT" == ".zip" ]]; then
99+
7z a -tzip -mmt "${DESTDIR}${ARCHIVE_EXT}" "../${RELEASE_BUILD_DIR}/openseachest_exes"
100+
else
101+
tar cvfJ "${DESTDIR}${ARCHIVE_EXT}" "../${RELEASE_BUILD_DIR}/openseachest_exes"
102+
fi
86103
87104
- name: Uploading artifacts
88-
uses: actions/upload-artifact@v7.0.0
105+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
89106
with:
90-
name: ${{ format('{0}', env.DESTDIR) }}
91-
path: ${{ format('./build/{0}{1}', env.DESTDIR, matrix.config.release_extension) }}
107+
name: ${{ steps.release_vars.outputs.destdir }}
108+
path: ${{ format('./build/{0}{1}', steps.release_vars.outputs.destdir, matrix.config.release_extension) }}
92109

93110
# - name: Publish release
94111
# if: ${{ startsWith(github.ref, 'refs/tags/v') && matrix.config.publish_release }}

.github/workflows/codeql-analysis.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# or to provide custom queries or build logic.
77
name: "CodeQL"
88

9+
permissions: {}
10+
911
on:
1012
push:
1113
branches: [develop, master]
@@ -24,9 +26,9 @@ jobs:
2426
name: Analyze
2527
runs-on: ${{ matrix.config.os }}
2628
permissions:
27-
security-events: write
29+
security-events: write # Upload CodeQL SARIF results to code scanning.
2830
contents: read
29-
actions: read
31+
actions: read # Allow CodeQL to inspect workflow and action metadata.
3032
strategy:
3133
fail-fast: false
3234
matrix:
@@ -71,22 +73,23 @@ jobs:
7173

7274
steps:
7375
- name: Harden Runner
74-
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.14.1
76+
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.14.1
7577
with:
7678
egress-policy: audit
7779

7880
- name: Checkout repository
79-
uses: actions/checkout@v6.0.2
81+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8082
continue-on-error: true # rsync code 24: harmless cleanup-phase race during VM setup
8183
with:
84+
persist-credentials: false
8285
# We must fetch at least the immediate parents so that if this is
8386
# a pull request then we can checkout the head.
8487
fetch-depth: 2
8588
submodules: recursive
8689

8790
- name: Settings vars for MSVC
8891
if: startsWith(matrix.config.name, 'Windows MSVC')
89-
uses: ilammy/msvc-dev-cmd@v1
92+
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
9093
with:
9194
arch: ${{ matrix.config.arch }}
9295

@@ -97,7 +100,7 @@ jobs:
97100

98101
# Initializes the CodeQL tools for scanning.
99102
- name: Initialize CodeQL
100-
uses: github/codeql-action/init@v4
103+
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
101104
with:
102105
languages: ${{ matrix.language }}
103106
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -118,7 +121,7 @@ jobs:
118121
# uses a compiled language
119122

120123
- name: Setup pip cache
121-
uses: actions/cache@v5.0.0
124+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
122125
with:
123126
path: |
124127
~/.cache/pip
@@ -134,10 +137,16 @@ jobs:
134137
env:
135138
CC: ${{ matrix.config.cc }}
136139
CXX: ${{ matrix.config.cxx }}
140+
MESON_OPTS: ${{ matrix.config.meson_opts }}
137141
run: |
138142
pip install meson ninja
139143
$prefix = Join-Path $env:GITHUB_WORKSPACE 'install'
140-
meson setup build --prefix "$prefix" -Dmandir=man -Dbindir=bin ${{ matrix.config.meson_opts }} --buildtype=release
144+
$mesonArgs = @('setup', 'build', '--prefix', $prefix, '-Dmandir=man', '-Dbindir=bin')
145+
if ($env:MESON_OPTS) {
146+
$mesonArgs += ($env:MESON_OPTS -split ' ')
147+
}
148+
$mesonArgs += '--buildtype=release'
149+
meson @mesonArgs
141150
meson install -C build
142151
143152
- name: Install Meson and Ninja and Build (Github runners - non-MSVC)
@@ -146,10 +155,17 @@ jobs:
146155
env:
147156
CC: ${{ matrix.config.cc }}
148157
CXX: ${{ matrix.config.cxx }}
158+
MESON_OPTS: ${{ matrix.config.meson_opts }}
149159
run: |
150160
pip install meson ninja
151-
meson setup build --prefix "$GITHUB_WORKSPACE/install" -Dmandir=man -Dbindir=bin ${{ matrix.config.meson_opts }} --buildtype=release
161+
meson_args=(setup build --prefix "$GITHUB_WORKSPACE/install" -Dmandir=man -Dbindir=bin)
162+
if [[ -n "$MESON_OPTS" ]]; then
163+
read -r -a extra_meson_args <<< "$MESON_OPTS"
164+
meson_args+=("${extra_meson_args[@]}")
165+
fi
166+
meson_args+=(--buildtype=release)
167+
meson "${meson_args[@]}"
152168
meson install -C build
153169
154170
- name: Perform CodeQL Analysis
155-
uses: github/codeql-action/analyze@v4
171+
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
11
# SPDX-License-Identifier: MPL-2.0
22
name: Dependency Review
33

4+
permissions: {}
5+
46
on:
57
pull_request:
68
branches: [ develop ]
79

8-
permissions:
9-
contents: read
10-
pull-requests: write
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
1112

1213
jobs:
1314
dependency-review:
15+
name: Dependency review
1416
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
1519
steps:
1620
- name: Harden Runner
17-
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.14.1
21+
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.14.1
1822
with:
1923
egress-policy: audit
2024

2125
- name: Checkout Repository
22-
uses: actions/checkout@v6.0.2
26+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27+
with:
28+
persist-credentials: false
2329

2430
- name: Dependency Review
25-
uses: actions/dependency-review-action@v4
31+
uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0
2632
with:
2733
fail-on-severity: high
2834
warn-on-openssf-scorecard-level: 3

.github/workflows/flawfinder.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
name: flawfinder
77

8+
permissions: {}
9+
810
on:
911
push:
1012
branches: [ "develop", "master", "release/*" ]
@@ -14,22 +16,27 @@ on:
1416
schedule:
1517
- cron: '39 23 * * 1'
1618

19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.ref }}
21+
1722
jobs:
1823
flawfinder:
1924
name: Flawfinder
2025
runs-on: ubuntu-latest
2126
permissions:
22-
actions: read
27+
actions: read # Allow the workflow to inspect action metadata during analysis.
2328
contents: read
24-
security-events: write
29+
security-events: write # Upload flawfinder SARIF results to code scanning.
2530
steps:
2631
- name: Harden Runner
27-
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.14.1
32+
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.14.1
2833
with:
2934
egress-policy: audit
3035

3136
- name: Checkout code
32-
uses: actions/checkout@v6.0.2
37+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
38+
with:
39+
persist-credentials: false
3340

3441
- name: flawfinder_scan
3542
uses: david-a-wheeler/flawfinder@c57197cd6061453f10a496f30a732bc1905918d1
@@ -38,6 +45,6 @@ jobs:
3845
output: 'flawfinder_results.sarif'
3946

4047
- name: Upload analysis results to GitHub Security tab
41-
uses: github/codeql-action/upload-sarif@v4
48+
uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
4249
with:
4350
sarif_file: ${{github.workspace}}/flawfinder_results.sarif

0 commit comments

Comments
 (0)