Skip to content

Commit 61605b1

Browse files
eustascopybara-github
authored andcommitted
pick VCPKG patches
PiperOrigin-RevId: 821593009
1 parent 4b0f27b commit 61605b1

File tree

10 files changed

+190
-33
lines changed

10 files changed

+190
-33
lines changed

.github/workflows/build_test.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66
# Workflow for building and running tests under Ubuntu
77

88
name: Build/Test
9+
910
on:
1011
push:
1112
branches:
1213
- master
1314
pull_request:
14-
types: [opened, reopened, labeled, synchronize]
15+
types: [opened, reopened, labeled, unlabeled, synchronize]
16+
17+
permissions:
18+
contents: read
1519

1620
concurrency:
1721
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
@@ -192,6 +196,12 @@ jobs:
192196
CXX: ${{ matrix.cxx_compiler || 'gcc' }}
193197

194198
steps:
199+
200+
- name: Harden Runner
201+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
202+
with:
203+
egress-policy: audit
204+
195205
- name: Install extra deps @ Ubuntu
196206
if: ${{ runner.os == 'Linux' }}
197207
# Already installed: bazel, clang{13-15}, cmake, gcc{9.5-13.1}, java{8,11,17,21}, maven, python{3.10}
@@ -319,6 +329,11 @@ jobs:
319329
image: ubuntu:22.04
320330
steps:
321331

332+
- name: Harden Runner
333+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
334+
with:
335+
egress-policy: audit
336+
322337
- name: Install deps
323338
run: |
324339
apt update
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Copyright 2025 Google Inc. All Rights Reserved.
2+
#
3+
# Distributed under MIT license.
4+
# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5+
6+
# Workflow for building and running tests with WASM
7+
8+
name: Build/Test WASM
9+
10+
on:
11+
push:
12+
branches:
13+
- master
14+
pull_request:
15+
types: [opened, reopened, labeled, unlabeled, synchronize]
16+
17+
permissions:
18+
contents: read
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
22+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
23+
24+
jobs:
25+
build_test_wasm:
26+
name: Build and test with WASM
27+
runs-on: ubuntu-latest
28+
env:
29+
CCACHE_DIR: ${{ github.workspace }}/.ccache
30+
BUILD_TARGET: wasm32
31+
EM_VERSION: 3.1.51
32+
# As of 28.08.2025 ubuntu-latest is 24.04; it is shipped with node 22.18
33+
NODE_VERSION: 22
34+
35+
steps:
36+
37+
- name: Harden Runner
38+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
39+
with:
40+
egress-policy: audit
41+
42+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
43+
with:
44+
submodules: true
45+
fetch-depth: 1
46+
47+
- name: Install node
48+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
49+
with:
50+
node-version: ${{env.NODE_VERSION}}
51+
52+
- name: Get non-EMSDK node path
53+
run: which node >> $HOME/.base_node_path
54+
55+
- name: Install emsdk
56+
uses: mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14
57+
with:
58+
version: ${{env.EM_VERSION}}
59+
no-cache: true
60+
61+
- name: Set EMSDK node version
62+
run: |
63+
echo "NODE_JS='$(cat $HOME/.base_node_path)'" >> $EMSDK/.emscripten
64+
emsdk construct_env
65+
66+
- name: Build
67+
run: |
68+
LDFLAGS=" -s ALLOW_MEMORY_GROWTH=1 -s NODERAWFS=1 " emcmake cmake -B out .
69+
cmake --build out
70+
cd out; ctest --output-on-failure; cd ..

.github/workflows/codeql.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
schedule:
1010
- cron: '18 15 * * 0'
1111

12+
permissions:
13+
contents: read
14+
1215
concurrency:
1316
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
1417
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
@@ -30,6 +33,12 @@ jobs:
3033
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
3134

3235
steps:
36+
37+
- name: Harden Runner
38+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
39+
with:
40+
egress-policy: audit
41+
3342
- name: Checkout repository
3443
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
3544

.github/workflows/fuzz.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
# Workflow for building / running oss-fuzz.
77

88
name: CIFuzz
9+
910
on: [pull_request]
1011

