Skip to content

Commit d189521

Browse files
committed
Switch codeql from autobuild to custom commands
We have both a C++ protoc plugin and JS code (everything else). Consequently, we need to actually build the protoc plugin so that we can actually do anything worthwile. This change scripts download a prepared protoc release and running through the necessary protobuf-javascript setup actions.
1 parent 16b139b commit d189521

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

.github/workflows/codeql.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,18 @@ jobs:
5252
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
5353
# queries: security-extended,security-and-quality
5454

55-
56-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
57-
# If this step fails, then you should remove it and run the build manually (see below)
58-
- name: Autobuild
59-
uses: github/codeql-action/autobuild@v2
6055

6156
# ℹ️ Command-line programs to run using the OS shell.
6257
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
6358

64-
# If the Autobuild fails above, remove it and uncomment the following three lines.
65-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
66-
67-
# - run: |
68-
# echo "Run, Build Application using script"
69-
# ./location_of_script_within_repo/buildscript.sh
59+
- run: |
60+
echo "Fetch protoc"
61+
curl -L https://github.com/protocolbuffers/protobuf/releases/download/v21.3/protoc-21.3-linux-x86_64.zip --output $GITHUB_WORKSPACE/protoc-release.zip
62+
unzip $GITHUB_WORKSPACE/protoc-release.zip -d $GITHUB_WORKSPACE/protoc-release
63+
echo "Clean, install, and test protobuf-javascript"
64+
npm ci
65+
npm install
66+
PROTOC=$GITHUB_WORKSPACE/protoc-release/bin/protoc PROTOC_INC=$GITHUB_WORKSPACE/protoc-release/include npm test
7067
7168
- name: Perform CodeQL Analysis
7269
uses: github/codeql-action/analyze@v2

0 commit comments

Comments
 (0)