12+
permissions:
13+
contents: read
14+
1115
concurrency:
1216
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
1317
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
@@ -16,17 +20,25 @@ jobs:
1620
Fuzzing:
1721
runs-on: ubuntu-latest
1822
steps:
23+
24+
- name: Harden Runner
25+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
26+
with:
27+
egress-policy: audit
28+
1929
- name: Build Fuzzers
2030
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
2131
with:
2232
oss-fuzz-project-name: 'brotli'
2333
dry-run: false
34+
2435
- name: Run Fuzzers
2536
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
2637
with:
2738
oss-fuzz-project-name: 'brotli'
2839
fuzz-seconds: 600
2940
dry-run: false
41+
3042
- name: Upload Crash
3143
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
3244
if: failure()

.github/workflows/lint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# Copyright 2025 Google Inc. All Rights Reserved.
2+
#
3+
# Distributed under MIT license.
4+
# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5+
6+
# Workflow for checking typos and buildifier, formatting, etc.
7+
18
name: "Lint"
29

310
on:
@@ -8,6 +15,9 @@ on:
815
schedule:
916
- cron: '18 15 * * 0'
1017

18+
permissions:
19+
contents: read
20+
1121
concurrency:
1222
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
1323
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
@@ -18,6 +28,12 @@ jobs:
1828
runs-on: 'ubuntu-latest'
1929

2030
steps:
31+
32+
- name: Harden Runner
33+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
34+
with:
35+
egress-policy: audit
36+
2137
- name: Checkout repository
2238
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
2339

.github/workflows/release.yaml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ on:
1414
release:
1515
types: [ published ]
1616
pull_request:
17-
types: [opened, reopened, labeled, synchronize]
17+
types: [opened, reopened, labeled, unlabeled, synchronize]
18+
19+
permissions:
20+
contents: read
1821

1922
concurrency:
2023
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
@@ -59,6 +62,12 @@ jobs:
5962
VCPKG_DISABLE_METRICS: 1
6063

6164
steps:
65+
66+
- name: Harden Runner
67+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
68+
with:
69+
egress-policy: audit
70+
6271
- name: Checkout the source
6372
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
6473
with:
@@ -100,17 +109,20 @@ jobs:
100109
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake \
101110
-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} \
102111
#
112+
103113
- name: Build
104114
shell: 'bash'
105115
run: |
106116
set -x
107117
cmake --build out --config Release
118+
108119
- name: Install
109120
shell: 'bash'
110121
run: |
111122
set -x
112123
cmake --build out --config Release --target install
113124
cp LICENSE prefix/bin/LICENSE.brotli
125+
114126
- name: Upload artifacts
115127
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
116128
with:
@@ -138,6 +150,11 @@ jobs:
138150
shell: bash
139151
steps:
140152

153+
- name: Harden Runner
154+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
155+
with:
156+
egress-policy: audit
157+
141158
- name: Checkout the source
142159
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
143160
with:
@@ -163,6 +180,11 @@ jobs:
163180
shell: bash
164181
steps:
165182

183+
- name: Harden Runner
184+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
185+
with:
186+
egress-policy: audit
187+
166188
- name: Checkout the source
167189
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
168190
with:

.github/workflows/scorecard.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# policy, and support documentation.
44

55
name: Scorecard supply-chain security
6+
67
on:
78
# For Branch-Protection check. Only the default branch is supported. See
89
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
@@ -14,13 +15,13 @@ on:
1415
push:
1516
branches: [ "master" ]
1617

18+
# Declare default permissions as read only.
19+
permissions: read-all
20+
1721
concurrency:
1822
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
1923
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2024

21-
# Declare default permissions as read only.
22-
permissions: read-all
23-
2425
jobs:
2526
analysis:
2627
name: Scorecard analysis
@@ -35,6 +36,11 @@ jobs:
3536
# actions: read
3637

3738
steps:
39+
- name: Harden Runner
40+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
41+
with:
42+
egress-policy: audit
43+
3844
- name: "Checkout code"
3945
uses: actions/checkout@v4 # v3.1.0
4046
with:

0 commit comments

Comments
 (0)