mirror of
https://github.com/github/codeql-action.git
synced 2025-12-19 13:59:30 +08:00
Compare commits
326 Commits
default-se
...
v2.27.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b62e7a9f1 | ||
|
|
40d36ff397 | ||
|
|
12c8c9183c | ||
|
|
87a237b6ff | ||
|
|
dbe849c3c9 | ||
|
|
cbcd733d4d | ||
|
|
cb6549f910 | ||
|
|
54d4bdd4c4 | ||
|
|
a84895fdd0 | ||
|
|
16771fd891 | ||
|
|
540ace2d9c | ||
|
|
3051ff4078 | ||
|
|
3c5d589711 | ||
|
|
1cfecc1721 | ||
|
|
491232c01a | ||
|
|
bf98ef397c | ||
|
|
b4f6eee803 | ||
|
|
707406f181 | ||
|
|
e96cea3a2e | ||
|
|
a11ff478f4 | ||
|
|
eed040e613 | ||
|
|
ee0d06c300 | ||
|
|
4b2de78b63 | ||
|
|
657bbc8346 | ||
|
|
6a89f57882 | ||
|
|
d053e801ad | ||
|
|
722d7be831 | ||
|
|
02b20c03ad | ||
|
|
a666febdd9 | ||
|
|
2659fbeaef | ||
|
|
083cd45dc7 | ||
|
|
6a42f43c44 | ||
|
|
0b152e09b9 | ||
|
|
146668f870 | ||
|
|
afab321d87 | ||
|
|
e7e89aa4b2 | ||
|
|
4d85deb854 | ||
|
|
57e51c3a28 | ||
|
|
dc5e80c8cc | ||
|
|
2a8e35ea74 | ||
|
|
60fb28c4e7 | ||
|
|
81b5e0e1a2 | ||
|
|
430e27ef20 | ||
|
|
283b59dab3 | ||
|
|
17504f9da9 | ||
|
|
b6a92703ae | ||
|
|
c86416c911 | ||
|
|
f8723f322b | ||
|
|
85b07cf1e1 | ||
|
|
531ce50d39 | ||
|
|
a680341ce5 | ||
|
|
1991d31d08 | ||
|
|
d9d1e68857 | ||
|
|
9b1856ea9f | ||
|
|
d97ba04b39 | ||
|
|
a54d022c15 | ||
|
|
e0927014d2 | ||
|
|
0c7f114ae4 | ||
|
|
9f0e9cc2e5 | ||
|
|
6ea954642e | ||
|
|
422b177bb3 | ||
|
|
51826fb97a | ||
|
|
db0e7bc3d0 | ||
|
|
3f0edd48f8 | ||
|
|
7aaea3327f | ||
|
|
793bff44a5 | ||
|
|
2fe1a3da42 | ||
|
|
8c041afa1f | ||
|
|
81dc191d06 | ||
|
|
3452639dc8 | ||
|
|
9d8d30f5fe | ||
|
|
e8292c7849 | ||
|
|
be8b74c09c | ||
|
|
65b1807594 | ||
|
|
2bcad51735 | ||
|
|
bd8d52d614 | ||
|
|
4deb1ac80b | ||
|
|
2c3520bccc | ||
|
|
e8b34a2aaa | ||
|
|
3c0d130c56 | ||
|
|
df56d3936b | ||
|
|
751600b467 | ||
|
|
4ad2714825 | ||
|
|
025a9940e0 | ||
|
|
89036746af | ||
|
|
4799b0f4d9 | ||
|
|
1de304405b | ||
|
|
e9925c150b | ||
|
|
a5a1c19f3d | ||
|
|
a5b09996a2 | ||
|
|
d65d0c9607 | ||
|
|
0408560f78 | ||
|
|
9a0f1902d8 | ||
|
|
0c65e51f6d | ||
|
|
cd78b0c22d | ||
|
|
4d41234370 | ||
|
|
366883a76d | ||
|
|
b6f3dd5b69 | ||
|
|
ee7156af3a | ||
|
|
79105e57fc | ||
|
|
89893dd326 | ||
|
|
36a8987598 | ||
|
|
404b712ccd | ||
|
|
e36312243c | ||
|
|
24f9e43571 | ||
|
|
88634f4927 | ||
|
|
308547dc25 | ||
|
|
57391aa8d6 | ||
|
|
5973e2313a | ||
|
|
11a4b17771 | ||
|
|
684a773172 | ||
|
|
f1e8960cb4 | ||
|
|
138862ec00 | ||
|
|
0430e6625a | ||
|
|
3e0e84636c | ||
|
|
e24bc47be8 | ||
|
|
fc5bae6a19 | ||
|
|
a8428cd9ea | ||
|
|
87819cead8 | ||
|
|
9a5f54856d | ||
|
|
e549eca490 | ||
|
|
20f361b0e9 | ||
|
|
12c986850b | ||
|
|
befbb8b4a5 | ||
|
|
461cce50d3 | ||
|
|
7e72016db9 | ||
|
|
7c2a1b9bb7 | ||
|
|
563dcafdfe | ||
|
|
4bcff1af46 | ||
|
|
bc172e1162 | ||
|
|
6abdf6c312 | ||
|
|
57d4608536 | ||
|
|
700bccb48b | ||
|
|
e113c555ef | ||
|
|
ed554bd623 | ||
|
|
3fd960a2d2 | ||
|
|
5767038bb9 | ||
|
|
f9d5614349 | ||
|
|
9029d5d6a6 | ||
|
|
d958b976dc | ||
|
|
7482df244c | ||
|
|
2cefb791de | ||
|
|
703bc820da | ||
|
|
250eb55355 | ||
|
|
5f2fdb88c3 | ||
|
|
a073c66b2a | ||
|
|
691ac2e494 | ||
|
|
d6233df2fd | ||
|
|
a78cac18f0 | ||
|
|
46c2e16272 | ||
|
|
3998c927e6 | ||
|
|
b9bbe2d606 | ||
|
|
e4f82d6949 | ||
|
|
be63ca505c | ||
|
|
69a0a4689a | ||
|
|
f9848b399e | ||
|
|
d37d7829f6 | ||
|
|
6ac9fc7e8e | ||
|
|
4103cca585 | ||
|
|
52d291229a | ||
|
|
23e160363e | ||
|
|
8308092ba6 | ||
|
|
4a7314f4b5 | ||
|
|
366cd98114 | ||
|
|
8d9b4c6dc8 | ||
|
|
eee8c708a0 | ||
|
|
fd8b26e79b | ||
|
|
fd90298f66 | ||
|
|
28cc49a08b | ||
|
|
162eb1e32a | ||
|
|
a1a97f41b2 | ||
|
|
ab186bb61a | ||
|
|
ff8133afe9 | ||
|
|
ac7c76bfc7 | ||
|
|
d429afad01 | ||
|
|
d05fceb045 | ||
|
|
78d13343a2 | ||
|
|
a953717405 | ||
|
|
b5e604ae77 | ||
|
|
ceb635d11f | ||
|
|
34710081e2 | ||
|
|
4f0ceda83a | ||
|
|
654d389318 | ||
|
|
685e64b1e3 | ||
|
|
02619f4624 | ||
|
|
8e81fd40bf | ||
|
|
52e98c0622 | ||
|
|
ceaec5c11a | ||
|
|
39f10b5b8a | ||
|
|
64ccee938f | ||
|
|
e76c3643d1 | ||
|
|
caa31633f2 | ||
|
|
04aff1f5fa | ||
|
|
9ace329d8c | ||
|
|
b849f33370 | ||
|
|
42cbd34070 | ||
|
|
9762ef1fad | ||
|
|
5122fa879d | ||
|
|
c3aa7b8d0d | ||
|
|
e949a1676c | ||
|
|
948c1ebff4 | ||
|
|
e4b5f9d015 | ||
|
|
8aad228360 | ||
|
|
c992dad089 | ||
|
|
06c30cc68c | ||
|
|
f72882a05b | ||
|
|
b9d792527d | ||
|
|
12bc863d11 | ||
|
|
ba352fa8e7 | ||
|
|
d95215f691 | ||
|
|
553a89d488 | ||
|
|
ffd3158cb9 | ||
|
|
82478fb458 | ||
|
|
2a96432c79 | ||
|
|
93075ceec3 | ||
|
|
a023017ea9 | ||
|
|
794eacf375 | ||
|
|
a1559aa4a9 | ||
|
|
a82bad7182 | ||
|
|
61ddd48e03 | ||
|
|
abca38cf8c | ||
|
|
763babe7ac | ||
|
|
72d46cb780 | ||
|
|
0b21c947c0 | ||
|
|
c2dc67199a | ||
|
|
f018a9586e | ||
|
|
6007966519 | ||
|
|
efed72eb8f | ||
|
|
bcca54f232 | ||
|
|
76d48637f2 | ||
|
|
4821ae1424 | ||
|
|
e56cfd0877 | ||
|
|
6046c633c7 | ||
|
|
ed2b6b741f | ||
|
|
570dc010e8 | ||
|
|
1a8046c7f3 | ||
|
|
8c395e0c45 | ||
|
|
de22b302a6 | ||
|
|
928ff8c822 | ||
|
|
2f52385615 | ||
|
|
272cd56763 | ||
|
|
3839e215cc | ||
|
|
61f4d893e6 | ||
|
|
30ad6c3d9e | ||
|
|
78df51c1cc | ||
|
|
045d9f3939 | ||
|
|
a3c8eb3ab0 | ||
|
|
6078595fdf | ||
|
|
395cdfe20c | ||
|
|
a56a03b370 | ||
|
|
05053827ef | ||
|
|
fa5685c7f0 | ||
|
|
8c3591c19a | ||
|
|
557a8d2306 | ||
|
|
7351df07bb | ||
|
|
d15fdd879b | ||
|
|
80eb8d5395 | ||
|
|
0ddabac401 | ||
|
|
b882b63a68 | ||
|
|
8b0f3e6135 | ||
|
|
8601b9e70a | ||
|
|
bd94b4c175 | ||
|
|
755340a6bd | ||
|
|
4a8f20f6b9 | ||
|
|
460939e7d8 | ||
|
|
ceebdeb9fa | ||
|
|
47c8d615ed | ||
|
|
c232c5de9c | ||
|
|
2452b7d8af | ||
|
|
4ffed09d48 | ||
|
|
8b6a45a6ec | ||
|
|
2ccdcd5135 | ||
|
|
4f50fb3be5 | ||
|
|
02022337ac | ||
|
|
3dafabe4d9 | ||
|
|
40cd785140 | ||
|
|
10746dd61e | ||
|
|
1a077f8f6c | ||
|
|
05d809f630 | ||
|
|
d8c4c3a4eb | ||
|
|
b301568384 | ||
|
|
f5c8be0ac1 | ||
|
|
4504810aa1 | ||
|
|
dc021d495c | ||
|
|
f822fa3067 | ||
|
|
3ed798ed18 | ||
|
|
5b498ba405 | ||
|
|
7dde705407 | ||
|
|
c004a3e831 | ||
|
|
2f93e4319b | ||
|
|
c98f2c953c | ||
|
|
554c990fe8 | ||
|
|
abe5934e80 | ||
|
|
8879ae88d9 | ||
|
|
01e8d7f881 | ||
|
|
4759df8df7 | ||
|
|
554005d264 | ||
|
|
fb29452d38 | ||
|
|
13884cb7d7 | ||
|
|
ac64986f93 | ||
|
|
cdcacf8b4f | ||
|
|
8b7fcbfac2 | ||
|
|
e24bd8fed4 | ||
|
|
8f2682add5 | ||
|
|
8f5ae1a11a | ||
|
|
99d337aef5 | ||
|
|
997d889b5d | ||
|
|
1500a13138 | ||
|
|
0d318c9f1a | ||
|
|
d6286c6fdb | ||
|
|
9c74de20cb | ||
|
|
49a6ae4966 | ||
|
|
3366e3bbdd | ||
|
|
844fc3cd56 | ||
|
|
5a201efe22 | ||
|
|
c9f92aa25f | ||
|
|
03e7845b7b | ||
|
|
54f10077ea | ||
|
|
20d1a9b175 | ||
|
|
c28d79bb2e | ||
|
|
241e8b42b2 | ||
|
|
8bc67d15e2 | ||
|
|
e106171cbb | ||
|
|
231f9f1b59 | ||
|
|
47334bf4e9 | ||
|
|
e763762131 |
@@ -61,12 +61,11 @@ runs:
|
|||||||
- name: Check config
|
- name: Check config
|
||||||
working-directory: ${{ github.action_path }}
|
working-directory: ${{ github.action_path }}
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
run: ts-node ./index.ts "${{ runner.temp }}/user-config.yaml" '${{ inputs.expected-config-file-contents }}'
|
||||||
EXPECTED_CONFIG_FILE_CONTENTS: '${{ inputs.expected-config-file-contents }}'
|
|
||||||
run: ts-node ./index.ts "$RUNNER_TEMP/user-config.yaml" "$EXPECTED_CONFIG_FILE_CONTENTS"
|
|
||||||
- name: Clean up
|
- name: Clean up
|
||||||
shell: bash
|
shell: bash
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
rm -rf $RUNNER_TEMP/codescanning-config-cli-test
|
rm -rf ${{ runner.temp }}/codescanning-config-cli-test
|
||||||
rm -rf $RUNNER_TEMP/user-config.yaml
|
rm -rf ${{ runner.temp }}/user-config.yaml
|
||||||
|
|||||||
@@ -6,19 +6,9 @@ import * as assert from 'assert'
|
|||||||
|
|
||||||
const actualConfig = loadActualConfig()
|
const actualConfig = loadActualConfig()
|
||||||
|
|
||||||
function sortConfigArrays(config) {
|
|
||||||
for (const key of Object.keys(config)) {
|
|
||||||
const value = config[key];
|
|
||||||
if (key === 'queries' && Array.isArray(value)) {
|
|
||||||
config[key] = value.sort();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return config;
|
|
||||||
}
|
|
||||||
|
|
||||||
const rawExpectedConfig = process.argv[3].trim()
|
const rawExpectedConfig = process.argv[3].trim()
|
||||||
if (!rawExpectedConfig) {
|
if (!rawExpectedConfig) {
|
||||||
core.setFailed('No expected configuration provided')
|
core.info('No expected configuration provided')
|
||||||
} else {
|
} else {
|
||||||
core.startGroup('Expected generated user config')
|
core.startGroup('Expected generated user config')
|
||||||
core.info(yaml.dump(JSON.parse(rawExpectedConfig)))
|
core.info(yaml.dump(JSON.parse(rawExpectedConfig)))
|
||||||
@@ -28,8 +18,8 @@ if (!rawExpectedConfig) {
|
|||||||
const expectedConfig = rawExpectedConfig ? JSON.parse(rawExpectedConfig) : undefined;
|
const expectedConfig = rawExpectedConfig ? JSON.parse(rawExpectedConfig) : undefined;
|
||||||
|
|
||||||
assert.deepStrictEqual(
|
assert.deepStrictEqual(
|
||||||
sortConfigArrays(actualConfig),
|
actualConfig,
|
||||||
sortConfigArrays(expectedConfig),
|
expectedConfig,
|
||||||
'Expected configuration does not match actual configuration'
|
'Expected configuration does not match actual configuration'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
2
.github/actions/check-sarif/action.yml
vendored
2
.github/actions/check-sarif/action.yml
vendored
@@ -16,5 +16,5 @@ inputs:
|
|||||||
Comma separated list of query ids that should NOT be included in this SARIF file.
|
Comma separated list of query ids that should NOT be included in this SARIF file.
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: node24
|
using: node16
|
||||||
main: index.js
|
main: index.js
|
||||||
|
|||||||
@@ -1,80 +0,0 @@
|
|||||||
name: "Prepare mergeback branch"
|
|
||||||
description: Prepares a mergeback branch and opens a PR for it
|
|
||||||
inputs:
|
|
||||||
base:
|
|
||||||
description: "The name of the base branch"
|
|
||||||
required: true
|
|
||||||
head:
|
|
||||||
description: "The name of the head branch"
|
|
||||||
required: true
|
|
||||||
branch:
|
|
||||||
description: "The name of the branch to create."
|
|
||||||
required: true
|
|
||||||
version:
|
|
||||||
description: "The new version"
|
|
||||||
required: true
|
|
||||||
token:
|
|
||||||
description: "The token to use"
|
|
||||||
required: true
|
|
||||||
dry-run:
|
|
||||||
description: "Set to true to skip creating the PR. The branch will still be pushed."
|
|
||||||
default: "false"
|
|
||||||
runs:
|
|
||||||
using: composite
|
|
||||||
steps:
|
|
||||||
- name: Create mergeback branch
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
VERSION: "${{ inputs.version }}"
|
|
||||||
NEW_BRANCH: "${{ inputs.branch }}"
|
|
||||||
run: |
|
|
||||||
set -exu
|
|
||||||
|
|
||||||
# Ensure we are on the new branch
|
|
||||||
git checkout "${NEW_BRANCH}"
|
|
||||||
|
|
||||||
# Update the version number ready for the next release
|
|
||||||
npm version patch --no-git-tag-version
|
|
||||||
|
|
||||||
# Update the changelog, adding a new version heading directly above the most recent existing one
|
|
||||||
awk '!f && /##/{print "'"## [UNRELEASED]\n\nNo user facing changes.\n"'"; f=1}1' CHANGELOG.md > temp && mv temp CHANGELOG.md
|
|
||||||
git add .
|
|
||||||
git commit -m "Update changelog and version after ${VERSION}"
|
|
||||||
|
|
||||||
git push origin "${NEW_BRANCH}"
|
|
||||||
|
|
||||||
- name: Create PR
|
|
||||||
shell: bash
|
|
||||||
if: inputs.dry-run != 'true'
|
|
||||||
env:
|
|
||||||
VERSION: "${{ inputs.version }}"
|
|
||||||
BASE_BRANCH: "${{ inputs.base }}"
|
|
||||||
HEAD_BRANCH: "${{ inputs.head }}"
|
|
||||||
NEW_BRANCH: "${{ inputs.branch }}"
|
|
||||||
GITHUB_TOKEN: "${{ inputs.token }}"
|
|
||||||
run: |
|
|
||||||
set -exu
|
|
||||||
pr_title="Mergeback ${VERSION} ${HEAD_BRANCH} into ${BASE_BRANCH}"
|
|
||||||
pr_body=$(cat << EOF
|
|
||||||
This PR bumps the version number and updates the changelog after the ${VERSION} release.
|
|
||||||
|
|
||||||
Please do the following:
|
|
||||||
|
|
||||||
- [ ] Remove and re-add the "Rebuild" label to the PR to trigger just this workflow.
|
|
||||||
- [ ] Wait for the "Rebuild" workflow to push a commit updating the distribution files.
|
|
||||||
- [ ] Mark the PR as ready for review to trigger the full set of PR checks.
|
|
||||||
- [ ] Approve and merge the PR. When merging the PR, make sure "Create a merge commit" is
|
|
||||||
selected rather than "Squash and merge" or "Rebase and merge".
|
|
||||||
EOF
|
|
||||||
)
|
|
||||||
|
|
||||||
# PR checks won't be triggered on PRs created by Actions. Therefore mark the PR as draft
|
|
||||||
# so that a maintainer can take the PR out of draft, thereby triggering the PR checks.
|
|
||||||
gh pr create \
|
|
||||||
--head "${NEW_BRANCH}" \
|
|
||||||
--base "${BASE_BRANCH}" \
|
|
||||||
--title "${pr_title}" \
|
|
||||||
--label "Rebuild" \
|
|
||||||
--body "${pr_body}" \
|
|
||||||
--assignee "${GITHUB_ACTOR}" \
|
|
||||||
--draft
|
|
||||||
42
.github/actions/prepare-test/action.yml
vendored
42
.github/actions/prepare-test/action.yml
vendored
@@ -2,7 +2,7 @@ name: "Prepare test"
|
|||||||
description: Performs some preparation to run tests
|
description: Performs some preparation to run tests
|
||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
description: "The version of the CodeQL CLI to use. Can be 'linked', 'default', 'toolcache', 'nightly', 'nightly-latest', 'nightly-YYYYMMDD', or 'stable-vX.Y.Z"
|
description: "The version of the CodeQL CLI to use. Can be 'linked', 'default', 'nightly-latest', 'nightly-YYYYMMDD', or 'stable-vX.Y.Z"
|
||||||
required: true
|
required: true
|
||||||
use-all-platform-bundle:
|
use-all-platform-bundle:
|
||||||
description: "If true, we output a tools URL with codeql-bundle.tar.gz file rather than platform-specific URL"
|
description: "If true, we output a tools URL with codeql-bundle.tar.gz file rather than platform-specific URL"
|
||||||
@@ -29,44 +29,44 @@ runs:
|
|||||||
- id: get-url
|
- id: get-url
|
||||||
name: Determine URL
|
name: Determine URL
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
|
||||||
VERSION: ${{ inputs.version }}
|
|
||||||
USE_ALL_PLATFORM_BUNDLE: ${{ inputs.use-all-platform-bundle }}
|
|
||||||
run: |
|
run: |
|
||||||
set -e # Fail this Action if `gh release list` fails.
|
set -e # Fail this Action if `gh release list` fails.
|
||||||
|
|
||||||
if [[ "$VERSION" == "nightly" || "$VERSION" == "nightly-latest" ]]; then
|
if [[ ${{ inputs.version }} == "linked" ]]; then
|
||||||
echo "tools-url=nightly" >> "$GITHUB_OUTPUT"
|
|
||||||
exit 0
|
|
||||||
elif [[ "$VERSION" == "linked" ]]; then
|
|
||||||
echo "tools-url=linked" >> "$GITHUB_OUTPUT"
|
echo "tools-url=linked" >> "$GITHUB_OUTPUT"
|
||||||
exit 0
|
exit 0
|
||||||
elif [[ "$VERSION" == "toolcache" ]]; then
|
elif [[ ${{ inputs.version }} == "default" ]]; then
|
||||||
echo "tools-url=toolcache" >> "$GITHUB_OUTPUT"
|
|
||||||
exit 0
|
|
||||||
elif [[ "$VERSION" == "default" ]]; then
|
|
||||||
echo "tools-url=" >> "$GITHUB_OUTPUT"
|
echo "tools-url=" >> "$GITHUB_OUTPUT"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$USE_ALL_PLATFORM_BUNDLE" == "true" ]]; then
|
if [[ ${{ inputs.version }} == "nightly-latest" && "$RUNNER_OS" != "Windows" ]]; then
|
||||||
artifact_name="codeql-bundle.tar.gz"
|
extension="tar.zst"
|
||||||
|
else
|
||||||
|
extension="tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${{ inputs.use-all-platform-bundle }} == "true" ]]; then
|
||||||
|
artifact_name="codeql-bundle.$extension"
|
||||||
elif [[ "$RUNNER_OS" == "Linux" ]]; then
|
elif [[ "$RUNNER_OS" == "Linux" ]]; then
|
||||||
artifact_name="codeql-bundle-linux64.tar.gz"
|
artifact_name="codeql-bundle-linux64.$extension"
|
||||||
elif [[ "$RUNNER_OS" == "macOS" ]]; then
|
elif [[ "$RUNNER_OS" == "macOS" ]]; then
|
||||||
artifact_name="codeql-bundle-osx64.tar.gz"
|
artifact_name="codeql-bundle-osx64.$extension"
|
||||||
elif [[ "$RUNNER_OS" == "Windows" ]]; then
|
elif [[ "$RUNNER_OS" == "Windows" ]]; then
|
||||||
artifact_name="codeql-bundle-win64.tar.gz"
|
artifact_name="codeql-bundle-win64.$extension"
|
||||||
else
|
else
|
||||||
echo "::error::Unrecognized OS $RUNNER_OS"
|
echo "::error::Unrecognized OS $RUNNER_OS"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$VERSION" == *"nightly"* ]]; then
|
if [[ ${{ inputs.version }} == "nightly-latest" ]]; then
|
||||||
version=`echo "$VERSION" | sed -e 's/^.*\-//'`
|
tag=`gh release list --repo dsp-testing/codeql-cli-nightlies -L 1 | cut -f 3`
|
||||||
|
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$tag/$artifact_name" >> $GITHUB_OUTPUT
|
||||||
|
elif [[ ${{ inputs.version }} == *"nightly"* ]]; then
|
||||||
|
version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
|
||||||
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
|
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
|
||||||
elif [[ "$VERSION" == *"stable"* ]]; then
|
elif [[ ${{ inputs.version }} == *"stable"* ]]; then
|
||||||
version=`echo "$VERSION" | sed -e 's/^.*\-//'`
|
version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
|
||||||
echo "tools-url=https://github.com/github/codeql-action/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
|
echo "tools-url=https://github.com/github/codeql-action/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "::error::Unrecognized version specified!"
|
echo "::error::Unrecognized version specified!"
|
||||||
|
|||||||
7
.github/actions/release-branches/action.yml
vendored
7
.github/actions/release-branches/action.yml
vendored
@@ -18,11 +18,8 @@ runs:
|
|||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- id: branches
|
- id: branches
|
||||||
env:
|
|
||||||
MAJOR_VERSION: ${{ inputs.major_version }}
|
|
||||||
LATEST_TAG: ${{ inputs.latest_tag }}
|
|
||||||
run: |
|
run: |
|
||||||
python ${{ github.action_path }}/release-branches.py \
|
python ${{ github.action_path }}/release-branches.py \
|
||||||
--major-version "$MAJOR_VERSION" \
|
--major-version ${{ inputs.major_version }} \
|
||||||
--latest-tag "$LATEST_TAG"
|
--latest-tag ${{ inputs.latest_tag }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
python-version: 3.12
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
39
.github/actions/setup-swift/action.yml
vendored
Normal file
39
.github/actions/setup-swift/action.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
name: "Set up Swift on Linux"
|
||||||
|
description: Sets up an appropriate Swift version on Linux.
|
||||||
|
inputs:
|
||||||
|
codeql-path:
|
||||||
|
description: Path to the CodeQL CLI executable.
|
||||||
|
required: true
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Get Swift version
|
||||||
|
id: get_swift_version
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
CODEQL_PATH: ${{ inputs.codeql-path }}
|
||||||
|
run: |
|
||||||
|
SWIFT_EXTRACTOR_DIR="$("$CODEQL_PATH" resolve languages --format json | jq -r '.swift[0]')"
|
||||||
|
if [ $SWIFT_EXTRACTOR_DIR = "null" ]; then
|
||||||
|
VERSION="null"
|
||||||
|
else
|
||||||
|
VERSION="$("$SWIFT_EXTRACTOR_DIR/tools/linux64/extractor" --version | awk '/version/ { print $3 }')"
|
||||||
|
# Specify 5.x.0, otherwise setup Action will default to latest minor version.
|
||||||
|
if [ $VERSION = "5.7" ]; then
|
||||||
|
VERSION="5.7.0"
|
||||||
|
elif [ $VERSION = "5.8" ]; then
|
||||||
|
VERSION="5.8.0"
|
||||||
|
elif [ $VERSION = "5.9" ]; then
|
||||||
|
VERSION="5.9.0"
|
||||||
|
# setup-swift does not yet support v5.9.1 Remove this when it does.
|
||||||
|
elif [ $VERSION = "5.9.1" ]; then
|
||||||
|
VERSION="5.9.0"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "version=$VERSION" | tee -a $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- uses: redsun82/setup-swift@362f49f31da2f5f4f851657046bdd1290d03edc8 # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test.
|
||||||
|
if: runner.os == 'Linux' && steps.get_swift_version.outputs.version != 'null'
|
||||||
|
with:
|
||||||
|
swift-version: "${{ steps.get_swift_version.outputs.version }}"
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
name: Verify that the best-effort debug artifact scan completed
|
|
||||||
description: Verifies that the best-effort debug artifact scan completed successfully during tests
|
|
||||||
runs:
|
|
||||||
using: node24
|
|
||||||
main: index.js
|
|
||||||
post: post.js
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
// The main step is a no-op, since we can only verify artifact scan completion in the post step.
|
|
||||||
console.log("Will verify artifact scan completion in the post step.");
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
// Post step - runs after the workflow completes, when artifact scan has finished
|
|
||||||
const process = require("process");
|
|
||||||
|
|
||||||
const scanFinished = process.env.CODEQL_ACTION_ARTIFACT_SCAN_FINISHED;
|
|
||||||
|
|
||||||
if (scanFinished !== "true") {
|
|
||||||
console.error("Error: Best-effort artifact scan did not complete. Expected CODEQL_ACTION_ARTIFACT_SCAN_FINISHED=true");
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log("✓ Best-effort artifact scan completed successfully");
|
|
||||||
15
.github/codeql/codeql-config-javascript.yml
vendored
15
.github/codeql/codeql-config-javascript.yml
vendored
@@ -1,15 +0,0 @@
|
|||||||
name: "CodeQL config"
|
|
||||||
queries:
|
|
||||||
- name: Run custom queries
|
|
||||||
uses: ./queries
|
|
||||||
# Run all extra query suites, both because we want to
|
|
||||||
# and because it'll act as extra testing. This is why
|
|
||||||
# we include both even though one is a superset of the
|
|
||||||
# other, because we're testing the parsing logic and
|
|
||||||
# that the suites exist in the codeql bundle.
|
|
||||||
- uses: security-and-quality
|
|
||||||
- uses: security-experimental
|
|
||||||
- uses: security-extended
|
|
||||||
paths-ignore:
|
|
||||||
- lib
|
|
||||||
- tests
|
|
||||||
15
.github/codeql/codeql-config.yml
vendored
Normal file
15
.github/codeql/codeql-config.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
name: "CodeQL config"
|
||||||
|
queries:
|
||||||
|
- name: Run custom queries
|
||||||
|
uses: ./queries
|
||||||
|
# Run all extra query suites, both because we want to
|
||||||
|
# and because it'll act as extra testing. This is why
|
||||||
|
# we include both even though one is a superset of the
|
||||||
|
# other, because we're testing the parsing logic and
|
||||||
|
# that the suites exist in the codeql bundle.
|
||||||
|
- uses: security-experimental
|
||||||
|
- uses: security-extended
|
||||||
|
- uses: security-and-quality
|
||||||
|
paths-ignore:
|
||||||
|
- tests
|
||||||
|
- lib
|
||||||
21
.github/copilot-instructions.md
vendored
21
.github/copilot-instructions.md
vendored
@@ -1,21 +0,0 @@
|
|||||||
# CodeQL Action - Copilot Instructions
|
|
||||||
|
|
||||||
## Generated code
|
|
||||||
|
|
||||||
The CodeQL Action is written in TypeScript and compiled to JavaScript. Both the TypeScript sources and the **generated** JavaScript code are contained in this repository. The TypeScript sources are contained in the `src` directory and the JavaScript code is contained in the `lib` directory. A GitHub Actions workflow checks that the JavaScript code in `lib` is up-to-date. Therefore, you should not review any changes to the contents of the `lib` folder and it is expected that the JavaScript code in `lib` closely mirrors the TypeScript code it is generated from.
|
|
||||||
|
|
||||||
GitHub Actions workflows in the `.github/workflows` directory whose filenames start with two underscores (e.g. `__all-platform-bundle.yml`) are automatically generated using the `pr-checks/sync.sh` script from template files in the `pr-checks/checks` directory. Therefore, you do not need to review files in the `.github/workflows` directory that start with two underscores. However, you should review changes to the `pr-checks` directory as well as workflows in the `.github/workflows` directory that do not start with underscores.
|
|
||||||
|
|
||||||
## Release process
|
|
||||||
|
|
||||||
- A release-PR is a PR which matches all of the following patterns:
|
|
||||||
- PR title starts with the exact prefix: `Merge main into releases/v`
|
|
||||||
- Equivalent regex: `^Merge main into releases\/v`
|
|
||||||
- AND head (source) branch matches the update-branch pattern:
|
|
||||||
- Regex: `^update-v[0-9]+(?:\.[0-9]+)*(?:-[a-f0-9]+)?` (e.g. `update-v3.29.9-cc722e476`)
|
|
||||||
- AND base (target) branch matches a release branch:
|
|
||||||
- Regex: `^releases\/v` (e.g. `releases/v3`)
|
|
||||||
|
|
||||||
- Consider all files in release-PRs to have already been reviewed and do not review them, except for the following two files:
|
|
||||||
- `CHANGELOG.md`
|
|
||||||
- `package.json`
|
|
||||||
35
.github/dependabot.yml
vendored
35
.github/dependabot.yml
vendored
@@ -2,38 +2,45 @@ version: 2
|
|||||||
updates:
|
updates:
|
||||||
- package-ecosystem: npm
|
- package-ecosystem: npm
|
||||||
directory: "/"
|
directory: "/"
|
||||||
|
reviewers:
|
||||||
|
- "github/codeql-production-shield"
|
||||||
schedule:
|
schedule:
|
||||||
interval: weekly
|
interval: weekly
|
||||||
labels:
|
labels:
|
||||||
- Rebuild
|
- Update dependencies
|
||||||
# Ignore incompatible dependency updates
|
# Ignore incompatible dependency updates
|
||||||
ignore:
|
ignore:
|
||||||
# There is a type incompatibility issue between v0.0.9 and our other dependencies.
|
# There is a type incompatibility issue between v0.0.9 and our other dependencies.
|
||||||
- dependency-name: "@octokit/plugin-retry"
|
- dependency-name: "@octokit/plugin-retry"
|
||||||
versions: ["~6.0.0"]
|
versions: ["~6.0.0"]
|
||||||
|
# v7 requires ESM
|
||||||
|
- dependency-name: "del"
|
||||||
|
versions: ["^7.0.0"]
|
||||||
# This is broken due to the way configuration files have changed.
|
# This is broken due to the way configuration files have changed.
|
||||||
# This might be fixed when we move to eslint v9.
|
# This might be fixed when we move to eslint v9.
|
||||||
- dependency-name: "eslint-plugin-import"
|
- dependency-name: "eslint-plugin-import"
|
||||||
versions: [">=2.30.0"]
|
versions: [">=2.30.0"]
|
||||||
groups:
|
groups:
|
||||||
npm-minor:
|
npm:
|
||||||
patterns:
|
patterns:
|
||||||
- "*"
|
- "*"
|
||||||
update-types:
|
|
||||||
- "minor"
|
|
||||||
- "patch"
|
|
||||||
- package-ecosystem: github-actions
|
- package-ecosystem: github-actions
|
||||||
directories:
|
directory: "/"
|
||||||
- "/.github/workflows"
|
reviewers:
|
||||||
- "/.github/actions"
|
- "github/codeql-production-shield"
|
||||||
schedule:
|
schedule:
|
||||||
interval: weekly
|
interval: weekly
|
||||||
labels:
|
|
||||||
- Rebuild
|
|
||||||
groups:
|
groups:
|
||||||
actions-minor:
|
actions:
|
||||||
|
patterns:
|
||||||
|
- "*"
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: "/.github/actions/setup-swift/" # All subdirectories outside of "/.github/workflows" must be explicitly included.
|
||||||
|
reviewers:
|
||||||
|
- "github/codeql-production-shield"
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
groups:
|
||||||
|
actions-setup-swift:
|
||||||
patterns:
|
patterns:
|
||||||
- "*"
|
- "*"
|
||||||
update-types:
|
|
||||||
- "minor"
|
|
||||||
- "patch"
|
|
||||||
|
|||||||
82
.github/pull_request_template.md
vendored
82
.github/pull_request_template.md
vendored
@@ -1,81 +1,5 @@
|
|||||||
<!--
|
|
||||||
For GitHub staff: Remember that this is a public repository. Do not link to internal resources.
|
|
||||||
If necessary, link to this PR from an internal issue and include further details there.
|
|
||||||
|
|
||||||
Everyone: Include a summary of the context of this change, what it aims to accomplish, and why you
|
|
||||||
chose the approach you did if applicable. Indicate any open questions you want to answer
|
|
||||||
during the review process and anything you want reviewers to pay particular attention to.
|
|
||||||
|
|
||||||
See https://github.com/github/codeql-action/blob/main/CONTRIBUTING.md for additional information.
|
|
||||||
-->
|
|
||||||
|
|
||||||
### Risk assessment
|
|
||||||
|
|
||||||
For internal use only. Please select the risk level of this change:
|
|
||||||
|
|
||||||
- **Low risk:** Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.
|
|
||||||
- **High risk:** Changes are not fully under feature flags, have limited visibility and/or cannot be tested outside of production.
|
|
||||||
|
|
||||||
#### Which use cases does this change impact?
|
|
||||||
|
|
||||||
<!-- Delete options that don't apply. If in doubt, do not delete an option. -->
|
|
||||||
|
|
||||||
Workflow types:
|
|
||||||
|
|
||||||
- **Advanced setup** - Impacts users who have custom CodeQL workflows.
|
|
||||||
- **Managed** - Impacts users with `dynamic` workflows (Default Setup, CCR, ...).
|
|
||||||
|
|
||||||
Products:
|
|
||||||
|
|
||||||
- **Code Scanning** - The changes impact analyses when `analysis-kinds: code-scanning`.
|
|
||||||
- **Code Quality** - The changes impact analyses when `analysis-kinds: code-quality`.
|
|
||||||
- **CCR** - The changes impact analyses for Copilot Code Reviews.
|
|
||||||
- **Third-party analyses** - The changes affect the `upload-sarif` action.
|
|
||||||
|
|
||||||
Environments:
|
|
||||||
|
|
||||||
- **Dotcom** - Impacts CodeQL workflows on `github.com` and/or GitHub Enterprise Cloud with Data Residency.
|
|
||||||
- **GHES** - Impacts CodeQL workflows on GitHub Enterprise Server.
|
|
||||||
- **Testing/None** - This change does not impact any CodeQL workflows in production.
|
|
||||||
|
|
||||||
#### How did/will you validate this change?
|
|
||||||
|
|
||||||
<!-- Delete options that don't apply. -->
|
|
||||||
|
|
||||||
- **Test repository** - This change will be tested on a test repository before merging.
|
|
||||||
- **Unit tests** - I am depending on unit test coverage (i.e. tests in `.test.ts` files).
|
|
||||||
- **End-to-end tests** - I am depending on PR checks (i.e. tests in `pr-checks`).
|
|
||||||
- **Other** - Please provide details.
|
|
||||||
- **None** - I am not validating these changes.
|
|
||||||
|
|
||||||
#### If something goes wrong after this change is released, what are the mitigation and rollback strategies?
|
|
||||||
|
|
||||||
<!-- Delete strategies that don't apply. -->
|
|
||||||
|
|
||||||
- **Feature flags** - All new or changed code paths can be fully disabled with corresponding feature flags.
|
|
||||||
- **Rollback** - Change can only be disabled by rolling back the release or releasing a new version with a fix.
|
|
||||||
- **Other** - Please provide details.
|
|
||||||
|
|
||||||
#### How will you know if something goes wrong after this change is released?
|
|
||||||
|
|
||||||
<!-- Delete options that don't apply. -->
|
|
||||||
|
|
||||||
- **Telemetry** - I rely on existing telemetry or have made changes to the telemetry.
|
|
||||||
- **Dashboards** - I will watch relevant dashboards for issues after the release. Consider whether this requires this change to be released at a particular time rather than as part of a regular release.
|
|
||||||
- **Alerts** - New or existing monitors will trip if something goes wrong with this change.
|
|
||||||
- **Other** - Please provide details.
|
|
||||||
|
|
||||||
#### Are there any special considerations for merging or releasing this change?
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Consider whether this change depends on a different change in another repository that should be released first.
|
|
||||||
-->
|
|
||||||
|
|
||||||
- **No special considerations** - This change can be merged at any time.
|
|
||||||
- **Special considerations** - This change should only be merged once certain preconditions are met. Please provide details of those or link to this PR from an internal issue.
|
|
||||||
|
|
||||||
### Merge / deployment checklist
|
### Merge / deployment checklist
|
||||||
|
|
||||||
- Confirm this change is backwards compatible with existing workflows.
|
- [ ] Confirm this change is backwards compatible with existing workflows.
|
||||||
- Consider adding a [changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) entry for this change.
|
- [ ] Confirm the [readme](https://github.com/github/codeql-action/blob/main/README.md) has been updated if necessary.
|
||||||
- Confirm the [readme](https://github.com/github/codeql-action/blob/main/README.md) and docs have been updated if necessary.
|
- [ ] Confirm the [changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) has been updated if necessary.
|
||||||
|
|||||||
2
.github/releases.ini
vendored
2
.github/releases.ini
vendored
@@ -1 +1 @@
|
|||||||
OLDEST_SUPPORTED_MAJOR_VERSION=3
|
OLDEST_SUPPORTED_MAJOR_VERSION=2
|
||||||
|
|||||||
55
.github/sizeup.yml
vendored
55
.github/sizeup.yml
vendored
@@ -1,55 +0,0 @@
|
|||||||
labeling:
|
|
||||||
applyCategoryLabels: true
|
|
||||||
categoryLabelPrefix: "size/"
|
|
||||||
|
|
||||||
commenting:
|
|
||||||
addCommentWhenScoreThresholdHasBeenExceeded: false
|
|
||||||
|
|
||||||
sizeup:
|
|
||||||
categories:
|
|
||||||
- name: extra small
|
|
||||||
lte: 25
|
|
||||||
label:
|
|
||||||
name: XS
|
|
||||||
description: Should be very easy to review
|
|
||||||
color: 3cbf00
|
|
||||||
- name: small
|
|
||||||
lte: 100
|
|
||||||
label:
|
|
||||||
name: S
|
|
||||||
description: Should be easy to review
|
|
||||||
color: 5d9801
|
|
||||||
- name: medium
|
|
||||||
lte: 250
|
|
||||||
label:
|
|
||||||
name: M
|
|
||||||
description: Should be of average difficulty to review
|
|
||||||
color: 7f7203
|
|
||||||
- name: large
|
|
||||||
lte: 500
|
|
||||||
label:
|
|
||||||
name: L
|
|
||||||
description: May be hard to review
|
|
||||||
color: a14c05
|
|
||||||
- name: extra large
|
|
||||||
lte: 1000
|
|
||||||
label:
|
|
||||||
name: XL
|
|
||||||
description: May be very hard to review
|
|
||||||
color: c32607
|
|
||||||
- name: extra extra large
|
|
||||||
label:
|
|
||||||
name: XXL
|
|
||||||
description: May be extremely hard to review
|
|
||||||
color: e50009
|
|
||||||
ignoredFilePatterns:
|
|
||||||
- ".github/workflows/__*"
|
|
||||||
- "lib/**/*"
|
|
||||||
- "package-lock.json"
|
|
||||||
testFilePatterns:
|
|
||||||
- "**/*.test.ts"
|
|
||||||
scoring:
|
|
||||||
# This formula and the aliases below it are written in prefix notation.
|
|
||||||
# For an explanation of how this works, please see:
|
|
||||||
# https://github.com/lerebear/sizeup-core/blob/main/README.md#prefix-notation
|
|
||||||
formula: "- - + additions deletions comments whitespace"
|
|
||||||
16
.github/update-release-branch.py
vendored
16
.github/update-release-branch.py
vendored
@@ -97,8 +97,8 @@ def open_pr(
|
|||||||
body.append(' - [ ] Ensure the docs team is aware of any documentation changes that need to be released.')
|
body.append(' - [ ] Ensure the docs team is aware of any documentation changes that need to be released.')
|
||||||
|
|
||||||
if not is_primary_release:
|
if not is_primary_release:
|
||||||
body.append(' - [ ] Remove and re-add the "Rebuild" label to the PR to trigger just this workflow.')
|
body.append(' - [ ] Remove and re-add the "Update dependencies" label to the PR to trigger just this workflow.')
|
||||||
body.append(' - [ ] Wait for the "Rebuild" workflow to push a commit updating the distribution files.')
|
body.append(' - [ ] Wait for the "Update dependencies" workflow to push a commit updating the dependencies.')
|
||||||
|
|
||||||
body.append(' - [ ] Mark the PR as ready for review to trigger the full set of PR checks.')
|
body.append(' - [ ] Mark the PR as ready for review to trigger the full set of PR checks.')
|
||||||
body.append(' - [ ] Approve and merge this PR. Make sure `Create a merge commit` is selected rather than `Squash and merge` or `Rebase and merge`.')
|
body.append(' - [ ] Approve and merge this PR. Make sure `Create a merge commit` is selected rather than `Squash and merge` or `Rebase and merge`.')
|
||||||
@@ -108,7 +108,7 @@ def open_pr(
|
|||||||
body.append(' - [ ] Merge all backport PRs to older release branches, that will automatically be created once this PR is merged.')
|
body.append(' - [ ] Merge all backport PRs to older release branches, that will automatically be created once this PR is merged.')
|
||||||
|
|
||||||
title = f'Merge {source_branch} into {target_branch}'
|
title = f'Merge {source_branch} into {target_branch}'
|
||||||
labels = ['Rebuild'] if not is_primary_release else []
|
labels = ['Update dependencies'] if not is_primary_release else []
|
||||||
|
|
||||||
# Create the pull request
|
# Create the pull request
|
||||||
# PR checks won't be triggered on PRs created by Actions. Therefore mark the PR as draft so that
|
# PR checks won't be triggered on PRs created by Actions. Therefore mark the PR as draft so that
|
||||||
@@ -371,10 +371,10 @@ def main():
|
|||||||
# releases.
|
# releases.
|
||||||
run_git('revert', vOlder_update_commits[0], '--no-edit')
|
run_git('revert', vOlder_update_commits[0], '--no-edit')
|
||||||
|
|
||||||
# Also revert the "Rebuild" commit created by Actions.
|
# Also revert the "Update checked-in dependencies" commit created by Actions.
|
||||||
rebuild_commit = run_git('log', '--grep', '^Rebuild$', '--format=%H').split()[0]
|
update_dependencies_commit = run_git('log', '--grep', '^Update checked-in dependencies', '--format=%H').split()[0]
|
||||||
print(f' Reverting {rebuild_commit}')
|
print(f' Reverting {update_dependencies_commit}')
|
||||||
run_git('revert', rebuild_commit, '--no-edit')
|
run_git('revert', update_dependencies_commit, '--no-edit')
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print(' Nothing to revert.')
|
print(' Nothing to revert.')
|
||||||
@@ -389,7 +389,7 @@ def main():
|
|||||||
|
|
||||||
# Migrate the package version number from a vLatest version number to a vOlder version number
|
# Migrate the package version number from a vLatest version number to a vOlder version number
|
||||||
print(f'Setting version number to {version} in package.json')
|
print(f'Setting version number to {version} in package.json')
|
||||||
replace_version_package_json(get_current_version(), version) # We rely on the `Rebuild` workflow to update package-lock.json
|
replace_version_package_json(get_current_version(), version) # We rely on the `Update dependencies` workflow to update package-lock.json
|
||||||
run_git('add', 'package.json')
|
run_git('add', 'package.json')
|
||||||
|
|
||||||
# Migrate the changelog notes from vLatest version numbers to vOlder version numbers
|
# Migrate the changelog notes from vLatest version numbers to vOlder version numbers
|
||||||
|
|||||||
57
.github/workflows/__all-platform-bundle.yml
generated
vendored
57
.github/workflows/__all-platform-bundle.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - All-platform bundle
|
name: PR Check - All-platform bundle
|
||||||
@@ -20,36 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
all-platform-bundle:
|
all-platform-bundle:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -58,20 +29,20 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
- os: macos-latest
|
|
||||||
version: nightly-latest
|
|
||||||
- os: windows-latest
|
|
||||||
version: nightly-latest
|
|
||||||
name: All-platform bundle
|
name: All-platform bundle
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -79,15 +50,6 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'true'
|
use-all-platform-bundle: 'true'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
|
||||||
cache: false
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- id: init
|
- id: init
|
||||||
uses: ./../action/init
|
uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
@@ -95,6 +57,7 @@ jobs:
|
|||||||
languages: cpp,csharp,go,java,javascript,python,ruby
|
languages: cpp,csharp,go,java,javascript,python,ruby
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
env:
|
env:
|
||||||
|
|||||||
72
.github/workflows/__analyze-ref-input.yml
generated
vendored
72
.github/workflows/__analyze-ref-input.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: "PR Check - Analyze: 'ref' and 'sha' from inputs"
|
name: "PR Check - Analyze: 'ref' and 'sha' from inputs"
|
||||||
@@ -20,46 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze-ref-input:
|
analyze-ref-input:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -68,16 +29,24 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
|
- os: macos-latest
|
||||||
|
version: default
|
||||||
|
- os: windows-latest
|
||||||
|
version: default
|
||||||
name: "Analyze: 'ref' and 'sha' from inputs"
|
name: "Analyze: 'ref' and 'sha' from inputs"
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -85,20 +54,6 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
|
||||||
cache: false
|
|
||||||
- name: Install Python
|
|
||||||
if: matrix.version != 'nightly-latest'
|
|
||||||
uses: actions/setup-python@v6
|
|
||||||
with:
|
|
||||||
python-version: ${{ inputs.python-version || '3.13' }}
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
@@ -106,6 +61,7 @@ jobs:
|
|||||||
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
|
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
|
||||||
github.sha }}
|
github.sha }}
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
with:
|
||||||
|
|||||||
38
.github/workflows/__autobuild-action.yml
generated
vendored
38
.github/workflows/__autobuild-action.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - autobuild-action
|
name: PR Check - autobuild-action
|
||||||
@@ -20,26 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
autobuild-action:
|
autobuild-action:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -53,15 +34,19 @@ jobs:
|
|||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: linked
|
version: linked
|
||||||
name: autobuild-action
|
name: autobuild-action
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -69,10 +54,6 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: csharp
|
languages: csharp
|
||||||
@@ -88,6 +69,7 @@ jobs:
|
|||||||
CORECLR_PROFILER_PATH_64: ''
|
CORECLR_PROFILER_PATH_64: ''
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
- name: Check database
|
- name: Check database
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd "$RUNNER_TEMP/codeql_databases"
|
cd "$RUNNER_TEMP/codeql_databases"
|
||||||
if [[ ! -d csharp ]]; then
|
if [[ ! -d csharp ]]; then
|
||||||
|
|||||||
40
.github/workflows/__autobuild-direct-tracing-with-working-dir.yml
generated
vendored
40
.github/workflows/__autobuild-direct-tracing-with-working-dir.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Autobuild direct tracing (custom working directory)
|
name: PR Check - Autobuild direct tracing (custom working directory)
|
||||||
@@ -20,26 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
java-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Java to install
|
|
||||||
required: false
|
|
||||||
default: '17'
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
java-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Java to install
|
|
||||||
required: false
|
|
||||||
default: '17'
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
autobuild-direct-tracing-with-working-dir:
|
autobuild-direct-tracing-with-working-dir:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -55,15 +36,19 @@ jobs:
|
|||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Autobuild direct tracing (custom working directory)
|
name: Autobuild direct tracing (custom working directory)
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -71,12 +56,8 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Java
|
|
||||||
uses: actions/setup-java@v5
|
|
||||||
with:
|
|
||||||
java-version: ${{ inputs.java-version || '17' }}
|
|
||||||
distribution: temurin
|
|
||||||
- name: Test setup
|
- name: Test setup
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# Make sure that Gradle build succeeds in autobuild-dir ...
|
# Make sure that Gradle build succeeds in autobuild-dir ...
|
||||||
cp -a ../action/tests/java-repo autobuild-dir
|
cp -a ../action/tests/java-repo autobuild-dir
|
||||||
@@ -88,6 +69,7 @@ jobs:
|
|||||||
languages: java
|
languages: java
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- name: Check that indirect tracing is disabled
|
- name: Check that indirect tracing is disabled
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [[ ! -z "${CODEQL_RUNNER}" ]]; then
|
if [[ ! -z "${CODEQL_RUNNER}" ]]; then
|
||||||
echo "Expected indirect tracing to be disabled, but the" \
|
echo "Expected indirect tracing to be disabled, but the" \
|
||||||
|
|||||||
86
.github/workflows/__autobuild-direct-tracing.yml
generated
vendored
Normal file
86
.github/workflows/__autobuild-direct-tracing.yml
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
|
# to regenerate this file.
|
||||||
|
|
||||||
|
name: PR Check - Autobuild direct tracing
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
autobuild-direct-tracing:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: linked
|
||||||
|
- os: windows-latest
|
||||||
|
version: linked
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: nightly-latest
|
||||||
|
- os: windows-latest
|
||||||
|
version: nightly-latest
|
||||||
|
name: Autobuild direct tracing
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Prepare test
|
||||||
|
id: prepare-test
|
||||||
|
uses: ./.github/actions/prepare-test
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
use-all-platform-bundle: 'false'
|
||||||
|
setup-kotlin: 'true'
|
||||||
|
- name: Set up Java test repo configuration
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mv * .github ../action/tests/multi-language-repo/
|
||||||
|
mv ../action/tests/multi-language-repo/.github/workflows .github
|
||||||
|
mv ../action/tests/java-repo/* .
|
||||||
|
|
||||||
|
- uses: ./../action/init
|
||||||
|
id: init
|
||||||
|
with:
|
||||||
|
build-mode: autobuild
|
||||||
|
db-location: ${{ runner.temp }}/customDbLocation
|
||||||
|
languages: java
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
|
- name: Check that indirect tracing is disabled
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [[ ! -z "${CODEQL_RUNNER}" ]]; then
|
||||||
|
echo "Expected indirect tracing to be disabled, but the" \
|
||||||
|
"CODEQL_RUNNER environment variable is set."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_AUTOBUILD_BUILD_MODE_DIRECT_TRACING: true
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
80
.github/workflows/__autobuild-working-dir.yml
generated
vendored
80
.github/workflows/__autobuild-working-dir.yml
generated
vendored
@@ -1,80 +0,0 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
|
||||||
# pr-checks/sync.sh
|
|
||||||
# to regenerate this file.
|
|
||||||
|
|
||||||
name: PR Check - Autobuild working directory
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GO111MODULE: auto
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- releases/v*
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- ready_for_review
|
|
||||||
schedule:
|
|
||||||
- cron: '0 5 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
|
||||||
autobuild-working-dir:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: linked
|
|
||||||
name: Autobuild working directory
|
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
timeout-minutes: 45
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
- name: Prepare test
|
|
||||||
id: prepare-test
|
|
||||||
uses: ./.github/actions/prepare-test
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.version }}
|
|
||||||
use-all-platform-bundle: 'false'
|
|
||||||
setup-kotlin: 'true'
|
|
||||||
- name: Test setup
|
|
||||||
run: |
|
|
||||||
# Make sure that Gradle build succeeds in autobuild-dir ...
|
|
||||||
cp -a ../action/tests/java-repo autobuild-dir
|
|
||||||
# ... and fails if attempted in the current directory
|
|
||||||
echo > build.gradle
|
|
||||||
- uses: ./../action/init
|
|
||||||
with:
|
|
||||||
languages: java
|
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
|
||||||
- uses: ./../action/autobuild
|
|
||||||
with:
|
|
||||||
working-directory: autobuild-dir
|
|
||||||
- uses: ./../action/analyze
|
|
||||||
- name: Check database
|
|
||||||
run: |
|
|
||||||
cd "$RUNNER_TEMP/codeql_databases"
|
|
||||||
if [[ ! -d java ]]; then
|
|
||||||
echo "Did not find a Java database"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
57
.github/workflows/__build-mode-autobuild.yml
generated
vendored
57
.github/workflows/__build-mode-autobuild.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Build mode autobuild
|
name: PR Check - Build mode autobuild
|
||||||
@@ -20,26 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
java-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Java to install
|
|
||||||
required: false
|
|
||||||
default: '17'
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
java-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Java to install
|
|
||||||
required: false
|
|
||||||
default: '17'
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
build-mode-autobuild:
|
build-mode-autobuild:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -47,23 +28,21 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: linked
|
|
||||||
- os: windows-latest
|
|
||||||
version: linked
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: nightly-latest
|
|
||||||
- os: windows-latest
|
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Build mode autobuild
|
name: Build mode autobuild
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -71,11 +50,6 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Java
|
|
||||||
uses: actions/setup-java@v5
|
|
||||||
with:
|
|
||||||
java-version: ${{ inputs.java-version || '17' }}
|
|
||||||
distribution: temurin
|
|
||||||
- name: Set up Java test repo configuration
|
- name: Set up Java test repo configuration
|
||||||
run: |
|
run: |
|
||||||
mv * .github ../action/tests/multi-language-repo/
|
mv * .github ../action/tests/multi-language-repo/
|
||||||
@@ -90,11 +64,6 @@ jobs:
|
|||||||
languages: java
|
languages: java
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
- name: Install yq
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
run: |
|
|
||||||
choco install yq -y
|
|
||||||
|
|
||||||
- name: Validate database build mode
|
- name: Validate database build mode
|
||||||
run: |
|
run: |
|
||||||
metadata_path="$RUNNER_TEMP/customDbLocation/java/codeql-database.yml"
|
metadata_path="$RUNNER_TEMP/customDbLocation/java/codeql-database.yml"
|
||||||
@@ -104,14 +73,6 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Check that indirect tracing is disabled
|
|
||||||
run: |
|
|
||||||
if [[ ! -z "${CODEQL_RUNNER}" ]]; then
|
|
||||||
echo "Expected indirect tracing to be disabled, but the" \
|
|
||||||
"CODEQL_RUNNER environment variable is set."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
env:
|
env:
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
|
|||||||
53
.github/workflows/__build-mode-manual.yml
generated
vendored
53
.github/workflows/__build-mode-manual.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Build mode manual
|
name: PR Check - Build mode manual
|
||||||
@@ -20,36 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
build-mode-manual:
|
build-mode-manual:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -59,15 +30,19 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Build mode manual
|
name: Build mode manual
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -75,15 +50,6 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
|
||||||
cache: false
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
@@ -102,6 +68,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
|
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
|
|||||||
23
.github/workflows/__build-mode-none.yml
generated
vendored
23
.github/workflows/__build-mode-none.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Build mode none
|
name: PR Check - Build mode none
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
build-mode-none:
|
build-mode-none:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -41,15 +32,19 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Build mode none
|
name: Build mode none
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
23
.github/workflows/__build-mode-rollback.yml
generated
vendored
23
.github/workflows/__build-mode-rollback.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Build mode rollback
|
name: PR Check - Build mode rollback
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
build-mode-rollback:
|
build-mode-rollback:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -39,15 +30,19 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Build mode rollback
|
name: Build mode rollback
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
85
.github/workflows/__bundle-from-toolcache.yml
generated
vendored
85
.github/workflows/__bundle-from-toolcache.yml
generated
vendored
@@ -1,85 +0,0 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
|
||||||
# pr-checks/sync.sh
|
|
||||||
# to regenerate this file.
|
|
||||||
|
|
||||||
name: 'PR Check - Bundle: From toolcache'
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GO111MODULE: auto
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- releases/v*
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- ready_for_review
|
|
||||||
schedule:
|
|
||||||
- cron: '0 5 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
|
||||||
bundle-from-toolcache:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: toolcache
|
|
||||||
name: 'Bundle: From toolcache'
|
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
timeout-minutes: 45
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
- name: Prepare test
|
|
||||||
id: prepare-test
|
|
||||||
uses: ./.github/actions/prepare-test
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.version }}
|
|
||||||
use-all-platform-bundle: 'false'
|
|
||||||
setup-kotlin: 'true'
|
|
||||||
- name: Install @actions/tool-cache
|
|
||||||
run: npm install @actions/tool-cache
|
|
||||||
- name: Check toolcache contains CodeQL
|
|
||||||
continue-on-error: true
|
|
||||||
uses: actions/github-script@v8
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const toolcache = require('@actions/tool-cache');
|
|
||||||
const allCodeqlVersions = toolcache.findAllVersions('CodeQL');
|
|
||||||
if (allCodeqlVersions.length === 0) {
|
|
||||||
throw new Error(`CodeQL could not be found in the toolcache`);
|
|
||||||
}
|
|
||||||
- id: setup-codeql
|
|
||||||
uses: ./../action/setup-codeql
|
|
||||||
with:
|
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
|
||||||
- name: Check CodeQL is installed within the toolcache
|
|
||||||
uses: actions/github-script@v8
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const toolcache = require('@actions/tool-cache');
|
|
||||||
const allCodeqlVersions = toolcache.findAllVersions('CodeQL');
|
|
||||||
console.log(`Found CodeQL versions: ${allCodeqlVersions}`);
|
|
||||||
if (allCodeqlVersions.length === 0) {
|
|
||||||
throw new Error('CodeQL not found in toolcache');
|
|
||||||
}
|
|
||||||
env:
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
105
.github/workflows/__bundle-toolcache.yml
generated
vendored
105
.github/workflows/__bundle-toolcache.yml
generated
vendored
@@ -1,105 +0,0 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
|
||||||
# pr-checks/sync.sh
|
|
||||||
# to regenerate this file.
|
|
||||||
|
|
||||||
name: 'PR Check - Bundle: Caching checks'
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GO111MODULE: auto
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- releases/v*
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- ready_for_review
|
|
||||||
schedule:
|
|
||||||
- cron: '0 5 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
|
||||||
bundle-toolcache:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: macos-latest
|
|
||||||
version: linked
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: linked
|
|
||||||
- os: windows-latest
|
|
||||||
version: linked
|
|
||||||
name: 'Bundle: Caching checks'
|
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
timeout-minutes: 45
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
- name: Prepare test
|
|
||||||
id: prepare-test
|
|
||||||
uses: ./.github/actions/prepare-test
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.version }}
|
|
||||||
use-all-platform-bundle: 'false'
|
|
||||||
setup-kotlin: 'true'
|
|
||||||
- name: Remove CodeQL from toolcache
|
|
||||||
uses: actions/github-script@v8
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL');
|
|
||||||
fs.rmdirSync(codeqlPath, { recursive: true });
|
|
||||||
- name: Install @actions/tool-cache
|
|
||||||
run: npm install @actions/tool-cache
|
|
||||||
- name: Check toolcache does not contain CodeQL
|
|
||||||
uses: actions/github-script@v8
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const toolcache = require('@actions/tool-cache');
|
|
||||||
const allCodeqlVersions = toolcache.findAllVersions('CodeQL');
|
|
||||||
if (allCodeqlVersions.length !== 0) {
|
|
||||||
throw new Error(`CodeQL should not be found in the toolcache, but found ${allCodeqlVersions}`);
|
|
||||||
}
|
|
||||||
console.log('No versions of CodeQL found in the toolcache');
|
|
||||||
- id: init
|
|
||||||
uses: ./../action/init
|
|
||||||
with:
|
|
||||||
languages: javascript
|
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
|
||||||
- uses: ./../action/analyze
|
|
||||||
with:
|
|
||||||
output: ${{ runner.temp }}/results
|
|
||||||
upload-database: false
|
|
||||||
- name: Check CodeQL is installed within the toolcache
|
|
||||||
uses: actions/github-script@v8
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const toolcache = require('@actions/tool-cache');
|
|
||||||
const allCodeqlVersions = toolcache.findAllVersions('CodeQL');
|
|
||||||
console.log(`Found CodeQL versions: ${allCodeqlVersions}`);
|
|
||||||
if (allCodeqlVersions.length === 0) {
|
|
||||||
throw new Error('CodeQL not found in toolcache');
|
|
||||||
}
|
|
||||||
if (allCodeqlVersions.length > 1) {
|
|
||||||
throw new Error('Multiple CodeQL versions found in toolcache');
|
|
||||||
}
|
|
||||||
env:
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
122
.github/workflows/__bundle-zstd.yml
generated
vendored
122
.github/workflows/__bundle-zstd.yml
generated
vendored
@@ -1,122 +0,0 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
|
||||||
# pr-checks/sync.sh
|
|
||||||
# to regenerate this file.
|
|
||||||
|
|
||||||
name: 'PR Check - Bundle: Zstandard checks'
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GO111MODULE: auto
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- releases/v*
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- ready_for_review
|
|
||||||
schedule:
|
|
||||||
- cron: '0 5 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
|
||||||
bundle-zstd:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: macos-latest
|
|
||||||
version: linked
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: linked
|
|
||||||
- os: windows-latest
|
|
||||||
version: linked
|
|
||||||
name: 'Bundle: Zstandard checks'
|
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
timeout-minutes: 45
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
- name: Prepare test
|
|
||||||
id: prepare-test
|
|
||||||
uses: ./.github/actions/prepare-test
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.version }}
|
|
||||||
use-all-platform-bundle: 'false'
|
|
||||||
setup-kotlin: 'true'
|
|
||||||
- name: Remove CodeQL from toolcache
|
|
||||||
uses: actions/github-script@v8
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL');
|
|
||||||
if (codeqlPath !== undefined) {
|
|
||||||
fs.rmdirSync(codeqlPath, { recursive: true });
|
|
||||||
}
|
|
||||||
- id: init
|
|
||||||
uses: ./../action/init
|
|
||||||
with:
|
|
||||||
languages: javascript
|
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
|
||||||
- uses: ./../action/analyze
|
|
||||||
with:
|
|
||||||
output: ${{ runner.temp }}/results
|
|
||||||
upload-database: false
|
|
||||||
- name: Upload SARIF
|
|
||||||
uses: actions/upload-artifact@v6
|
|
||||||
with:
|
|
||||||
name: ${{ matrix.os }}-zstd-bundle.sarif
|
|
||||||
path: ${{ runner.temp }}/results/javascript.sarif
|
|
||||||
retention-days: 7
|
|
||||||
- name: Check diagnostic with expected tools URL appears in SARIF
|
|
||||||
uses: actions/github-script@v8
|
|
||||||
env:
|
|
||||||
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
|
|
||||||
const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));
|
|
||||||
const run = sarif.runs[0];
|
|
||||||
|
|
||||||
const toolExecutionNotifications = run.invocations[0].toolExecutionNotifications;
|
|
||||||
const downloadTelemetryNotifications = toolExecutionNotifications.filter(n =>
|
|
||||||
n.descriptor.id === 'codeql-action/bundle-download-telemetry'
|
|
||||||
);
|
|
||||||
if (downloadTelemetryNotifications.length !== 1) {
|
|
||||||
core.setFailed(
|
|
||||||
'Expected exactly one reporting descriptor in the ' +
|
|
||||||
`'runs[].invocations[].toolExecutionNotifications[]' SARIF property, but found ` +
|
|
||||||
`${downloadTelemetryNotifications.length}. All notification reporting descriptors: ` +
|
|
||||||
`${JSON.stringify(toolExecutionNotifications)}.`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const toolsUrl = downloadTelemetryNotifications[0].properties.attributes.toolsUrl;
|
|
||||||
console.log(`Found tools URL: ${toolsUrl}`);
|
|
||||||
|
|
||||||
const expectedExtension = process.env['RUNNER_OS'] === 'Windows' ? '.tar.gz' : '.tar.zst';
|
|
||||||
|
|
||||||
if (!toolsUrl.endsWith(expectedExtension)) {
|
|
||||||
core.setFailed(
|
|
||||||
`Expected the tools URL to be a ${expectedExtension} file, but found ${toolsUrl}.`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
env:
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
23
.github/workflows/__cleanup-db-cluster-dir.yml
generated
vendored
23
.github/workflows/__cleanup-db-cluster-dir.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Clean up database cluster directory
|
name: PR Check - Clean up database cluster directory
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
cleanup-db-cluster-dir:
|
cleanup-db-cluster-dir:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -39,15 +30,19 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: linked
|
version: linked
|
||||||
name: Clean up database cluster directory
|
name: Clean up database cluster directory
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
35
.github/workflows/__config-export.yml
generated
vendored
35
.github/workflows/__config-export.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Config export
|
name: PR Check - Config export
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
config-export:
|
config-export:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -38,18 +29,30 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: linked
|
version: linked
|
||||||
|
- os: macos-latest
|
||||||
|
version: linked
|
||||||
|
- os: windows-latest
|
||||||
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
|
- os: macos-latest
|
||||||
|
version: nightly-latest
|
||||||
|
- os: windows-latest
|
||||||
|
version: nightly-latest
|
||||||
name: Config export
|
name: Config export
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -67,13 +70,13 @@ jobs:
|
|||||||
output: ${{ runner.temp }}/results
|
output: ${{ runner.temp }}/results
|
||||||
upload-database: false
|
upload-database: false
|
||||||
- name: Upload SARIF
|
- name: Upload SARIF
|
||||||
uses: actions/upload-artifact@v6
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: config-export-${{ matrix.os }}-${{ matrix.version }}.sarif.json
|
name: config-export-${{ matrix.os }}-${{ matrix.version }}.sarif.json
|
||||||
path: ${{ runner.temp }}/results/javascript.sarif
|
path: ${{ runner.temp }}/results/javascript.sarif
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
- name: Check config properties appear in SARIF
|
- name: Check config properties appear in SARIF
|
||||||
uses: actions/github-script@v8
|
uses: actions/github-script@v7
|
||||||
env:
|
env:
|
||||||
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
|
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
|
||||||
with:
|
with:
|
||||||
|
|||||||
30
.github/workflows/__config-input.yml
generated
vendored
30
.github/workflows/__config-input.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Config input
|
name: PR Check - Config input
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
config-input:
|
config-input:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -39,22 +30,19 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: linked
|
version: linked
|
||||||
name: Config input
|
name: Config input
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Setup Python on macOS
|
||||||
uses: actions/checkout@v6
|
uses: actions/setup-python@v5
|
||||||
- name: Install Node.js
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
python-version: '3.11'
|
||||||
cache: npm
|
- name: Check out repository
|
||||||
- name: Install dependencies
|
uses: actions/checkout@v4
|
||||||
run: npm ci
|
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
27
.github/workflows/__cpp-deptrace-disabled.yml
generated
vendored
27
.github/workflows/__cpp-deptrace-disabled.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - C/C++: disabling autoinstalling dependencies (Linux)'
|
name: 'PR Check - C/C++: disabling autoinstalling dependencies (Linux)'
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
cpp-deptrace-disabled:
|
cpp-deptrace-disabled:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -43,15 +34,19 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: 'C/C++: disabling autoinstalling dependencies (Linux)'
|
name: 'C/C++: disabling autoinstalling dependencies (Linux)'
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -60,6 +55,7 @@ jobs:
|
|||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Test setup
|
- name: Test setup
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cp -a ../action/tests/cpp-autobuild autobuild-dir
|
cp -a ../action/tests/cpp-autobuild autobuild-dir
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
@@ -71,7 +67,8 @@ jobs:
|
|||||||
working-directory: autobuild-dir
|
working-directory: autobuild-dir
|
||||||
env:
|
env:
|
||||||
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: false
|
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: false
|
||||||
- run: |
|
- shell: bash
|
||||||
|
run: |
|
||||||
if ls /usr/bin/errno; then
|
if ls /usr/bin/errno; then
|
||||||
echo "C/C++ autobuild installed errno, but it should not have since auto-install dependencies is disabled."
|
echo "C/C++ autobuild installed errno, but it should not have since auto-install dependencies is disabled."
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
29
.github/workflows/__cpp-deptrace-enabled-on-macos.yml
generated
vendored
29
.github/workflows/__cpp-deptrace-enabled-on-macos.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - C/C++: autoinstalling dependencies is skipped (macOS)'
|
name: 'PR Check - C/C++: autoinstalling dependencies is skipped (macOS)'
|
||||||
@@ -20,36 +20,29 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
cpp-deptrace-enabled-on-macos:
|
cpp-deptrace-enabled-on-macos:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: macos-latest
|
|
||||||
version: linked
|
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: 'C/C++: autoinstalling dependencies is skipped (macOS)'
|
name: 'C/C++: autoinstalling dependencies is skipped (macOS)'
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -58,6 +51,7 @@ jobs:
|
|||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Test setup
|
- name: Test setup
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cp -a ../action/tests/cpp-autobuild autobuild-dir
|
cp -a ../action/tests/cpp-autobuild autobuild-dir
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
@@ -69,7 +63,8 @@ jobs:
|
|||||||
working-directory: autobuild-dir
|
working-directory: autobuild-dir
|
||||||
env:
|
env:
|
||||||
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true
|
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true
|
||||||
- run: |
|
- shell: bash
|
||||||
|
run: |
|
||||||
if ! ls /usr/bin/errno; then
|
if ! ls /usr/bin/errno; then
|
||||||
echo "As expected, CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES is a no-op on macOS"
|
echo "As expected, CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES is a no-op on macOS"
|
||||||
else
|
else
|
||||||
|
|||||||
27
.github/workflows/__cpp-deptrace-enabled.yml
generated
vendored
27
.github/workflows/__cpp-deptrace-enabled.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - C/C++: autoinstalling dependencies (Linux)'
|
name: 'PR Check - C/C++: autoinstalling dependencies (Linux)'
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
cpp-deptrace-enabled:
|
cpp-deptrace-enabled:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -43,15 +34,19 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: 'C/C++: autoinstalling dependencies (Linux)'
|
name: 'C/C++: autoinstalling dependencies (Linux)'
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -60,6 +55,7 @@ jobs:
|
|||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Test setup
|
- name: Test setup
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cp -a ../action/tests/cpp-autobuild autobuild-dir
|
cp -a ../action/tests/cpp-autobuild autobuild-dir
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
@@ -71,7 +67,8 @@ jobs:
|
|||||||
working-directory: autobuild-dir
|
working-directory: autobuild-dir
|
||||||
env:
|
env:
|
||||||
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true
|
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true
|
||||||
- run: |
|
- shell: bash
|
||||||
|
run: |
|
||||||
if ! ls /usr/bin/errno; then
|
if ! ls /usr/bin/errno; then
|
||||||
echo "Did not autoinstall errno"
|
echo "Did not autoinstall errno"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
36
.github/workflows/__diagnostics-export.yml
generated
vendored
36
.github/workflows/__diagnostics-export.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Diagnostic export
|
name: PR Check - Diagnostic export
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
diagnostics-export:
|
diagnostics-export:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -38,18 +29,30 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: linked
|
version: linked
|
||||||
|
- os: macos-latest
|
||||||
|
version: linked
|
||||||
|
- os: windows-latest
|
||||||
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
|
- os: macos-latest
|
||||||
|
version: nightly-latest
|
||||||
|
- os: windows-latest
|
||||||
|
version: nightly-latest
|
||||||
name: Diagnostic export
|
name: Diagnostic export
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -63,6 +66,7 @@ jobs:
|
|||||||
languages: javascript
|
languages: javascript
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- name: Add test diagnostics
|
- name: Add test diagnostics
|
||||||
|
shell: bash
|
||||||
env:
|
env:
|
||||||
CODEQL_PATH: ${{ steps.init.outputs.codeql-path }}
|
CODEQL_PATH: ${{ steps.init.outputs.codeql-path }}
|
||||||
run: |
|
run: |
|
||||||
@@ -78,13 +82,13 @@ jobs:
|
|||||||
output: ${{ runner.temp }}/results
|
output: ${{ runner.temp }}/results
|
||||||
upload-database: false
|
upload-database: false
|
||||||
- name: Upload SARIF
|
- name: Upload SARIF
|
||||||
uses: actions/upload-artifact@v6
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: diagnostics-export-${{ matrix.os }}-${{ matrix.version }}.sarif.json
|
name: diagnostics-export-${{ matrix.os }}-${{ matrix.version }}.sarif.json
|
||||||
path: ${{ runner.temp }}/results/javascript.sarif
|
path: ${{ runner.temp }}/results/javascript.sarif
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
- name: Check diagnostics appear in SARIF
|
- name: Check diagnostics appear in SARIF
|
||||||
uses: actions/github-script@v8
|
uses: actions/github-script@v7
|
||||||
env:
|
env:
|
||||||
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
|
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
|
||||||
with:
|
with:
|
||||||
|
|||||||
60
.github/workflows/__export-file-baseline-information.yml
generated
vendored
60
.github/workflows/__export-file-baseline-information.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Export file baseline information
|
name: PR Check - Export file baseline information
|
||||||
@@ -20,36 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
export-file-baseline-information:
|
export-file-baseline-information:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -63,15 +34,19 @@ jobs:
|
|||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Export file baseline information
|
name: Export file baseline information
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -79,32 +54,29 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
|
||||||
cache: false
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
- uses: ./../action/.github/actions/setup-swift
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
with:
|
||||||
|
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
with:
|
||||||
output: ${{ runner.temp }}/results
|
output: ${{ runner.temp }}/results
|
||||||
- name: Upload SARIF
|
- name: Upload SARIF
|
||||||
uses: actions/upload-artifact@v6
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: with-baseline-information-${{ matrix.os }}-${{ matrix.version }}.sarif.json
|
name: with-baseline-information-${{ matrix.os }}-${{ matrix.version }}.sarif.json
|
||||||
path: ${{ runner.temp }}/results/javascript.sarif
|
path: ${{ runner.temp }}/results/javascript.sarif
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
- name: Check results
|
- name: Check results
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd "$RUNNER_TEMP/results"
|
cd "$RUNNER_TEMP/results"
|
||||||
expected_baseline_languages="c csharp go java kotlin javascript python ruby"
|
expected_baseline_languages="c csharp go java kotlin javascript python ruby"
|
||||||
|
|||||||
24
.github/workflows/__extractor-ram-threads.yml
generated
vendored
24
.github/workflows/__extractor-ram-threads.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Extractor ram and threads options test
|
name: PR Check - Extractor ram and threads options test
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
extractor-ram-threads:
|
extractor-ram-threads:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -39,15 +30,19 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: linked
|
version: linked
|
||||||
name: Extractor ram and threads options test
|
name: Extractor ram and threads options test
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -61,6 +56,7 @@ jobs:
|
|||||||
ram: 230
|
ram: 230
|
||||||
threads: 1
|
threads: 1
|
||||||
- name: Assert Results
|
- name: Assert Results
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ "${CODEQL_RAM}" != "230" ]; then
|
if [ "${CODEQL_RAM}" != "230" ]; then
|
||||||
echo "CODEQL_RAM is '${CODEQL_RAM}' instead of 230"
|
echo "CODEQL_RAM is '${CODEQL_RAM}' instead of 230"
|
||||||
|
|||||||
87
.github/workflows/__global-proxy.yml
generated
vendored
87
.github/workflows/__global-proxy.yml
generated
vendored
@@ -1,87 +0,0 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
|
||||||
# pr-checks/sync.sh
|
|
||||||
# to regenerate this file.
|
|
||||||
|
|
||||||
name: PR Check - Proxy test
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GO111MODULE: auto
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- releases/v*
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- ready_for_review
|
|
||||||
schedule:
|
|
||||||
- cron: '0 5 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
|
||||||
global-proxy:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: linked
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: nightly-latest
|
|
||||||
name: Proxy test
|
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
timeout-minutes: 45
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
# These steps are required to initialise the `gh` cli in a container that doesn't
|
|
||||||
# come pre-installed with it. The reason for that is that this is later
|
|
||||||
# needed by the `prepare-test` workflow to find the latest release of CodeQL.
|
|
||||||
- name: Set up GitHub CLI
|
|
||||||
run: |
|
|
||||||
apt update
|
|
||||||
apt install -y curl libreadline8 gnupg2 software-properties-common zstd
|
|
||||||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
|
|
||||||
apt-key add /usr/share/keyrings/githubcli-archive-keyring.gpg
|
|
||||||
apt-add-repository https://cli.github.com/packages
|
|
||||||
apt install -y gh
|
|
||||||
env: {}
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
- name: Prepare test
|
|
||||||
id: prepare-test
|
|
||||||
uses: ./.github/actions/prepare-test
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.version }}
|
|
||||||
use-all-platform-bundle: 'false'
|
|
||||||
setup-kotlin: 'false'
|
|
||||||
- uses: ./../action/init
|
|
||||||
with:
|
|
||||||
languages: javascript
|
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
|
||||||
- uses: ./../action/analyze
|
|
||||||
env:
|
|
||||||
https_proxy: http://squid-proxy:3128
|
|
||||||
CODEQL_ACTION_TOLERATE_MISSING_GIT_VERSION: true
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
container:
|
|
||||||
image: ubuntu:22.04
|
|
||||||
services:
|
|
||||||
squid-proxy:
|
|
||||||
image: ubuntu/squid:latest
|
|
||||||
ports:
|
|
||||||
- 3128:3128
|
|
||||||
54
.github/workflows/__go-custom-queries.yml
generated
vendored
54
.github/workflows/__go-custom-queries.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Go: Custom queries'
|
name: 'PR Check - Go: Custom queries'
|
||||||
@@ -20,36 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
go-custom-queries:
|
go-custom-queries:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -61,15 +32,19 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: 'Go: Custom queries'
|
name: 'Go: Custom queries'
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -77,21 +52,16 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
- uses: actions/setup-go@v5
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
with:
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
go-version: '>=1.21.0'
|
||||||
cache: false
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: go
|
||||||
config-file: ./.github/codeql/custom-queries.yml
|
config-file: ./.github/codeql/custom-queries.yml
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
env:
|
env:
|
||||||
|
|||||||
47
.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml
generated
vendored
47
.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Go: diagnostic when Go is changed after init step'
|
name: 'PR Check - Go: diagnostic when Go is changed after init step'
|
||||||
@@ -20,26 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
go-indirect-tracing-workaround-diagnostic:
|
go-indirect-tracing-workaround-diagnostic:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -47,17 +28,21 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: stable-v2.14.6
|
||||||
name: 'Go: diagnostic when Go is changed after init step'
|
name: 'Go: diagnostic when Go is changed after init step'
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -65,27 +50,27 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
- uses: actions/setup-go@v5
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
with:
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
# We need a Go version that ships with statically linked binaries on Linux
|
||||||
cache: false
|
go-version: '>=1.21.0'
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: go
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
# Deliberately change Go after the `init` step
|
# Deliberately change Go after the `init` step
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.20'
|
go-version: '1.20'
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: go build main.go
|
run: go build main.go
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
with:
|
||||||
output: ${{ runner.temp }}/results
|
output: ${{ runner.temp }}/results
|
||||||
upload-database: false
|
upload-database: false
|
||||||
- name: Check diagnostic appears in SARIF
|
- name: Check diagnostic appears in SARIF
|
||||||
uses: actions/github-script@v8
|
uses: actions/github-script@v7
|
||||||
env:
|
env:
|
||||||
SARIF_PATH: ${{ runner.temp }}/results/go.sarif
|
SARIF_PATH: ${{ runner.temp }}/results/go.sarif
|
||||||
with:
|
with:
|
||||||
|
|||||||
45
.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml
generated
vendored
45
.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Go: diagnostic when `file` is not installed'
|
name: 'PR Check - Go: diagnostic when `file` is not installed'
|
||||||
@@ -20,26 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
go-indirect-tracing-workaround-no-file-program:
|
go-indirect-tracing-workaround-no-file-program:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -47,17 +28,21 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: stable-v2.14.6
|
||||||
name: 'Go: diagnostic when `file` is not installed'
|
name: 'Go: diagnostic when `file` is not installed'
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -65,11 +50,10 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
- uses: actions/setup-go@v5
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
with:
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
# We need a Go version that ships with statically linked binaries on Linux
|
||||||
cache: false
|
go-version: '>=1.21.0'
|
||||||
- name: Remove `file` program
|
- name: Remove `file` program
|
||||||
run: |
|
run: |
|
||||||
echo $(which file)
|
echo $(which file)
|
||||||
@@ -80,13 +64,14 @@ jobs:
|
|||||||
languages: go
|
languages: go
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: go build main.go
|
run: go build main.go
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
with:
|
||||||
output: ${{ runner.temp }}/results
|
output: ${{ runner.temp }}/results
|
||||||
upload-database: false
|
upload-database: false
|
||||||
- name: Check diagnostic appears in SARIF
|
- name: Check diagnostic appears in SARIF
|
||||||
uses: actions/github-script@v8
|
uses: actions/github-script@v7
|
||||||
env:
|
env:
|
||||||
SARIF_PATH: ${{ runner.temp }}/results/go.sarif
|
SARIF_PATH: ${{ runner.temp }}/results/go.sarif
|
||||||
with:
|
with:
|
||||||
|
|||||||
46
.github/workflows/__go-indirect-tracing-workaround.yml
generated
vendored
46
.github/workflows/__go-indirect-tracing-workaround.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Go: workaround for indirect tracing'
|
name: 'PR Check - Go: workaround for indirect tracing'
|
||||||
@@ -20,26 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
go-indirect-tracing-workaround:
|
go-indirect-tracing-workaround:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -47,17 +28,21 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: stable-v2.14.6
|
||||||
name: 'Go: workaround for indirect tracing'
|
name: 'Go: workaround for indirect tracing'
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -65,19 +50,20 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
- uses: actions/setup-go@v5
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
with:
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
# We need a Go version that ships with statically linked binaries on Linux
|
||||||
cache: false
|
go-version: '>=1.21.0'
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: go
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: go build main.go
|
run: go build main.go
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
- run: |
|
- shell: bash
|
||||||
|
run: |
|
||||||
if [[ -z "${CODEQL_ACTION_GO_BINARY}" ]]; then
|
if [[ -z "${CODEQL_ACTION_GO_BINARY}" ]]; then
|
||||||
echo "Expected the workaround for indirect tracing of static binaries to trigger, but the" \
|
echo "Expected the workaround for indirect tracing of static binaries to trigger, but the" \
|
||||||
"CODEQL_ACTION_GO_BINARY environment variable is not set."
|
"CODEQL_ACTION_GO_BINARY environment variable is not set."
|
||||||
|
|||||||
71
.github/workflows/__go-tracing-autobuilder.yml
generated
vendored
71
.github/workflows/__go-tracing-autobuilder.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Go: tracing with autobuilder step'
|
name: 'PR Check - Go: tracing with autobuilder step'
|
||||||
@@ -20,32 +20,25 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
go-tracing-autobuilder:
|
go-tracing-autobuilder:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.14.6
|
||||||
|
- os: macos-13
|
||||||
|
version: stable-v2.14.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.15.5
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.15.5
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.16.6
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.16.6
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.17.6
|
version: stable-v2.17.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -54,22 +47,6 @@ jobs:
|
|||||||
version: stable-v2.18.4
|
version: stable-v2.18.4
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.18.4
|
version: stable-v2.18.4
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.19.4
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.19.4
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.20.7
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.20.7
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.21.4
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.21.4
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.22.4
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.22.4
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -83,15 +60,19 @@ jobs:
|
|||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: 'Go: tracing with autobuilder step'
|
name: 'Go: tracing with autobuilder step'
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -99,10 +80,11 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
- uses: actions/setup-go@v5
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
with:
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
go-version: ~1.23.0
|
||||||
|
# to avoid potentially misleading autobuilder results where we expect it to download
|
||||||
|
# dependencies successfully, but they actually come from a warm cache
|
||||||
cache: false
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
@@ -110,7 +92,8 @@ jobs:
|
|||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- uses: ./../action/autobuild
|
- uses: ./../action/autobuild
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
- run: |
|
- shell: bash
|
||||||
|
run: |
|
||||||
if [[ "${CODEQL_ACTION_DID_AUTOBUILD_GOLANG}" != true ]]; then
|
if [[ "${CODEQL_ACTION_DID_AUTOBUILD_GOLANG}" != true ]]; then
|
||||||
echo "Expected the Go autobuilder to be run, but the" \
|
echo "Expected the Go autobuilder to be run, but the" \
|
||||||
"CODEQL_ACTION_DID_AUTOBUILD_GOLANG environment variable was not true."
|
"CODEQL_ACTION_DID_AUTOBUILD_GOLANG environment variable was not true."
|
||||||
|
|||||||
72
.github/workflows/__go-tracing-custom-build-steps.yml
generated
vendored
72
.github/workflows/__go-tracing-custom-build-steps.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Go: tracing with custom build steps'
|
name: 'PR Check - Go: tracing with custom build steps'
|
||||||
@@ -20,32 +20,25 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
go-tracing-custom-build-steps:
|
go-tracing-custom-build-steps:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.14.6
|
||||||
|
- os: macos-13
|
||||||
|
version: stable-v2.14.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.15.5
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.15.5
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.16.6
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.16.6
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.17.6
|
version: stable-v2.17.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -54,22 +47,6 @@ jobs:
|
|||||||
version: stable-v2.18.4
|
version: stable-v2.18.4
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.18.4
|
version: stable-v2.18.4
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.19.4
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.19.4
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.20.7
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.20.7
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.21.4
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.21.4
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.22.4
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.22.4
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -83,15 +60,19 @@ jobs:
|
|||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: 'Go: tracing with custom build steps'
|
name: 'Go: tracing with custom build steps'
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -99,19 +80,22 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
- uses: actions/setup-go@v5
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
with:
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
go-version: ~1.23.0
|
||||||
|
# to avoid potentially misleading autobuilder results where we expect it to download
|
||||||
|
# dependencies successfully, but they actually come from a warm cache
|
||||||
cache: false
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: go
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: go build main.go
|
run: go build main.go
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
- run: |
|
- shell: bash
|
||||||
|
run: |
|
||||||
# Once we start running Bash 4.2 in all environments, we can replace the
|
# Once we start running Bash 4.2 in all environments, we can replace the
|
||||||
# `! -z` flag with the more elegant `-v` which confirms that the variable
|
# `! -z` flag with the more elegant `-v` which confirms that the variable
|
||||||
# is actually unset and not potentially set to a blank value.
|
# is actually unset and not potentially set to a blank value.
|
||||||
|
|||||||
71
.github/workflows/__go-tracing-legacy-workflow.yml
generated
vendored
71
.github/workflows/__go-tracing-legacy-workflow.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Go: tracing with legacy workflow'
|
name: 'PR Check - Go: tracing with legacy workflow'
|
||||||
@@ -20,32 +20,25 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
go-tracing-legacy-workflow:
|
go-tracing-legacy-workflow:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.14.6
|
||||||
|
- os: macos-13
|
||||||
|
version: stable-v2.14.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.15.5
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.15.5
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.16.6
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.16.6
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.17.6
|
version: stable-v2.17.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -54,22 +47,6 @@ jobs:
|
|||||||
version: stable-v2.18.4
|
version: stable-v2.18.4
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.18.4
|
version: stable-v2.18.4
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.19.4
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.19.4
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.20.7
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.20.7
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.21.4
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.21.4
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.22.4
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.22.4
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -83,15 +60,19 @@ jobs:
|
|||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: 'Go: tracing with legacy workflow'
|
name: 'Go: tracing with legacy workflow'
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -99,17 +80,19 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
- uses: actions/setup-go@v5
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
with:
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
go-version: ~1.23.0
|
||||||
|
# to avoid potentially misleading autobuilder results where we expect it to download
|
||||||
|
# dependencies successfully, but they actually come from a warm cache
|
||||||
cache: false
|
cache: false
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: go
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
- run: |
|
- shell: bash
|
||||||
|
run: |
|
||||||
cd "$RUNNER_TEMP/codeql_databases"
|
cd "$RUNNER_TEMP/codeql_databases"
|
||||||
if [[ ! -d go ]]; then
|
if [[ ! -d go ]]; then
|
||||||
echo "Did not find a Go database"
|
echo "Did not find a Go database"
|
||||||
|
|||||||
80
.github/workflows/__go.yml
generated
vendored
80
.github/workflows/__go.yml
generated
vendored
@@ -1,80 +0,0 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
|
||||||
# pr-checks/sync.sh
|
|
||||||
# to regenerate this file.
|
|
||||||
|
|
||||||
name: Manual Check - go
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GO111MODULE: auto
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
jobs:
|
|
||||||
go-custom-queries:
|
|
||||||
name: 'Go: Custom queries'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
uses: ./.github/workflows/__go-custom-queries.yml
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version }}
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version }}
|
|
||||||
go-indirect-tracing-workaround-diagnostic:
|
|
||||||
name: 'Go: diagnostic when Go is changed after init step'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
uses: ./.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version }}
|
|
||||||
go-indirect-tracing-workaround-no-file-program:
|
|
||||||
name: 'Go: diagnostic when `file` is not installed'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
uses: ./.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version }}
|
|
||||||
go-indirect-tracing-workaround:
|
|
||||||
name: 'Go: workaround for indirect tracing'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
uses: ./.github/workflows/__go-indirect-tracing-workaround.yml
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version }}
|
|
||||||
go-tracing-autobuilder:
|
|
||||||
name: 'Go: tracing with autobuilder step'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
uses: ./.github/workflows/__go-tracing-autobuilder.yml
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version }}
|
|
||||||
go-tracing-custom-build-steps:
|
|
||||||
name: 'Go: tracing with custom build steps'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
uses: ./.github/workflows/__go-tracing-custom-build-steps.yml
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version }}
|
|
||||||
go-tracing-legacy-workflow:
|
|
||||||
name: 'Go: tracing with legacy workflow'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
uses: ./.github/workflows/__go-tracing-legacy-workflow.yml
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version }}
|
|
||||||
38
.github/workflows/__init-with-registries.yml
generated
vendored
38
.github/workflows/__init-with-registries.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Packaging: Download using registries'
|
name: 'PR Check - Packaging: Download using registries'
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
init-with-registries:
|
init-with-registries:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -38,12 +29,23 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
|
- os: macos-latest
|
||||||
|
version: default
|
||||||
|
- os: windows-latest
|
||||||
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: linked
|
version: linked
|
||||||
|
- os: macos-latest
|
||||||
|
version: linked
|
||||||
|
- os: windows-latest
|
||||||
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
|
- os: macos-latest
|
||||||
|
version: nightly-latest
|
||||||
|
- os: windows-latest
|
||||||
|
version: nightly-latest
|
||||||
name: 'Packaging: Download using registries'
|
name: 'Packaging: Download using registries'
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: read
|
packages: read
|
||||||
@@ -51,8 +53,13 @@ jobs:
|
|||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -73,6 +80,7 @@ jobs:
|
|||||||
token: "${{ secrets.GITHUB_TOKEN }}"
|
token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
|
||||||
- name: Verify packages installed
|
- name: Verify packages installed
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
PRIVATE_PACK="$HOME/.codeql/packages/codeql-testing/private-pack"
|
PRIVATE_PACK="$HOME/.codeql/packages/codeql-testing/private-pack"
|
||||||
CODEQL_PACK1="$HOME/.codeql/packages/codeql-testing/codeql-pack1"
|
CODEQL_PACK1="$HOME/.codeql/packages/codeql-testing/codeql-pack1"
|
||||||
@@ -94,6 +102,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Verify qlconfig.yml file was created
|
- name: Verify qlconfig.yml file was created
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
QLCONFIG_PATH=$RUNNER_TEMP/qlconfig.yml
|
QLCONFIG_PATH=$RUNNER_TEMP/qlconfig.yml
|
||||||
echo "Expected qlconfig.yml file to be created at $QLCONFIG_PATH"
|
echo "Expected qlconfig.yml file to be created at $QLCONFIG_PATH"
|
||||||
@@ -106,6 +115,9 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Verify contents of qlconfig.yml
|
- name: Verify contents of qlconfig.yml
|
||||||
|
# yq is not available on windows
|
||||||
|
if: runner.os != 'Windows'
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
QLCONFIG_PATH=$RUNNER_TEMP/qlconfig.yml
|
QLCONFIG_PATH=$RUNNER_TEMP/qlconfig.yml
|
||||||
cat $QLCONFIG_PATH | yq -e '.registries[] | select(.url == "https://ghcr.io/v2/") | select(.packages == "*/*")'
|
cat $QLCONFIG_PATH | yq -e '.registries[] | select(.url == "https://ghcr.io/v2/") | select(.packages == "*/*")'
|
||||||
|
|||||||
25
.github/workflows/__javascript-source-root.yml
generated
vendored
25
.github/workflows/__javascript-source-root.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Custom source root
|
name: PR Check - Custom source root
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
javascript-source-root:
|
javascript-source-root:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -43,15 +34,19 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Custom source root
|
name: Custom source root
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -60,6 +55,7 @@ jobs:
|
|||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Move codeql-action
|
- name: Move codeql-action
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir ../new-source-root
|
mkdir ../new-source-root
|
||||||
mv * ../new-source-root
|
mv * ../new-source-root
|
||||||
@@ -72,6 +68,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
skip-queries: true
|
skip-queries: true
|
||||||
- name: Assert database exists
|
- name: Assert database exists
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd "$RUNNER_TEMP/codeql_databases"
|
cd "$RUNNER_TEMP/codeql_databases"
|
||||||
if [[ ! -d javascript ]]; then
|
if [[ ! -d javascript ]]; then
|
||||||
|
|||||||
26
.github/workflows/__job-run-uuid-sarif.yml
generated
vendored
26
.github/workflows/__job-run-uuid-sarif.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Job run UUID added to SARIF
|
name: PR Check - Job run UUID added to SARIF
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
job-run-uuid-sarif:
|
job-run-uuid-sarif:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -39,15 +30,19 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Job run UUID added to SARIF
|
name: Job run UUID added to SARIF
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -64,12 +59,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
output: ${{ runner.temp }}/results
|
output: ${{ runner.temp }}/results
|
||||||
- name: Upload SARIF
|
- name: Upload SARIF
|
||||||
uses: actions/upload-artifact@v6
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.os }}-${{ matrix.version }}.sarif.json
|
name: ${{ matrix.os }}-${{ matrix.version }}.sarif.json
|
||||||
path: ${{ runner.temp }}/results/javascript.sarif
|
path: ${{ runner.temp }}/results/javascript.sarif
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
- name: Check results
|
- name: Check results
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd "$RUNNER_TEMP/results"
|
cd "$RUNNER_TEMP/results"
|
||||||
actual=$(jq -r '.runs[0].properties.jobRunUuid' javascript.sarif)
|
actual=$(jq -r '.runs[0].properties.jobRunUuid' javascript.sarif)
|
||||||
|
|||||||
23
.github/workflows/__language-aliases.yml
generated
vendored
23
.github/workflows/__language-aliases.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Language aliases
|
name: PR Check - Language aliases
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
language-aliases:
|
language-aliases:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -39,15 +30,19 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: linked
|
version: linked
|
||||||
name: Language aliases
|
name: Language aliases
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
115
.github/workflows/__local-bundle.yml
generated
vendored
115
.github/workflows/__local-bundle.yml
generated
vendored
@@ -1,115 +0,0 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
|
||||||
# pr-checks/sync.sh
|
|
||||||
# to regenerate this file.
|
|
||||||
|
|
||||||
name: PR Check - Local CodeQL bundle
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GO111MODULE: auto
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- releases/v*
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- ready_for_review
|
|
||||||
schedule:
|
|
||||||
- cron: '0 5 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
|
||||||
local-bundle:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: linked
|
|
||||||
name: Local CodeQL bundle
|
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
timeout-minutes: 45
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
- name: Prepare test
|
|
||||||
id: prepare-test
|
|
||||||
uses: ./.github/actions/prepare-test
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.version }}
|
|
||||||
use-all-platform-bundle: 'false'
|
|
||||||
setup-kotlin: 'true'
|
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
|
||||||
cache: false
|
|
||||||
- name: Install Python
|
|
||||||
if: matrix.version != 'nightly-latest'
|
|
||||||
uses: actions/setup-python@v6
|
|
||||||
with:
|
|
||||||
python-version: ${{ inputs.python-version || '3.13' }}
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- name: Fetch latest CodeQL bundle
|
|
||||||
run: |
|
|
||||||
wget https://github.com/github/codeql-action/releases/latest/download/codeql-bundle-linux64.tar.zst
|
|
||||||
- id: init
|
|
||||||
uses: ./../action/init
|
|
||||||
with:
|
|
||||||
# Swift is not supported on Ubuntu so we manually exclude it from the list here
|
|
||||||
languages: cpp,csharp,go,java,javascript,python,ruby
|
|
||||||
tools: ./codeql-bundle-linux64.tar.zst
|
|
||||||
- name: Build code
|
|
||||||
run: ./build.sh
|
|
||||||
- uses: ./../action/analyze
|
|
||||||
env:
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
118
.github/workflows/__multi-language-autodetect.yml
generated
vendored
118
.github/workflows/__multi-language-autodetect.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Multi-language repository
|
name: PR Check - Multi-language repository
|
||||||
@@ -20,52 +20,25 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
multi-language-autodetect:
|
multi-language-autodetect:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- os: macos-13
|
||||||
|
version: stable-v2.14.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.14.6
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.15.5
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.15.5
|
||||||
|
- os: macos-latest
|
||||||
|
version: stable-v2.16.6
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: stable-v2.16.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: stable-v2.17.6
|
version: stable-v2.17.6
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -74,22 +47,6 @@ jobs:
|
|||||||
version: stable-v2.18.4
|
version: stable-v2.18.4
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: stable-v2.18.4
|
version: stable-v2.18.4
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.19.4
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.19.4
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.20.7
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.20.7
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.21.4
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.21.4
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.22.4
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.22.4
|
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: default
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -103,15 +60,19 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Multi-language repository
|
name: Multi-language repository
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -119,33 +80,28 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
- uses: actions/setup-go@v5
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
with:
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
go-version: '>=1.21.0'
|
||||||
cache: false
|
|
||||||
- name: Install Python
|
|
||||||
if: matrix.version != 'nightly-latest'
|
|
||||||
uses: actions/setup-python@v6
|
|
||||||
with:
|
|
||||||
python-version: ${{ inputs.python-version || '3.13' }}
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- name: Use Xcode 16
|
|
||||||
if: runner.os == 'macOS' && matrix.version != 'nightly-latest'
|
|
||||||
run: sudo xcode-select -s "/Applications/Xcode_16.app"
|
|
||||||
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
db-location: ${{ runner.temp }}/customDbLocation
|
db-location: ${{ runner.temp }}/customDbLocation
|
||||||
languages: ${{ runner.os == 'Linux' && 'cpp,csharp,go,java,javascript,python,ruby'
|
# Swift is not supported on Ubuntu or codeql 2.14 so we manually exclude it from the list here
|
||||||
|| '' }}
|
languages: ${{ (runner.os == 'Linux' || (runner.os == 'macOS' && matrix.version
|
||||||
|
== 'stable-v2.14.6')) && 'cpp,csharp,go,java,javascript,python,ruby' ||
|
||||||
|
'' }}
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
|
- uses: ./../action/.github/actions/setup-swift
|
||||||
|
# Exclude macos on v2.14.6 since we can not longer run swift on ARM runners
|
||||||
|
if: runner.os == 'macOS' && matrix.version != 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
||||||
|
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
|
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
@@ -154,6 +110,7 @@ jobs:
|
|||||||
upload-database: false
|
upload-database: false
|
||||||
|
|
||||||
- name: Check language autodetect for all languages excluding Swift
|
- name: Check language autodetect for all languages excluding Swift
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
CPP_DB=${{ fromJson(steps.analysis.outputs.db-locations).cpp }}
|
CPP_DB=${{ fromJson(steps.analysis.outputs.db-locations).cpp }}
|
||||||
if [[ ! -d $CPP_DB ]] || [[ ! $CPP_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
|
if [[ ! -d $CPP_DB ]] || [[ ! $CPP_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
|
||||||
@@ -192,7 +149,9 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Check language autodetect for Swift on macOS
|
- name: Check language autodetect for Swift on macOS
|
||||||
if: runner.os == 'macOS'
|
# Exclude macos on v2.14.6 since we can not longer run swift on ARM runners
|
||||||
|
if: runner.os == 'macOS' && matrix.version != 'stable-v2.14.6'
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}
|
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}
|
||||||
if [[ ! -d $SWIFT_DB ]] || [[ ! $SWIFT_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
|
if [[ ! -d $SWIFT_DB ]] || [[ ! $SWIFT_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
|
||||||
@@ -200,5 +159,4 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
env:
|
env:
|
||||||
CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI: true
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
|
|||||||
78
.github/workflows/__overlay-init-fallback.yml
generated
vendored
78
.github/workflows/__overlay-init-fallback.yml
generated
vendored
@@ -1,78 +0,0 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
|
||||||
# pr-checks/sync.sh
|
|
||||||
# to regenerate this file.
|
|
||||||
|
|
||||||
name: PR Check - Overlay database init fallback
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GO111MODULE: auto
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- releases/v*
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- ready_for_review
|
|
||||||
schedule:
|
|
||||||
- cron: '0 5 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
|
||||||
overlay-init-fallback:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: linked
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: nightly-latest
|
|
||||||
name: Overlay database init fallback
|
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
timeout-minutes: 45
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
- name: Prepare test
|
|
||||||
id: prepare-test
|
|
||||||
uses: ./.github/actions/prepare-test
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.version }}
|
|
||||||
use-all-platform-bundle: 'false'
|
|
||||||
setup-kotlin: 'true'
|
|
||||||
- uses: ./../action/init
|
|
||||||
with:
|
|
||||||
languages: actions # Any language without overlay support will do
|
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
|
||||||
env:
|
|
||||||
CODEQL_OVERLAY_DATABASE_MODE: overlay-base
|
|
||||||
- uses: ./../action/analyze
|
|
||||||
id: analysis
|
|
||||||
with:
|
|
||||||
upload-database: false
|
|
||||||
- name: Check database
|
|
||||||
run: |
|
|
||||||
cd "$RUNNER_TEMP/codeql_databases/actions"
|
|
||||||
if ! grep -q 'overlayBaseDatabase: false' codeql-database.yml ; then
|
|
||||||
echo "This test needs to be updated to use a non-overlay language."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
88
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
88
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Packaging: Config and input passed to the CLI'
|
name: 'PR Check - Packaging: Config and input passed to the CLI'
|
||||||
@@ -20,46 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
packaging-codescanning-config-inputs-js:
|
packaging-codescanning-config-inputs-js:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -68,27 +29,36 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: linked
|
version: linked
|
||||||
|
- os: macos-latest
|
||||||
|
version: linked
|
||||||
|
- os: windows-latest
|
||||||
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
|
- os: macos-latest
|
||||||
|
version: default
|
||||||
|
- os: windows-latest
|
||||||
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
|
- os: macos-latest
|
||||||
|
version: nightly-latest
|
||||||
|
- os: windows-latest
|
||||||
|
version: nightly-latest
|
||||||
name: 'Packaging: Config and input passed to the CLI'
|
name: 'Packaging: Config and input passed to the CLI'
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Setup Python on macOS
|
||||||
uses: actions/checkout@v6
|
uses: actions/setup-python@v5
|
||||||
- name: Install Node.js
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
python-version: '3.11'
|
||||||
cache: npm
|
- name: Check out repository
|
||||||
- name: Install dependencies
|
uses: actions/checkout@v4
|
||||||
run: npm ci
|
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -96,20 +66,6 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
|
||||||
cache: false
|
|
||||||
- name: Install Python
|
|
||||||
if: matrix.version != 'nightly-latest'
|
|
||||||
uses: actions/setup-python@v6
|
|
||||||
with:
|
|
||||||
python-version: ${{ inputs.python-version || '3.13' }}
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
config-file: .github/codeql/codeql-config-packaging3.yml
|
config-file: .github/codeql/codeql-config-packaging3.yml
|
||||||
@@ -117,6 +73,7 @@ jobs:
|
|||||||
languages: javascript
|
languages: javascript
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
with:
|
||||||
@@ -132,6 +89,7 @@ jobs:
|
|||||||
queries-not-run: foo,bar
|
queries-not-run: foo,bar
|
||||||
|
|
||||||
- name: Assert Results
|
- name: Assert Results
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd "$RUNNER_TEMP/results"
|
cd "$RUNNER_TEMP/results"
|
||||||
# We should have 4 hits from these rules
|
# We should have 4 hits from these rules
|
||||||
|
|||||||
73
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
73
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Packaging: Config and input'
|
name: 'PR Check - Packaging: Config and input'
|
||||||
@@ -20,36 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
packaging-config-inputs-js:
|
packaging-config-inputs-js:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -58,27 +29,36 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: linked
|
version: linked
|
||||||
|
- os: macos-latest
|
||||||
|
version: linked
|
||||||
|
- os: windows-latest
|
||||||
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
|
- os: macos-latest
|
||||||
|
version: default
|
||||||
|
- os: windows-latest
|
||||||
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
|
- os: macos-latest
|
||||||
|
version: nightly-latest
|
||||||
|
- os: windows-latest
|
||||||
|
version: nightly-latest
|
||||||
name: 'Packaging: Config and input'
|
name: 'Packaging: Config and input'
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Setup Python on macOS
|
||||||
uses: actions/checkout@v6
|
uses: actions/setup-python@v5
|
||||||
- name: Install Node.js
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
python-version: '3.11'
|
||||||
cache: npm
|
- name: Check out repository
|
||||||
- name: Install dependencies
|
uses: actions/checkout@v4
|
||||||
run: npm ci
|
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -86,15 +66,6 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
|
||||||
cache: false
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
config-file: .github/codeql/codeql-config-packaging3.yml
|
config-file: .github/codeql/codeql-config-packaging3.yml
|
||||||
@@ -102,6 +73,7 @@ jobs:
|
|||||||
languages: javascript
|
languages: javascript
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
with:
|
||||||
@@ -117,6 +89,7 @@ jobs:
|
|||||||
queries-not-run: foo,bar
|
queries-not-run: foo,bar
|
||||||
|
|
||||||
- name: Assert Results
|
- name: Assert Results
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd "$RUNNER_TEMP/results"
|
cd "$RUNNER_TEMP/results"
|
||||||
# We should have 4 hits from these rules
|
# We should have 4 hits from these rules
|
||||||
|
|||||||
73
.github/workflows/__packaging-config-js.yml
generated
vendored
73
.github/workflows/__packaging-config-js.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Packaging: Config file'
|
name: 'PR Check - Packaging: Config file'
|
||||||
@@ -20,36 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
packaging-config-js:
|
packaging-config-js:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -58,27 +29,36 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: linked
|
version: linked
|
||||||
|
- os: macos-latest
|
||||||
|
version: linked
|
||||||
|
- os: windows-latest
|
||||||
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
|
- os: macos-latest
|
||||||
|
version: default
|
||||||
|
- os: windows-latest
|
||||||
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
|
- os: macos-latest
|
||||||
|
version: nightly-latest
|
||||||
|
- os: windows-latest
|
||||||
|
version: nightly-latest
|
||||||
name: 'Packaging: Config file'
|
name: 'Packaging: Config file'
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Setup Python on macOS
|
||||||
uses: actions/checkout@v6
|
uses: actions/setup-python@v5
|
||||||
- name: Install Node.js
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
python-version: '3.11'
|
||||||
cache: npm
|
- name: Check out repository
|
||||||
- name: Install dependencies
|
uses: actions/checkout@v4
|
||||||
run: npm ci
|
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -86,21 +66,13 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
|
||||||
cache: false
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
config-file: .github/codeql/codeql-config-packaging.yml
|
config-file: .github/codeql/codeql-config-packaging.yml
|
||||||
languages: javascript
|
languages: javascript
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
with:
|
||||||
@@ -116,6 +88,7 @@ jobs:
|
|||||||
queries-not-run: foo,bar
|
queries-not-run: foo,bar
|
||||||
|
|
||||||
- name: Assert Results
|
- name: Assert Results
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd "$RUNNER_TEMP/results"
|
cd "$RUNNER_TEMP/results"
|
||||||
# We should have 4 hits from these rules
|
# We should have 4 hits from these rules
|
||||||
|
|||||||
73
.github/workflows/__packaging-inputs-js.yml
generated
vendored
73
.github/workflows/__packaging-inputs-js.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: 'PR Check - Packaging: Action input'
|
name: 'PR Check - Packaging: Action input'
|
||||||
@@ -20,36 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
packaging-inputs-js:
|
packaging-inputs-js:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -58,27 +29,36 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: linked
|
version: linked
|
||||||
|
- os: macos-latest
|
||||||
|
version: linked
|
||||||
|
- os: windows-latest
|
||||||
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
|
- os: macos-latest
|
||||||
|
version: default
|
||||||
|
- os: windows-latest
|
||||||
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
|
- os: macos-latest
|
||||||
|
version: nightly-latest
|
||||||
|
- os: windows-latest
|
||||||
|
version: nightly-latest
|
||||||
name: 'Packaging: Action input'
|
name: 'Packaging: Action input'
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Setup Python on macOS
|
||||||
uses: actions/checkout@v6
|
uses: actions/setup-python@v5
|
||||||
- name: Install Node.js
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
uses: actions/setup-node@v6
|
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
python-version: '3.11'
|
||||||
cache: npm
|
- name: Check out repository
|
||||||
- name: Install dependencies
|
uses: actions/checkout@v4
|
||||||
run: npm ci
|
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -86,15 +66,6 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
|
||||||
cache: false
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
config-file: .github/codeql/codeql-config-packaging2.yml
|
config-file: .github/codeql/codeql-config-packaging2.yml
|
||||||
@@ -102,6 +73,7 @@ jobs:
|
|||||||
packs: codeql-testing/codeql-pack1@1.0.0, codeql-testing/codeql-pack2, codeql-testing/codeql-pack3:other-query.ql
|
packs: codeql-testing/codeql-pack1@1.0.0, codeql-testing/codeql-pack2, codeql-testing/codeql-pack3:other-query.ql
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
with:
|
||||||
@@ -116,6 +88,7 @@ jobs:
|
|||||||
queries-not-run: foo,bar
|
queries-not-run: foo,bar
|
||||||
|
|
||||||
- name: Assert Results
|
- name: Assert Results
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd "$RUNNER_TEMP/results"
|
cd "$RUNNER_TEMP/results"
|
||||||
# We should have 4 hits from these rules
|
# We should have 4 hits from these rules
|
||||||
|
|||||||
148
.github/workflows/__quality-queries.yml
generated
vendored
148
.github/workflows/__quality-queries.yml
generated
vendored
@@ -1,148 +0,0 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
|
||||||
# pr-checks/sync.sh
|
|
||||||
# to regenerate this file.
|
|
||||||
|
|
||||||
name: PR Check - Quality queries input
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GO111MODULE: auto
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- releases/v*
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- ready_for_review
|
|
||||||
schedule:
|
|
||||||
- cron: '0 5 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
|
||||||
quality-queries:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: linked
|
|
||||||
analysis-kinds: code-scanning
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: linked
|
|
||||||
analysis-kinds: code-quality
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: linked
|
|
||||||
analysis-kinds: code-scanning,code-quality
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: nightly-latest
|
|
||||||
analysis-kinds: code-scanning
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: nightly-latest
|
|
||||||
analysis-kinds: code-quality
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: nightly-latest
|
|
||||||
analysis-kinds: code-scanning,code-quality
|
|
||||||
name: Quality queries input
|
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
timeout-minutes: 45
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
- name: Prepare test
|
|
||||||
id: prepare-test
|
|
||||||
uses: ./.github/actions/prepare-test
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.version }}
|
|
||||||
use-all-platform-bundle: 'false'
|
|
||||||
setup-kotlin: 'true'
|
|
||||||
- uses: ./../action/init
|
|
||||||
with:
|
|
||||||
languages: javascript
|
|
||||||
analysis-kinds: ${{ matrix.analysis-kinds }}
|
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
|
||||||
- uses: ./../action/analyze
|
|
||||||
with:
|
|
||||||
output: ${{ runner.temp }}/results
|
|
||||||
upload-database: false
|
|
||||||
post-processed-sarif-path: ${{ runner.temp }}/post-processed
|
|
||||||
- name: Upload security SARIF
|
|
||||||
if: contains(matrix.analysis-kinds, 'code-scanning')
|
|
||||||
uses: actions/upload-artifact@v6
|
|
||||||
with:
|
|
||||||
name: |
|
|
||||||
quality-queries-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.analysis-kinds }}.sarif.json
|
|
||||||
path: ${{ runner.temp }}/results/javascript.sarif
|
|
||||||
retention-days: 7
|
|
||||||
- name: Upload quality SARIF
|
|
||||||
if: contains(matrix.analysis-kinds, 'code-quality')
|
|
||||||
uses: actions/upload-artifact@v6
|
|
||||||
with:
|
|
||||||
name: |
|
|
||||||
quality-queries-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.analysis-kinds }}.quality.sarif.json
|
|
||||||
path: ${{ runner.temp }}/results/javascript.quality.sarif
|
|
||||||
retention-days: 7
|
|
||||||
- name: Upload post-processed SARIF
|
|
||||||
uses: actions/upload-artifact@v6
|
|
||||||
with:
|
|
||||||
name: |
|
|
||||||
post-processed-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.analysis-kinds }}.sarif.json
|
|
||||||
path: ${{ runner.temp }}/post-processed
|
|
||||||
retention-days: 7
|
|
||||||
if-no-files-found: error
|
|
||||||
- name: Check quality query does not appear in security SARIF
|
|
||||||
if: contains(matrix.analysis-kinds, 'code-scanning')
|
|
||||||
uses: actions/github-script@v8
|
|
||||||
env:
|
|
||||||
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
|
|
||||||
EXPECT_PRESENT: 'false'
|
|
||||||
with:
|
|
||||||
script: ${{ env.CHECK_SCRIPT }}
|
|
||||||
- name: Check quality query appears in quality SARIF
|
|
||||||
if: contains(matrix.analysis-kinds, 'code-quality')
|
|
||||||
uses: actions/github-script@v8
|
|
||||||
env:
|
|
||||||
SARIF_PATH: ${{ runner.temp }}/results/javascript.quality.sarif
|
|
||||||
EXPECT_PRESENT: 'true'
|
|
||||||
with:
|
|
||||||
script: ${{ env.CHECK_SCRIPT }}
|
|
||||||
env:
|
|
||||||
CHECK_SCRIPT: |
|
|
||||||
const fs = require('fs');
|
|
||||||
|
|
||||||
const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));
|
|
||||||
const expectPresent = JSON.parse(process.env['EXPECT_PRESENT']);
|
|
||||||
const run = sarif.runs[0];
|
|
||||||
const extensions = run.tool.extensions;
|
|
||||||
|
|
||||||
if (extensions === undefined) {
|
|
||||||
core.setFailed('`extensions` property not found in the SARIF run property bag.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ID of a query we want to check the presence for
|
|
||||||
const targetId = 'js/regex/always-matches';
|
|
||||||
const found = extensions.find(extension => extension.rules && extension.rules.find(rule => rule.id === targetId));
|
|
||||||
|
|
||||||
if (found && expectPresent) {
|
|
||||||
console.log(`Found rule with id '${targetId}'.`);
|
|
||||||
} else if (!found && !expectPresent) {
|
|
||||||
console.log(`Rule with id '${targetId}' was not found.`);
|
|
||||||
} else {
|
|
||||||
core.setFailed(`${ found ? "Found" : "Didn't find" } rule ${targetId}`);
|
|
||||||
}
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
68
.github/workflows/__remote-config.yml
generated
vendored
68
.github/workflows/__remote-config.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Remote config file
|
name: PR Check - Remote config file
|
||||||
@@ -20,46 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
remote-config:
|
remote-config:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -71,15 +32,19 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Remote config file
|
name: Remote config file
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -87,20 +52,6 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
|
||||||
cache: false
|
|
||||||
- name: Install Python
|
|
||||||
if: matrix.version != 'nightly-latest'
|
|
||||||
uses: actions/setup-python@v6
|
|
||||||
with:
|
|
||||||
python-version: ${{ inputs.python-version || '3.13' }}
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
@@ -108,6 +59,7 @@ jobs:
|
|||||||
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
|
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
|
||||||
github.sha }}
|
github.sha }}
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
env:
|
env:
|
||||||
|
|||||||
35
.github/workflows/__resolve-environment-action.yml
generated
vendored
35
.github/workflows/__resolve-environment-action.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Resolve environment
|
name: PR Check - Resolve environment
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
resolve-environment-action:
|
resolve-environment-action:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -38,20 +29,36 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
|
- os: macos-latest
|
||||||
|
version: default
|
||||||
|
- os: windows-latest
|
||||||
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: linked
|
version: linked
|
||||||
|
- os: macos-latest
|
||||||
|
version: linked
|
||||||
|
- os: windows-latest
|
||||||
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
|
- os: macos-latest
|
||||||
|
version: nightly-latest
|
||||||
|
- os: windows-latest
|
||||||
|
version: nightly-latest
|
||||||
name: Resolve environment
|
name: Resolve environment
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
28
.github/workflows/__rubocop-multi-language.yml
generated
vendored
28
.github/workflows/__rubocop-multi-language.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - RuboCop multi-language
|
name: PR Check - RuboCop multi-language
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
rubocop-multi-language:
|
rubocop-multi-language:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -39,15 +30,19 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
name: RuboCop multi-language
|
name: RuboCop multi-language
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -56,14 +51,17 @@ jobs:
|
|||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
uses: ruby/setup-ruby@ac793fdd38cc468a4dd57246fa9d0e868aba9085 # v1.270.0
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: 2.6
|
ruby-version: 2.6
|
||||||
- name: Install Code Scanning integration
|
- name: Install Code Scanning integration
|
||||||
|
shell: bash
|
||||||
run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install
|
run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
shell: bash
|
||||||
run: bundle install
|
run: bundle install
|
||||||
- name: RuboCop run
|
- name: RuboCop run
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
bash -c "
|
bash -c "
|
||||||
bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif
|
bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif
|
||||||
|
|||||||
24
.github/workflows/__ruby.yml
generated
vendored
24
.github/workflows/__ruby.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Ruby analysis
|
name: PR Check - Ruby analysis
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
ruby:
|
ruby:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -49,15 +40,19 @@ jobs:
|
|||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Ruby analysis
|
name: Ruby analysis
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -74,6 +69,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
upload-database: false
|
upload-database: false
|
||||||
- name: Check database
|
- name: Check database
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
RUBY_DB="${{ fromJson(steps.analysis.outputs.db-locations).ruby }}"
|
RUBY_DB="${{ fromJson(steps.analysis.outputs.db-locations).ruby }}"
|
||||||
if [[ ! -d "$RUBY_DB" ]]; then
|
if [[ ! -d "$RUBY_DB" ]]; then
|
||||||
|
|||||||
82
.github/workflows/__rust.yml
generated
vendored
82
.github/workflows/__rust.yml
generated
vendored
@@ -1,82 +0,0 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
|
||||||
# pr-checks/sync.sh
|
|
||||||
# to regenerate this file.
|
|
||||||
|
|
||||||
name: PR Check - Rust analysis
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GO111MODULE: auto
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- releases/v*
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- ready_for_review
|
|
||||||
schedule:
|
|
||||||
- cron: '0 5 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
|
||||||
rust:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.19.3
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: stable-v2.22.1
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: linked
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: default
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: nightly-latest
|
|
||||||
name: Rust analysis
|
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
timeout-minutes: 45
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
- name: Prepare test
|
|
||||||
id: prepare-test
|
|
||||||
uses: ./.github/actions/prepare-test
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.version }}
|
|
||||||
use-all-platform-bundle: 'false'
|
|
||||||
setup-kotlin: 'true'
|
|
||||||
- uses: ./../action/init
|
|
||||||
with:
|
|
||||||
languages: rust
|
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
|
||||||
- uses: ./../action/analyze
|
|
||||||
id: analysis
|
|
||||||
with:
|
|
||||||
upload-database: false
|
|
||||||
- name: Check database
|
|
||||||
run: |
|
|
||||||
RUST_DB="${{ fromJson(steps.analysis.outputs.db-locations).rust }}"
|
|
||||||
if [[ ! -d "$RUST_DB" ]]; then
|
|
||||||
echo "Did not create a database for Rust."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
55
.github/workflows/__split-workflow.yml
generated
vendored
55
.github/workflows/__split-workflow.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Split workflow
|
name: PR Check - Split workflow
|
||||||
@@ -20,36 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
split-workflow:
|
split-workflow:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -69,15 +40,19 @@ jobs:
|
|||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Split workflow
|
name: Split workflow
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -85,15 +60,6 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
|
||||||
cache: false
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
config-file: .github/codeql/codeql-config-packaging3.yml
|
config-file: .github/codeql/codeql-config-packaging3.yml
|
||||||
@@ -101,6 +67,7 @@ jobs:
|
|||||||
languages: javascript
|
languages: javascript
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
with:
|
with:
|
||||||
@@ -109,6 +76,7 @@ jobs:
|
|||||||
upload-database: false
|
upload-database: false
|
||||||
|
|
||||||
- name: Assert No Results
|
- name: Assert No Results
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ "$(ls -A $RUNNER_TEMP/results)" ]; then
|
if [ "$(ls -A $RUNNER_TEMP/results)" ]; then
|
||||||
echo "Expected results directory to be empty after skipping query execution!"
|
echo "Expected results directory to be empty after skipping query execution!"
|
||||||
@@ -119,6 +87,7 @@ jobs:
|
|||||||
output: ${{ runner.temp }}/results
|
output: ${{ runner.temp }}/results
|
||||||
upload-database: false
|
upload-database: false
|
||||||
- name: Assert Results
|
- name: Assert Results
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd "$RUNNER_TEMP/results"
|
cd "$RUNNER_TEMP/results"
|
||||||
# We should have 4 hits from these rules
|
# We should have 4 hits from these rules
|
||||||
|
|||||||
85
.github/workflows/__start-proxy.yml
generated
vendored
85
.github/workflows/__start-proxy.yml
generated
vendored
@@ -1,85 +0,0 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
|
||||||
# pr-checks/sync.sh
|
|
||||||
# to regenerate this file.
|
|
||||||
|
|
||||||
name: PR Check - Start proxy
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GO111MODULE: auto
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- releases/v*
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- ready_for_review
|
|
||||||
schedule:
|
|
||||||
- cron: '0 5 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
|
||||||
start-proxy:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: linked
|
|
||||||
- os: macos-latest
|
|
||||||
version: linked
|
|
||||||
- os: windows-latest
|
|
||||||
version: linked
|
|
||||||
name: Start proxy
|
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
timeout-minutes: 45
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
- name: Prepare test
|
|
||||||
id: prepare-test
|
|
||||||
uses: ./.github/actions/prepare-test
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.version }}
|
|
||||||
use-all-platform-bundle: 'false'
|
|
||||||
setup-kotlin: 'true'
|
|
||||||
- uses: ./../action/init
|
|
||||||
with:
|
|
||||||
languages: csharp
|
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
|
||||||
|
|
||||||
- name: Setup proxy for registries
|
|
||||||
id: proxy
|
|
||||||
uses: ./../action/start-proxy
|
|
||||||
with:
|
|
||||||
registry_secrets: '[{ "type": "nuget_feed", "url": "https://api.nuget.org/v3/index.json"
|
|
||||||
}]'
|
|
||||||
|
|
||||||
- name: Print proxy outputs
|
|
||||||
run: |
|
|
||||||
echo "${{ steps.proxy.outputs.proxy_host }}"
|
|
||||||
echo "${{ steps.proxy.outputs.proxy_port }}"
|
|
||||||
echo "${{ steps.proxy.outputs.proxy_urls }}"
|
|
||||||
|
|
||||||
- name: Fail if proxy outputs are not set
|
|
||||||
if: (!steps.proxy.outputs.proxy_host) || (!steps.proxy.outputs.proxy_port)
|
|
||||||
|| (!steps.proxy.outputs.proxy_ca_certificate) || (!steps.proxy.outputs.proxy_urls)
|
|
||||||
run: exit 1
|
|
||||||
env:
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
26
.github/workflows/__submit-sarif-failure.yml
generated
vendored
26
.github/workflows/__submit-sarif-failure.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Submit SARIF after failure
|
name: PR Check - Submit SARIF after failure
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
submit-sarif-failure:
|
submit-sarif-failure:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -43,16 +34,19 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Submit SARIF after failure
|
name: Submit SARIF after failure
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: write # needed to upload the SARIF file
|
security-events: write
|
||||||
|
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -60,7 +54,7 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- uses: ./init
|
- uses: ./init
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
|
|||||||
28
.github/workflows/__swift-autobuild.yml
generated
vendored
28
.github/workflows/__swift-autobuild.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Swift analysis using autobuild
|
name: PR Check - Swift analysis using autobuild
|
||||||
@@ -20,16 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs: {}
|
|
||||||
workflow_call:
|
|
||||||
inputs: {}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
swift-autobuild:
|
swift-autobuild:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -39,15 +30,19 @@ jobs:
|
|||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Swift analysis using autobuild
|
name: Swift analysis using autobuild
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -61,7 +56,11 @@ jobs:
|
|||||||
languages: swift
|
languages: swift
|
||||||
build-mode: autobuild
|
build-mode: autobuild
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
- uses: ./../action/.github/actions/setup-swift
|
||||||
|
with:
|
||||||
|
codeql-path: ${{steps.init.outputs.codeql-path}}
|
||||||
- name: Check working directory
|
- name: Check working directory
|
||||||
|
shell: bash
|
||||||
run: pwd
|
run: pwd
|
||||||
- uses: ./../action/autobuild
|
- uses: ./../action/autobuild
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
@@ -70,6 +69,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
upload-database: false
|
upload-database: false
|
||||||
- name: Check database
|
- name: Check database
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
SWIFT_DB="${{ fromJson(steps.analysis.outputs.db-locations).swift }}"
|
SWIFT_DB="${{ fromJson(steps.analysis.outputs.db-locations).swift }}"
|
||||||
if [[ ! -d "$SWIFT_DB" ]]; then
|
if [[ ! -d "$SWIFT_DB" ]]; then
|
||||||
|
|||||||
61
.github/workflows/__swift-custom-build.yml
generated
vendored
61
.github/workflows/__swift-custom-build.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Swift analysis using a custom build command
|
name: PR Check - Swift analysis using a custom build command
|
||||||
@@ -20,36 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
swift-custom-build:
|
swift-custom-build:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -63,15 +34,19 @@ jobs:
|
|||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Swift analysis using a custom build command
|
name: Swift analysis using a custom build command
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -79,32 +54,26 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
|
||||||
cache: false
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- name: Use Xcode 16
|
|
||||||
if: runner.os == 'macOS' && matrix.version != 'nightly-latest'
|
|
||||||
run: sudo xcode-select -s "/Applications/Xcode_16.app"
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
languages: swift
|
languages: swift
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
- uses: ./../action/.github/actions/setup-swift
|
||||||
|
with:
|
||||||
|
codeql-path: ${{steps.init.outputs.codeql-path}}
|
||||||
- name: Check working directory
|
- name: Check working directory
|
||||||
|
shell: bash
|
||||||
run: pwd
|
run: pwd
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
id: analysis
|
id: analysis
|
||||||
with:
|
with:
|
||||||
upload-database: false
|
upload-database: false
|
||||||
- name: Check database
|
- name: Check database
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
SWIFT_DB="${{ fromJson(steps.analysis.outputs.db-locations).swift }}"
|
SWIFT_DB="${{ fromJson(steps.analysis.outputs.db-locations).swift }}"
|
||||||
if [[ ! -d "$SWIFT_DB" ]]; then
|
if [[ ! -d "$SWIFT_DB" ]]; then
|
||||||
|
|||||||
77
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
Normal file
77
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
|
# to regenerate this file.
|
||||||
|
|
||||||
|
name: PR Check - Autobuild working directory
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
test-autobuild-working-dir:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: linked
|
||||||
|
name: Autobuild working directory
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Prepare test
|
||||||
|
id: prepare-test
|
||||||
|
uses: ./.github/actions/prepare-test
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
use-all-platform-bundle: 'false'
|
||||||
|
setup-kotlin: 'true'
|
||||||
|
- name: Test setup
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
# Make sure that Gradle build succeeds in autobuild-dir ...
|
||||||
|
cp -a ../action/tests/java-repo autobuild-dir
|
||||||
|
# ... and fails if attempted in the current directory
|
||||||
|
echo > build.gradle
|
||||||
|
- uses: ./../action/init
|
||||||
|
with:
|
||||||
|
languages: java
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
- uses: ./../action/autobuild
|
||||||
|
with:
|
||||||
|
working-directory: autobuild-dir
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
- name: Check database
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd "$RUNNER_TEMP/codeql_databases"
|
||||||
|
if [[ ! -d java ]]; then
|
||||||
|
echo "Did not find a Java database"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
70
.github/workflows/__test-local-codeql.yml
generated
vendored
Normal file
70
.github/workflows/__test-local-codeql.yml
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
|
# to regenerate this file.
|
||||||
|
|
||||||
|
name: PR Check - Local CodeQL bundle
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
test-local-codeql:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: nightly-latest
|
||||||
|
name: Local CodeQL bundle
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Prepare test
|
||||||
|
id: prepare-test
|
||||||
|
uses: ./.github/actions/prepare-test
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
use-all-platform-bundle: 'false'
|
||||||
|
setup-kotlin: 'true'
|
||||||
|
- name: Fetch a CodeQL bundle
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
CODEQL_URL: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
run: |
|
||||||
|
wget "$CODEQL_URL"
|
||||||
|
- id: init
|
||||||
|
uses: ./../action/init
|
||||||
|
with:
|
||||||
|
# Swift is not supported on Ubuntu so we manually exclude it from the list here
|
||||||
|
languages: cpp,csharp,go,java,javascript,python,ruby
|
||||||
|
tools: ./codeql-bundle-linux64.tar.zst
|
||||||
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
|
run: ./build.sh
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
68
.github/workflows/__test-proxy.yml
generated
vendored
Normal file
68
.github/workflows/__test-proxy.yml
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
|
# to regenerate this file.
|
||||||
|
|
||||||
|
name: PR Check - Proxy test
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
test-proxy:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: linked
|
||||||
|
name: Proxy test
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Prepare test
|
||||||
|
id: prepare-test
|
||||||
|
uses: ./.github/actions/prepare-test
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
use-all-platform-bundle: 'false'
|
||||||
|
setup-kotlin: 'false'
|
||||||
|
- uses: ./../action/init
|
||||||
|
with:
|
||||||
|
languages: javascript
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
env:
|
||||||
|
https_proxy: http://squid-proxy:3128
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
|
container:
|
||||||
|
image: ubuntu:22.04
|
||||||
|
options: --dns 127.0.0.1
|
||||||
|
services:
|
||||||
|
squid-proxy:
|
||||||
|
image: ubuntu/squid:latest
|
||||||
|
ports:
|
||||||
|
- 3128:3128
|
||||||
74
.github/workflows/__unset-environment.yml
generated
vendored
74
.github/workflows/__unset-environment.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Test unsetting environment variables
|
name: PR Check - Test unsetting environment variables
|
||||||
@@ -20,46 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
unset-environment:
|
unset-environment:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -71,15 +32,19 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Test unsetting environment variables
|
name: Test unsetting environment variables
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -87,20 +52,6 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
|
||||||
cache: false
|
|
||||||
- name: Install Python
|
|
||||||
if: matrix.version != 'nightly-latest'
|
|
||||||
uses: actions/setup-python@v6
|
|
||||||
with:
|
|
||||||
python-version: ${{ inputs.python-version || '3.13' }}
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
@@ -108,13 +59,18 @@ jobs:
|
|||||||
# Swift is not supported on Ubuntu so we manually exclude it from the list here
|
# Swift is not supported on Ubuntu so we manually exclude it from the list here
|
||||||
languages: cpp,csharp,go,java,javascript,python,ruby
|
languages: cpp,csharp,go,java,javascript,python,ruby
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: env -i PATH="$PATH" HOME="$HOME" ./build.sh
|
run: env -i PATH="$PATH" HOME="$HOME" ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
id: analysis
|
id: analysis
|
||||||
with:
|
with:
|
||||||
upload-database: false
|
upload-database: false
|
||||||
- run: |
|
- shell: bash
|
||||||
|
run: |
|
||||||
CPP_DB="${{ fromJson(steps.analysis.outputs.db-locations).cpp }}"
|
CPP_DB="${{ fromJson(steps.analysis.outputs.db-locations).cpp }}"
|
||||||
if [[ ! -d "$CPP_DB" ]] || [[ ! "$CPP_DB" == "${RUNNER_TEMP}/customDbLocation/cpp" ]]; then
|
if [[ ! -d "$CPP_DB" ]] || [[ ! "$CPP_DB" == "${RUNNER_TEMP}/customDbLocation/cpp" ]]; then
|
||||||
echo "::error::Did not create a database for CPP, or created it in the wrong location." \
|
echo "::error::Did not create a database for CPP, or created it in the wrong location." \
|
||||||
|
|||||||
72
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
72
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: "PR Check - Upload-sarif: 'ref' and 'sha' from inputs"
|
name: "PR Check - Upload-sarif: 'ref' and 'sha' from inputs"
|
||||||
@@ -20,46 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
upload-ref-sha-input:
|
upload-ref-sha-input:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -68,16 +29,24 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
|
- os: macos-latest
|
||||||
|
version: default
|
||||||
|
- os: windows-latest
|
||||||
|
version: default
|
||||||
name: "Upload-sarif: 'ref' and 'sha' from inputs"
|
name: "Upload-sarif: 'ref' and 'sha' from inputs"
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -85,20 +54,6 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
|
||||||
cache: false
|
|
||||||
- name: Install Python
|
|
||||||
if: matrix.version != 'nightly-latest'
|
|
||||||
uses: actions/setup-python@v6
|
|
||||||
with:
|
|
||||||
python-version: ${{ inputs.python-version || '3.13' }}
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
@@ -106,6 +61,7 @@ jobs:
|
|||||||
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
|
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
|
||||||
github.sha }}
|
github.sha }}
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
# Generate some SARIF we can upload with the upload-sarif step
|
# Generate some SARIF we can upload with the upload-sarif step
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
|
|||||||
187
.github/workflows/__upload-sarif.yml
generated
vendored
187
.github/workflows/__upload-sarif.yml
generated
vendored
@@ -1,187 +0,0 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
|
||||||
# pr-checks/sync.sh
|
|
||||||
# to regenerate this file.
|
|
||||||
|
|
||||||
name: PR Check - Test different uses of `upload-sarif`
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GO111MODULE: auto
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- releases/v*
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- ready_for_review
|
|
||||||
schedule:
|
|
||||||
- cron: '0 5 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
|
||||||
upload-sarif:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: default
|
|
||||||
analysis-kinds: code-scanning
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: default
|
|
||||||
analysis-kinds: code-quality
|
|
||||||
- os: ubuntu-latest
|
|
||||||
version: default
|
|
||||||
analysis-kinds: code-scanning,code-quality
|
|
||||||
name: Test different uses of `upload-sarif`
|
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: read
|
|
||||||
timeout-minutes: 45
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
- name: Prepare test
|
|
||||||
id: prepare-test
|
|
||||||
uses: ./.github/actions/prepare-test
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.version }}
|
|
||||||
use-all-platform-bundle: 'false'
|
|
||||||
setup-kotlin: 'true'
|
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
|
||||||
cache: false
|
|
||||||
- name: Install Python
|
|
||||||
if: matrix.version != 'nightly-latest'
|
|
||||||
uses: actions/setup-python@v6
|
|
||||||
with:
|
|
||||||
python-version: ${{ inputs.python-version || '3.13' }}
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- uses: ./../action/init
|
|
||||||
with:
|
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
|
||||||
languages: csharp,java,javascript,python
|
|
||||||
analysis-kinds: ${{ matrix.analysis-kinds }}
|
|
||||||
- name: Build code
|
|
||||||
run: ./build.sh
|
|
||||||
# Generate some SARIF we can upload with the upload-sarif step
|
|
||||||
- uses: ./../action/analyze
|
|
||||||
with:
|
|
||||||
ref: refs/heads/main
|
|
||||||
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
|
|
||||||
upload: never
|
|
||||||
output: ${{ runner.temp }}/results
|
|
||||||
|
|
||||||
- name: |
|
|
||||||
Upload all SARIF files for `analysis-kinds: ${{ matrix.analysis-kinds }}`
|
|
||||||
uses: ./../action/upload-sarif
|
|
||||||
id: upload-sarif
|
|
||||||
with:
|
|
||||||
ref: refs/heads/main
|
|
||||||
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
|
|
||||||
sarif_file: ${{ runner.temp }}/results
|
|
||||||
category: |
|
|
||||||
${{ github.workflow }}:upload-sarif/analysis-kinds:${{ matrix.analysis-kinds }}/os:${{ matrix.os }}/version:${{ matrix.version }}/test:all-files/
|
|
||||||
- name: Fail for missing output from `upload-sarif` step for `code-scanning`
|
|
||||||
if: contains(matrix.analysis-kinds, 'code-scanning') && !(fromJSON(steps.upload-sarif.outputs.sarif-ids).code-scanning)
|
|
||||||
run: exit 1
|
|
||||||
- name: Fail for missing output from `upload-sarif` step for `code-quality`
|
|
||||||
if: contains(matrix.analysis-kinds, 'code-quality') && !(fromJSON(steps.upload-sarif.outputs.sarif-ids).code-quality)
|
|
||||||
run: exit 1
|
|
||||||
|
|
||||||
- name: Upload single SARIF file for Code Scanning
|
|
||||||
uses: ./../action/upload-sarif
|
|
||||||
id: upload-single-sarif-code-scanning
|
|
||||||
if: contains(matrix.analysis-kinds, 'code-scanning')
|
|
||||||
with:
|
|
||||||
ref: refs/heads/main
|
|
||||||
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
|
|
||||||
sarif_file: ${{ runner.temp }}/results/javascript.sarif
|
|
||||||
category: |
|
|
||||||
${{ github.workflow }}:upload-sarif/analysis-kinds:${{ matrix.analysis-kinds }}/os:${{ matrix.os }}/version:${{ matrix.version }}/test:single-code-scanning/
|
|
||||||
- name: Fail for missing output from `upload-single-sarif-code-scanning` step
|
|
||||||
if: contains(matrix.analysis-kinds, 'code-scanning') &&
|
|
||||||
!(fromJSON(steps.upload-single-sarif-code-scanning.outputs.sarif-ids).code-scanning)
|
|
||||||
run: exit 1
|
|
||||||
- name: Upload single SARIF file for Code Quality
|
|
||||||
uses: ./../action/upload-sarif
|
|
||||||
id: upload-single-sarif-code-quality
|
|
||||||
if: contains(matrix.analysis-kinds, 'code-quality')
|
|
||||||
with:
|
|
||||||
ref: refs/heads/main
|
|
||||||
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
|
|
||||||
sarif_file: ${{ runner.temp }}/results/javascript.quality.sarif
|
|
||||||
category: |
|
|
||||||
${{ github.workflow }}:upload-sarif/analysis-kinds:${{ matrix.analysis-kinds }}/os:${{ matrix.os }}/version:${{ matrix.version }}/test:single-code-quality/
|
|
||||||
- name: Fail for missing output from `upload-single-sarif-code-quality` step
|
|
||||||
if: contains(matrix.analysis-kinds, 'code-quality') &&
|
|
||||||
!(fromJSON(steps.upload-single-sarif-code-quality.outputs.sarif-ids).code-quality)
|
|
||||||
run: exit 1
|
|
||||||
|
|
||||||
- name: Change SARIF file extension
|
|
||||||
if: contains(matrix.analysis-kinds, 'code-scanning')
|
|
||||||
run: mv ${{ runner.temp }}/results/javascript.sarif ${{ runner.temp }}/results/javascript.sarif.json
|
|
||||||
- name: Upload single non-`.sarif` file
|
|
||||||
uses: ./../action/upload-sarif
|
|
||||||
id: upload-single-non-sarif
|
|
||||||
if: contains(matrix.analysis-kinds, 'code-scanning')
|
|
||||||
with:
|
|
||||||
ref: refs/heads/main
|
|
||||||
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
|
|
||||||
sarif_file: ${{ runner.temp }}/results/javascript.sarif.json
|
|
||||||
category: |
|
|
||||||
${{ github.workflow }}:upload-sarif/analysis-kinds:${{ matrix.analysis-kinds }}/os:${{ matrix.os }}/version:${{ matrix.version }}/test:non-sarif/
|
|
||||||
- name: Fail for missing output from `upload-single-non-sarif` step
|
|
||||||
if: contains(matrix.analysis-kinds, 'code-scanning') && !(fromJSON(steps.upload-single-non-sarif.outputs.sarif-ids).code-scanning)
|
|
||||||
run: exit 1
|
|
||||||
env:
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
89
.github/workflows/__with-checkout-path.yml
generated
vendored
89
.github/workflows/__with-checkout-path.yml
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Warning: This file is generated automatically, and should not be modified.
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
# Instead, please modify the template in the pr-checks directory and run:
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
# pr-checks/sync.sh
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
# to regenerate this file.
|
# to regenerate this file.
|
||||||
|
|
||||||
name: PR Check - Use a custom `checkout_path`
|
name: PR Check - Use a custom `checkout_path`
|
||||||
@@ -20,46 +20,7 @@ on:
|
|||||||
- ready_for_review
|
- ready_for_review
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch: {}
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
go-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Go to install
|
|
||||||
required: false
|
|
||||||
default: '>=1.21.0'
|
|
||||||
python-version:
|
|
||||||
type: string
|
|
||||||
description: The version of Python to install
|
|
||||||
required: false
|
|
||||||
default: '3.13'
|
|
||||||
dotnet-version:
|
|
||||||
type: string
|
|
||||||
description: The version of .NET to install
|
|
||||||
required: false
|
|
||||||
default: 9.x
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
concurrency:
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
jobs:
|
jobs:
|
||||||
with-checkout-path:
|
with-checkout-path:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -68,16 +29,24 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: linked
|
version: linked
|
||||||
|
- os: macos-latest
|
||||||
|
version: linked
|
||||||
|
- os: windows-latest
|
||||||
|
version: linked
|
||||||
name: Use a custom `checkout_path`
|
name: Use a custom `checkout_path`
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: read
|
security-events: write
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
@@ -85,21 +54,8 @@ jobs:
|
|||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'true'
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ${{ inputs.go-version || '>=1.21.0' }}
|
|
||||||
cache: false
|
|
||||||
- name: Install Python
|
|
||||||
if: matrix.version != 'nightly-latest'
|
|
||||||
uses: actions/setup-python@v6
|
|
||||||
with:
|
|
||||||
python-version: ${{ inputs.python-version || '3.13' }}
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
|
||||||
- name: Delete original checkout
|
- name: Delete original checkout
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# delete the original checkout so we don't accidentally use it.
|
# delete the original checkout so we don't accidentally use it.
|
||||||
# Actions does not support deleting the current working directory, so we
|
# Actions does not support deleting the current working directory, so we
|
||||||
@@ -107,7 +63,7 @@ jobs:
|
|||||||
rm -rf ./* .github .git
|
rm -rf ./* .github .git
|
||||||
# Check out the actions repo again, but at a different location.
|
# Check out the actions repo again, but at a different location.
|
||||||
# choose an arbitrary SHA so that we can later test that the commit_oid is not from main
|
# choose an arbitrary SHA so that we can later test that the commit_oid is not from main
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
|
ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
|
||||||
path: x/y/z/some-path
|
path: x/y/z/some-path
|
||||||
@@ -120,6 +76,7 @@ jobs:
|
|||||||
source-root: x/y/z/some-path/tests/multi-language-repo
|
source-root: x/y/z/some-path/tests/multi-language-repo
|
||||||
|
|
||||||
- name: Build code
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
working-directory: x/y/z/some-path/tests/multi-language-repo
|
working-directory: x/y/z/some-path/tests/multi-language-repo
|
||||||
run: |
|
run: |
|
||||||
./build.sh
|
./build.sh
|
||||||
@@ -131,31 +88,31 @@ jobs:
|
|||||||
sha: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
|
sha: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
|
||||||
|
|
||||||
- name: Verify SARIF after upload
|
- name: Verify SARIF after upload
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
PAYLOAD_FILE="$RUNNER_TEMP/payload-code-scanning.json"
|
|
||||||
EXPECTED_COMMIT_OID="474bbf07f9247ffe1856c6a0f94aeeb10e7afee6"
|
EXPECTED_COMMIT_OID="474bbf07f9247ffe1856c6a0f94aeeb10e7afee6"
|
||||||
EXPECTED_REF="v1.1.0"
|
EXPECTED_REF="v1.1.0"
|
||||||
EXPECTED_CHECKOUT_URI_SUFFIX="/x/y/z/some-path/tests/multi-language-repo"
|
EXPECTED_CHECKOUT_URI_SUFFIX="/x/y/z/some-path/tests/multi-language-repo"
|
||||||
|
|
||||||
ACTUAL_COMMIT_OID="$(cat "$PAYLOAD_FILE" | jq -r .commit_oid)"
|
ACTUAL_COMMIT_OID="$(cat "$RUNNER_TEMP/payload.json" | jq -r .commit_oid)"
|
||||||
ACTUAL_REF="$(cat "$PAYLOAD_FILE" | jq -r .ref)"
|
ACTUAL_REF="$(cat "$RUNNER_TEMP/payload.json" | jq -r .ref)"
|
||||||
ACTUAL_CHECKOUT_URI="$(cat "$PAYLOAD_FILE" | jq -r .checkout_uri)"
|
ACTUAL_CHECKOUT_URI="$(cat "$RUNNER_TEMP/payload.json" | jq -r .checkout_uri)"
|
||||||
|
|
||||||
if [[ "$EXPECTED_COMMIT_OID" != "$ACTUAL_COMMIT_OID" ]]; then
|
if [[ "$EXPECTED_COMMIT_OID" != "$ACTUAL_COMMIT_OID" ]]; then
|
||||||
echo "::error Invalid commit oid. Expected: $EXPECTED_COMMIT_OID Actual: $ACTUAL_COMMIT_OID"
|
echo "::error Invalid commit oid. Expected: $EXPECTED_COMMIT_OID Actual: $ACTUAL_COMMIT_OID"
|
||||||
echo "$PAYLOAD_FILE"
|
echo "$RUNNER_TEMP/payload.json"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$EXPECTED_REF" != "$ACTUAL_REF" ]]; then
|
if [[ "$EXPECTED_REF" != "$ACTUAL_REF" ]]; then
|
||||||
echo "::error Invalid ref. Expected: '$EXPECTED_REF' Actual: '$ACTUAL_REF'"
|
echo "::error Invalid ref. Expected: '$EXPECTED_REF' Actual: '$ACTUAL_REF'"
|
||||||
echo "$PAYLOAD_FILE"
|
echo "$RUNNER_TEMP/payload.json"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$ACTUAL_CHECKOUT_URI" != *$EXPECTED_CHECKOUT_URI_SUFFIX ]]; then
|
if [[ "$ACTUAL_CHECKOUT_URI" != *$EXPECTED_CHECKOUT_URI_SUFFIX ]]; then
|
||||||
echo "::error Invalid checkout URI suffix. Expected suffix: $EXPECTED_CHECKOUT_URI_SUFFIX Actual uri: $ACTUAL_CHECKOUT_URI"
|
echo "::error Invalid checkout URI suffix. Expected suffix: $EXPECTED_CHECKOUT_URI_SUFFIX Actual uri: $ACTUAL_CHECKOUT_URI"
|
||||||
echo "$PAYLOAD_FILE"
|
echo "$RUNNER_TEMP/payload.json"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
env:
|
env:
|
||||||
|
|||||||
115
.github/workflows/__zstd-bundle-streaming.yml
generated
vendored
Normal file
115
.github/workflows/__zstd-bundle-streaming.yml
generated
vendored
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
|
# to regenerate this file.
|
||||||
|
|
||||||
|
name: PR Check - Zstandard bundle (streaming)
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
zstd-bundle-streaming:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: macos-latest
|
||||||
|
version: linked
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: linked
|
||||||
|
name: Zstandard bundle (streaming)
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Prepare test
|
||||||
|
id: prepare-test
|
||||||
|
uses: ./.github/actions/prepare-test
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
use-all-platform-bundle: 'false'
|
||||||
|
setup-kotlin: 'true'
|
||||||
|
- name: Remove CodeQL from toolcache
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL');
|
||||||
|
if (codeqlPath !== undefined) {
|
||||||
|
fs.rmdirSync(codeqlPath, { recursive: true });
|
||||||
|
}
|
||||||
|
- id: init
|
||||||
|
uses: ./../action/init
|
||||||
|
with:
|
||||||
|
languages: javascript
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
with:
|
||||||
|
output: ${{ runner.temp }}/results
|
||||||
|
upload-database: false
|
||||||
|
- name: Upload SARIF
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.os }}-zstd-bundle.sarif
|
||||||
|
path: ${{ runner.temp }}/results/javascript.sarif
|
||||||
|
retention-days: 7
|
||||||
|
- name: Check diagnostic with expected tools URL appears in SARIF
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
env:
|
||||||
|
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
|
const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));
|
||||||
|
const run = sarif.runs[0];
|
||||||
|
|
||||||
|
const toolExecutionNotifications = run.invocations[0].toolExecutionNotifications;
|
||||||
|
const downloadTelemetryNotifications = toolExecutionNotifications.filter(n =>
|
||||||
|
n.descriptor.id === 'codeql-action/bundle-download-telemetry'
|
||||||
|
);
|
||||||
|
if (downloadTelemetryNotifications.length !== 1) {
|
||||||
|
core.setFailed(
|
||||||
|
'Expected exactly one reporting descriptor in the ' +
|
||||||
|
`'runs[].invocations[].toolExecutionNotifications[]' SARIF property, but found ` +
|
||||||
|
`${downloadTelemetryNotifications.length}. All notification reporting descriptors: ` +
|
||||||
|
`${JSON.stringify(toolExecutionNotifications)}.`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const toolsUrl = downloadTelemetryNotifications[0].properties.attributes.toolsUrl;
|
||||||
|
console.log(`Found tools URL: ${toolsUrl}`);
|
||||||
|
|
||||||
|
if (!toolsUrl.endsWith('.tar.zst')) {
|
||||||
|
core.setFailed(
|
||||||
|
`Expected the tools URL to be a .tar.zst file, but found ${toolsUrl}.`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_ZSTD_BUNDLE: true
|
||||||
|
CODEQL_ACTION_ZSTD_BUNDLE_STREAMING_EXTRACTION: true
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
118
.github/workflows/__zstd-bundle.yml
generated
vendored
Normal file
118
.github/workflows/__zstd-bundle.yml
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
# Warning: This file is generated automatically, and should not be modified.
|
||||||
|
# Instead, please modify the template in the pr-checks directory and run:
|
||||||
|
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||||
|
# to regenerate this file.
|
||||||
|
|
||||||
|
name: PR Check - Zstandard bundle
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: auto
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
zstd-bundle:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: macos-latest
|
||||||
|
version: linked
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: linked
|
||||||
|
- os: windows-latest
|
||||||
|
version: linked
|
||||||
|
name: Zstandard bundle
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Prepare test
|
||||||
|
id: prepare-test
|
||||||
|
uses: ./.github/actions/prepare-test
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
use-all-platform-bundle: 'false'
|
||||||
|
setup-kotlin: 'true'
|
||||||
|
- name: Remove CodeQL from toolcache
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL');
|
||||||
|
if (codeqlPath !== undefined) {
|
||||||
|
fs.rmdirSync(codeqlPath, { recursive: true });
|
||||||
|
}
|
||||||
|
- id: init
|
||||||
|
uses: ./../action/init
|
||||||
|
with:
|
||||||
|
languages: javascript
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
with:
|
||||||
|
output: ${{ runner.temp }}/results
|
||||||
|
upload-database: false
|
||||||
|
- name: Upload SARIF
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.os }}-zstd-bundle.sarif
|
||||||
|
path: ${{ runner.temp }}/results/javascript.sarif
|
||||||
|
retention-days: 7
|
||||||
|
- name: Check diagnostic with expected tools URL appears in SARIF
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
env:
|
||||||
|
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
|
const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));
|
||||||
|
const run = sarif.runs[0];
|
||||||
|
|
||||||
|
const toolExecutionNotifications = run.invocations[0].toolExecutionNotifications;
|
||||||
|
const downloadTelemetryNotifications = toolExecutionNotifications.filter(n =>
|
||||||
|
n.descriptor.id === 'codeql-action/bundle-download-telemetry'
|
||||||
|
);
|
||||||
|
if (downloadTelemetryNotifications.length !== 1) {
|
||||||
|
core.setFailed(
|
||||||
|
'Expected exactly one reporting descriptor in the ' +
|
||||||
|
`'runs[].invocations[].toolExecutionNotifications[]' SARIF property, but found ` +
|
||||||
|
`${downloadTelemetryNotifications.length}. All notification reporting descriptors: ` +
|
||||||
|
`${JSON.stringify(toolExecutionNotifications)}.`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const toolsUrl = downloadTelemetryNotifications[0].properties.attributes.toolsUrl;
|
||||||
|
console.log(`Found tools URL: ${toolsUrl}`);
|
||||||
|
|
||||||
|
const expectedExtension = process.env['RUNNER_OS'] === 'Windows' ? '.tar.gz' : '.tar.zst';
|
||||||
|
|
||||||
|
if (!toolsUrl.endsWith(expectedExtension)) {
|
||||||
|
core.setFailed(
|
||||||
|
`Expected the tools URL to be a ${expectedExtension} file, but found ${toolsUrl}.`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_ZSTD_BUNDLE: true
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
@@ -9,20 +9,13 @@ on:
|
|||||||
# by other workflows.
|
# by other workflows.
|
||||||
types: [opened, synchronize, reopened, ready_for_review]
|
types: [opened, synchronize, reopened, ready_for_review]
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-expected-release-files:
|
check-expected-release-files:
|
||||||
runs-on: ubuntu-slim
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout CodeQL Action
|
- name: Checkout CodeQL Action
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Check Expected Release Files
|
- name: Check Expected Release Files
|
||||||
run: |
|
run: |
|
||||||
bundle_version="$(cat "./src/defaults.json" | jq -r ".bundleVersion")"
|
bundle_version="$(cat "./src/defaults.json" | jq -r ".bundleVersion")"
|
||||||
|
|||||||
60
.github/workflows/codeql.yml
vendored
60
.github/workflows/codeql.yml
vendored
@@ -4,6 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [main, releases/v*]
|
branches: [main, releases/v*]
|
||||||
pull_request:
|
pull_request:
|
||||||
|
branches: [main, releases/v*]
|
||||||
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
|
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
|
||||||
# by other workflows.
|
# by other workflows.
|
||||||
types: [opened, synchronize, reopened, ready_for_review]
|
types: [opened, synchronize, reopened, ready_for_review]
|
||||||
@@ -12,26 +13,21 @@ on:
|
|||||||
- cron: '30 1 * * 0'
|
- cron: '30 1 * * 0'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CODEQL_ACTION_TESTING_ENVIRONMENT: codeql-action-pr-checks
|
CODEQL_ACTION_TESTING_ENVIRONMENT: codeql-action-pr-checks
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Identify the CodeQL tool versions to use in the analysis job.
|
# Identify the CodeQL tool versions to use in the analysis job.
|
||||||
check-codeql-versions:
|
check-codeql-versions:
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
versions: ${{ steps.compare.outputs.versions }}
|
versions: ${{ steps.compare.outputs.versions }}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
security-events: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- name: Init with default CodeQL bundle from the VM image
|
- name: Init with default CodeQL bundle from the VM image
|
||||||
id: init-default
|
id: init-default
|
||||||
uses: ./init
|
uses: ./init
|
||||||
@@ -74,72 +70,32 @@ jobs:
|
|||||||
echo "Suggested matrix config for analysis job: $VERSIONS_JSON"
|
echo "Suggested matrix config for analysis job: $VERSIONS_JSON"
|
||||||
echo "versions=${VERSIONS_JSON}" >> $GITHUB_OUTPUT
|
echo "versions=${VERSIONS_JSON}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
analyze-javascript:
|
build:
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
needs: [check-codeql-versions]
|
needs: [check-codeql-versions]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-22.04,ubuntu-24.04,windows-2022,windows-2025,macos-14,macos-15]
|
os: [ubuntu-20.04,ubuntu-22.04,windows-2019,windows-2022,macos-13,macos-14]
|
||||||
tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }}
|
tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
|
||||||
security-events: write
|
security-events: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: ./init
|
uses: ./init
|
||||||
id: init
|
id: init
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
config-file: ./.github/codeql/codeql-config-javascript.yml
|
config-file: ./.github/codeql/codeql-config.yml
|
||||||
tools: ${{ matrix.tools }}
|
tools: ${{ matrix.tools }}
|
||||||
# confirm steps.init.outputs.codeql-path points to the codeql binary
|
# confirm steps.init.outputs.codeql-path points to the codeql binary
|
||||||
- name: Print CodeQL Version
|
- name: Print CodeQL Version
|
||||||
run: >
|
run: ${{steps.init.outputs.codeql-path}} version --format=json
|
||||||
"$CODEQL" version --format=json
|
|
||||||
env:
|
|
||||||
CODEQL: ${{steps.init.outputs.codeql-path}}
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: ./analyze
|
uses: ./analyze
|
||||||
with:
|
with:
|
||||||
category: "/language:javascript"
|
category: "/language:javascript"
|
||||||
upload: ${{ (matrix.os == 'ubuntu-24.04' && !matrix.tools && 'always') || 'never' }}
|
|
||||||
|
|
||||||
analyze-other:
|
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- language: actions
|
|
||||||
- language: python
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
- name: Initialize CodeQL
|
|
||||||
uses: ./init
|
|
||||||
with:
|
|
||||||
languages: ${{ matrix.language }}
|
|
||||||
build-mode: none
|
|
||||||
config: >
|
|
||||||
paths-ignore:
|
|
||||||
- lib
|
|
||||||
- tests
|
|
||||||
queries:
|
|
||||||
- uses: security-and-quality
|
|
||||||
- name: Perform CodeQL Analysis
|
|
||||||
uses: ./analyze
|
|
||||||
with:
|
|
||||||
category: "/language:${{ matrix.language }}"
|
|
||||||
|
|||||||
68
.github/workflows/codescanning-config-cli.yml
vendored
68
.github/workflows/codescanning-config-cli.yml
vendored
@@ -3,14 +3,6 @@
|
|||||||
name: Code-Scanning config CLI tests
|
name: Code-Scanning config CLI tests
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# Diff informed queries add an additional query filter which is not yet
|
|
||||||
# taken into account by these tests.
|
|
||||||
CODEQL_ACTION_DIFF_INFORMED_QUERIES: false
|
|
||||||
# Specify overlay enablement manually to ensure stability around the exclude-from-incremental
|
|
||||||
# query filter. Here we only enable for the default code scanning suite.
|
|
||||||
CODEQL_ACTION_OVERLAY_ANALYSIS: true
|
|
||||||
CODEQL_ACTION_OVERLAY_ANALYSIS_JAVASCRIPT: false
|
|
||||||
CODEQL_ACTION_OVERLAY_ANALYSIS_CODE_SCANNING_JAVASCRIPT: true
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -27,30 +19,26 @@ on:
|
|||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
code-scanning-config-tests:
|
code-scanning-config-tests:
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: read
|
|
||||||
security-events: read
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: linked
|
version: linked
|
||||||
|
- os: macos-latest
|
||||||
|
version: linked
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: default
|
version: default
|
||||||
|
- os: macos-latest
|
||||||
|
version: default
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
|
- os: macos-latest
|
||||||
|
version: nightly-latest
|
||||||
|
|
||||||
# Code-Scanning config not created because environment variable is not set
|
# Code-Scanning config not created because environment variable is not set
|
||||||
name: Code Scanning Configuration tests
|
name: Code Scanning Configuration tests
|
||||||
@@ -58,50 +46,20 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
node-version: 24
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
|
|
||||||
# On PRs, overlay analysis may change the config that is passed to the CLI.
|
- name: Empty file
|
||||||
# Therefore, we have two variants of the following test, one for PRs and one for other events.
|
|
||||||
- name: Empty file (non-PR)
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: ./../action/.github/actions/check-codescanning-config
|
uses: ./../action/.github/actions/check-codescanning-config
|
||||||
with:
|
with:
|
||||||
expected-config-file-contents: "{}"
|
expected-config-file-contents: "{}"
|
||||||
languages: javascript
|
languages: javascript
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
- name: Empty file (PR)
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
uses: ./../action/.github/actions/check-codescanning-config
|
|
||||||
with:
|
|
||||||
expected-config-file-contents: |
|
|
||||||
{
|
|
||||||
"query-filters": [
|
|
||||||
{
|
|
||||||
"exclude": {
|
|
||||||
"tags": "exclude-from-incremental"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
languages: javascript
|
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
|
||||||
|
|
||||||
- name: Packs from input
|
- name: Packs from input
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
uses: ./../action/.github/actions/check-codescanning-config
|
uses: ./../action/.github/actions/check-codescanning-config
|
||||||
@@ -200,13 +158,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
expected-config-file-contents: |
|
expected-config-file-contents: |
|
||||||
{
|
{
|
||||||
|
"queries": [
|
||||||
|
{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/foo2/show_ifs.ql" },
|
||||||
|
{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql" }
|
||||||
|
],
|
||||||
"packs": {
|
"packs": {
|
||||||
"javascript": ["codeql-testing/codeql-pack1@1.0.0", "codeql-testing/codeql-pack2", "codeql/javascript-queries" ]
|
"javascript": ["codeql-testing/codeql-pack1@1.0.0", "codeql-testing/codeql-pack2", "codeql/javascript-queries" ]
|
||||||
},
|
}
|
||||||
"queries": [
|
|
||||||
{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql" },
|
|
||||||
{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/foo2/show_ifs.ql" }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
languages: javascript
|
languages: javascript
|
||||||
queries: + ./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql
|
queries: + ./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql
|
||||||
|
|||||||
113
.github/workflows/debug-artifacts-failure-safe.yml
vendored
113
.github/workflows/debug-artifacts-failure-safe.yml
vendored
@@ -1,113 +0,0 @@
|
|||||||
# Checks logs, SARIF, and database bundle debug artifacts exist
|
|
||||||
# when the analyze step fails.
|
|
||||||
name: PR Check - Debug artifacts after failure
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- releases/v*
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- ready_for_review
|
|
||||||
schedule:
|
|
||||||
- cron: '0 5 * * *'
|
|
||||||
workflow_dispatch: {}
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
upload-artifacts:
|
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
version:
|
|
||||||
- stable-v2.20.3
|
|
||||||
- default
|
|
||||||
- linked
|
|
||||||
- nightly-latest
|
|
||||||
name: Upload debug artifacts after failure in analyze
|
|
||||||
continue-on-error: true
|
|
||||||
env:
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
timeout-minutes: 45
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Dump GitHub event
|
|
||||||
run: cat "${GITHUB_EVENT_PATH}"
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
- name: Prepare test
|
|
||||||
id: prepare-test
|
|
||||||
uses: ./.github/actions/prepare-test
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.version }}
|
|
||||||
- uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ^1.13.1
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: '9.x'
|
|
||||||
- name: Assert best-effort artifact scan completed
|
|
||||||
uses: ./../action/.github/actions/verify-debug-artifact-scan-completed
|
|
||||||
- uses: ./../action/init
|
|
||||||
with:
|
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
|
||||||
debug: true
|
|
||||||
debug-artifact-name: my-debug-artifacts
|
|
||||||
debug-database-name: my-db
|
|
||||||
- name: Build code
|
|
||||||
run: ./build.sh
|
|
||||||
- uses: ./../action/analyze
|
|
||||||
id: analysis
|
|
||||||
env:
|
|
||||||
# Forces a failure in this step.
|
|
||||||
CODEQL_ACTION_EXTRA_OPTIONS: '{ "database": { "finalize": ["--invalid-option"] } }'
|
|
||||||
with:
|
|
||||||
expect-error: true
|
|
||||||
download-and-check-artifacts:
|
|
||||||
name: Download and check debug artifacts after failure in analyze
|
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
needs: upload-artifacts
|
|
||||||
timeout-minutes: 45
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Download all artifacts
|
|
||||||
uses: actions/download-artifact@v7
|
|
||||||
- name: Check expected artifacts exist
|
|
||||||
run: |
|
|
||||||
LANGUAGES="cpp csharp go java javascript python"
|
|
||||||
for version in $VERSIONS; do
|
|
||||||
echo "Artifacts from version $version:"
|
|
||||||
pushd "./my-debug-artifacts-${version//./}"
|
|
||||||
for language in $LANGUAGES; do
|
|
||||||
echo "- Checking $language"
|
|
||||||
if [[ ! -f "my-db-$language-partial.zip" ]] ; then
|
|
||||||
echo "Missing a partial database bundle for $language"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ ! -d "log" ]] ; then
|
|
||||||
echo "Missing database initialization logs"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ ! "$language" == "go" ]] && [[ ! -d "$language/log" ]] ; then
|
|
||||||
echo "Missing logs for $language"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
popd
|
|
||||||
done
|
|
||||||
env:
|
|
||||||
GO111MODULE: auto
|
|
||||||
88
.github/workflows/debug-artifacts-failure.yml
vendored
Normal file
88
.github/workflows/debug-artifacts-failure.yml
vendored
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
# Checks logs, SARIF, and database bundle debug artifacts exist
|
||||||
|
# when the analyze step fails.
|
||||||
|
name: PR Check - Debug artifacts after failure
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
CODEQL_ACTION_ARTIFACT_V4_UPGRADE: true
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
upload-artifacts:
|
||||||
|
name: Upload debug artifacts after failure in analyze
|
||||||
|
continue-on-error: true
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Dump GitHub event
|
||||||
|
run: cat "${GITHUB_EVENT_PATH}"
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Prepare test
|
||||||
|
id: prepare-test
|
||||||
|
uses: ./.github/actions/prepare-test
|
||||||
|
with:
|
||||||
|
version: linked
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: ^1.13.1
|
||||||
|
- uses: ./../action/init
|
||||||
|
with:
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
debug: true
|
||||||
|
debug-artifact-name: my-debug-artifacts
|
||||||
|
debug-database-name: my-db
|
||||||
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
|
run: ./build.sh
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
id: analysis
|
||||||
|
env:
|
||||||
|
# Forces a failure in this step.
|
||||||
|
CODEQL_ACTION_EXTRA_OPTIONS: '{ "database": { "finalize": ["--invalid-option"] } }'
|
||||||
|
with:
|
||||||
|
expect-error: true
|
||||||
|
download-and-check-artifacts:
|
||||||
|
name: Download and check debug artifacts after failure in analyze
|
||||||
|
needs: upload-artifacts
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Download all artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
- name: Check expected artifacts exist
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
LANGUAGES="cpp csharp go java javascript python"
|
||||||
|
cd "./my-debug-artifacts"
|
||||||
|
echo "Artifacts from run:"
|
||||||
|
for language in $LANGUAGES; do
|
||||||
|
echo "- Checking $language"
|
||||||
|
if [[ ! -f "my-db-$language-partial.zip" ]] ; then
|
||||||
|
echo "Missing a partial database bundle for $language"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ ! -d "log" ]] ; then
|
||||||
|
echo "Missing database initialization logs"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ ! "$language" == "go" ]] && [[ ! -d "$language/log" ]] ; then
|
||||||
|
echo "Missing logs for $language"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
env:
|
||||||
|
GO111MODULE: auto
|
||||||
99
.github/workflows/debug-artifacts-legacy.yml
vendored
Normal file
99
.github/workflows/debug-artifacts-legacy.yml
vendored
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
# Checks logs, SARIF, and database bundle debug artifacts exist and are accessible
|
||||||
|
# with download-artifact@v3 when CODEQL_ACTION_ARTIFACT_V4_UPGRADE is set to false.
|
||||||
|
name: PR Check - Debug artifact upload using artifact@v2
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
CODEQL_ACTION_ARTIFACT_V4_UPGRADE: false
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
upload-artifacts:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
version:
|
||||||
|
- stable-v2.14.6
|
||||||
|
- stable-v2.15.5
|
||||||
|
- stable-v2.16.6
|
||||||
|
- stable-v2.17.6
|
||||||
|
- stable-v2.18.4
|
||||||
|
- default
|
||||||
|
- linked
|
||||||
|
- nightly-latest
|
||||||
|
name: Upload debug artifacts
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Prepare test
|
||||||
|
id: prepare-test
|
||||||
|
uses: ./.github/actions/prepare-test
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: ^1.13.1
|
||||||
|
- uses: ./../action/init
|
||||||
|
id: init
|
||||||
|
with:
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
debug: true
|
||||||
|
debug-artifact-name: my-debug-artifacts
|
||||||
|
debug-database-name: my-db
|
||||||
|
# We manually exclude Swift from the languages list here, as it is not supported on Ubuntu
|
||||||
|
languages: cpp,csharp,go,java,javascript,python,ruby
|
||||||
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
|
run: ./build.sh
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
id: analysis
|
||||||
|
download-and-check-artifacts:
|
||||||
|
name: Download and check debug artifacts
|
||||||
|
needs: upload-artifacts
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Download all artifacts
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
- name: Check expected artifacts exist
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
VERSIONS="stable-v2.14.6 stable-v2.15.5 stable-v2.16.6 stable-v2.17.6 stable-v2.18.4 default linked nightly-latest"
|
||||||
|
LANGUAGES="cpp csharp go java javascript python"
|
||||||
|
for version in $VERSIONS; do
|
||||||
|
pushd "./my-debug-artifacts-${version//./}"
|
||||||
|
echo "Artifacts from version $version:"
|
||||||
|
for language in $LANGUAGES; do
|
||||||
|
echo "- Checking $language"
|
||||||
|
if [[ ! -f "$language.sarif" ]] ; then
|
||||||
|
echo "Missing a SARIF file for $language"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ ! -f "my-db-$language.zip" ]] ; then
|
||||||
|
echo "Missing a database bundle for $language"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ ! -d "$language/log" ]] ; then
|
||||||
|
echo "Missing logs for $language"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
done
|
||||||
|
env:
|
||||||
|
GO111MODULE: auto
|
||||||
108
.github/workflows/debug-artifacts-safe.yml
vendored
108
.github/workflows/debug-artifacts-safe.yml
vendored
@@ -1,108 +0,0 @@
|
|||||||
# Checks logs, SARIF, and database bundle debug artifacts exist.
|
|
||||||
name: PR Check - Debug artifact upload
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- releases/v*
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- ready_for_review
|
|
||||||
schedule:
|
|
||||||
- cron: '0 5 * * *'
|
|
||||||
workflow_dispatch: {}
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
upload-artifacts:
|
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
version:
|
|
||||||
- stable-v2.20.3
|
|
||||||
- default
|
|
||||||
- linked
|
|
||||||
- nightly-latest
|
|
||||||
name: Upload debug artifacts
|
|
||||||
env:
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
timeout-minutes: 45
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
- name: Prepare test
|
|
||||||
id: prepare-test
|
|
||||||
uses: ./.github/actions/prepare-test
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.version }}
|
|
||||||
- uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version: ^1.13.1
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v5
|
|
||||||
with:
|
|
||||||
dotnet-version: '9.x'
|
|
||||||
- name: Assert best-effort artifact scan completed
|
|
||||||
uses: ./../action/.github/actions/verify-debug-artifact-scan-completed
|
|
||||||
- uses: ./../action/init
|
|
||||||
id: init
|
|
||||||
with:
|
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
|
||||||
debug: true
|
|
||||||
debug-artifact-name: my-debug-artifacts
|
|
||||||
debug-database-name: my-db
|
|
||||||
# We manually exclude Swift from the languages list here, as it is not supported on Ubuntu
|
|
||||||
languages: cpp,csharp,go,java,javascript,python,ruby
|
|
||||||
- name: Build code
|
|
||||||
run: ./build.sh
|
|
||||||
- uses: ./../action/analyze
|
|
||||||
id: analysis
|
|
||||||
download-and-check-artifacts:
|
|
||||||
name: Download and check debug artifacts
|
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
needs: upload-artifacts
|
|
||||||
timeout-minutes: 45
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Download all artifacts
|
|
||||||
uses: actions/download-artifact@v7
|
|
||||||
- name: Check expected artifacts exist
|
|
||||||
run: |
|
|
||||||
VERSIONS="stable-v2.20.3 default linked nightly-latest"
|
|
||||||
LANGUAGES="cpp csharp go java javascript python"
|
|
||||||
for version in $VERSIONS; do
|
|
||||||
pushd "./my-debug-artifacts-${version//./}"
|
|
||||||
echo "Artifacts from version $version:"
|
|
||||||
for language in $LANGUAGES; do
|
|
||||||
echo "- Checking $language"
|
|
||||||
if [[ ! -f "$language.sarif" ]] ; then
|
|
||||||
echo "Missing a SARIF file for $language"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ ! -f "my-db-$language.zip" ]] ; then
|
|
||||||
echo "Missing a database bundle for $language"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ ! -d "$language/log" ]] ; then
|
|
||||||
echo "Missing logs for $language"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
popd
|
|
||||||
done
|
|
||||||
env:
|
|
||||||
GO111MODULE: auto
|
|
||||||
98
.github/workflows/debug-artifacts.yml
vendored
Normal file
98
.github/workflows/debug-artifacts.yml
vendored
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
# Checks logs, SARIF, and database bundle debug artifacts exist.
|
||||||
|
name: PR Check - Debug artifact upload
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
CODEQL_ACTION_ARTIFACT_V4_UPGRADE: true
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
upload-artifacts:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
version:
|
||||||
|
- stable-v2.14.6
|
||||||
|
- stable-v2.15.5
|
||||||
|
- stable-v2.16.6
|
||||||
|
- stable-v2.17.6
|
||||||
|
- stable-v2.18.4
|
||||||
|
- default
|
||||||
|
- linked
|
||||||
|
- nightly-latest
|
||||||
|
name: Upload debug artifacts
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Prepare test
|
||||||
|
id: prepare-test
|
||||||
|
uses: ./.github/actions/prepare-test
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: ^1.13.1
|
||||||
|
- uses: ./../action/init
|
||||||
|
id: init
|
||||||
|
with:
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
debug: true
|
||||||
|
debug-artifact-name: my-debug-artifacts
|
||||||
|
debug-database-name: my-db
|
||||||
|
# We manually exclude Swift from the languages list here, as it is not supported on Ubuntu
|
||||||
|
languages: cpp,csharp,go,java,javascript,python,ruby
|
||||||
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
|
run: ./build.sh
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
id: analysis
|
||||||
|
download-and-check-artifacts:
|
||||||
|
name: Download and check debug artifacts
|
||||||
|
needs: upload-artifacts
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Download all artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
- name: Check expected artifacts exist
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
VERSIONS="stable-v2.14.6 stable-v2.15.5 stable-v2.16.6 stable-v2.17.6 stable-v2.18.4 default linked nightly-latest"
|
||||||
|
LANGUAGES="cpp csharp go java javascript python"
|
||||||
|
for version in $VERSIONS; do
|
||||||
|
pushd "./my-debug-artifacts-${version//./}"
|
||||||
|
echo "Artifacts from version $version:"
|
||||||
|
for language in $LANGUAGES; do
|
||||||
|
echo "- Checking $language"
|
||||||
|
if [[ ! -f "$language.sarif" ]] ; then
|
||||||
|
echo "Missing a SARIF file for $language"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ ! -f "my-db-$language.zip" ]] ; then
|
||||||
|
echo "Missing a database bundle for $language"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ ! -d "$language/log" ]] ; then
|
||||||
|
echo "Missing logs for $language"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
done
|
||||||
|
env:
|
||||||
|
GO111MODULE: auto
|
||||||
49
.github/workflows/expected-queries-runs.yml
vendored
Normal file
49
.github/workflows/expected-queries-runs.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
name: Check queries that ran
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/v*
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
expected-queries:
|
||||||
|
name: Expected Queries Tests
|
||||||
|
env:
|
||||||
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
|
timeout-minutes: 45
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Prepare test
|
||||||
|
id: prepare-test
|
||||||
|
uses: ./.github/actions/prepare-test
|
||||||
|
with:
|
||||||
|
version: linked
|
||||||
|
- uses: ./../action/init
|
||||||
|
with:
|
||||||
|
languages: javascript
|
||||||
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
with:
|
||||||
|
output: ${{ runner.temp }}/results
|
||||||
|
|
||||||
|
- name: Check Sarif
|
||||||
|
uses: ./../action/.github/actions/check-sarif
|
||||||
|
with:
|
||||||
|
sarif-file: ${{ runner.temp }}/results/javascript.sarif
|
||||||
|
queries-run: js/incomplete-hostname-regexp,js/path-injection
|
||||||
|
queries-not-run: foo,bar
|
||||||
26
.github/workflows/label-pr-size.yml
vendored
26
.github/workflows/label-pr-size.yml
vendored
@@ -1,26 +0,0 @@
|
|||||||
name: Label PR with size
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- edited
|
|
||||||
- ready_for_review
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
sizeup:
|
|
||||||
name: Label PR with size
|
|
||||||
runs-on: ubuntu-slim
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Run sizeup
|
|
||||||
uses: lerebear/sizeup-action@b7beb3dd273e36039e16e48e7bc690c189e61951 # 0.8.12
|
|
||||||
with:
|
|
||||||
token: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
configuration-file-path: ".github/sizeup.yml"
|
|
||||||
77
.github/workflows/post-release-mergeback.yml
vendored
77
.github/workflows/post-release-mergeback.yml
vendored
@@ -3,7 +3,7 @@
|
|||||||
# tag
|
# tag
|
||||||
# 2. Updates the `vN` tag to refer to this merge commit.
|
# 2. Updates the `vN` tag to refer to this merge commit.
|
||||||
# 3. Iff vN == vLatest, merges any changes from the release back into the main branch.
|
# 3. Iff vN == vLatest, merges any changes from the release back into the main branch.
|
||||||
# Typically, this is two commits – one to update the version number and one to rebuild.
|
# Typically, this is two commits – one to update the version number and one to update dependencies.
|
||||||
name: Tag release and merge back
|
name: Tag release and merge back
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -18,23 +18,14 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- releases/v*
|
- releases/v*
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
merge-back:
|
merge-back:
|
||||||
runs-on: ubuntu-slim
|
runs-on: ubuntu-latest
|
||||||
environment: Automation
|
|
||||||
if: github.repository == 'github/codeql-action'
|
if: github.repository == 'github/codeql-action'
|
||||||
env:
|
env:
|
||||||
BASE_BRANCH: "${{ github.event.inputs.baseBranch || 'main' }}"
|
BASE_BRANCH: "${{ github.event.inputs.baseBranch || 'main' }}"
|
||||||
HEAD_BRANCH: "${{ github.head_ref || github.ref }}"
|
HEAD_BRANCH: "${{ github.head_ref || github.ref }}"
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write # needed to create tags and push commits
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Dump environment
|
- name: Dump environment
|
||||||
run: env
|
run: env
|
||||||
@@ -44,13 +35,10 @@ jobs:
|
|||||||
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
||||||
run: echo "${GITHUB_CONTEXT}"
|
run: echo "${GITHUB_CONTEXT}"
|
||||||
|
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # ensure we have all tags and can push commits
|
fetch-depth: 0 # ensure we have all tags and can push commits
|
||||||
- uses: actions/setup-node@v6
|
- uses: actions/setup-node@v4
|
||||||
- uses: actions/setup-python@v6
|
|
||||||
with:
|
|
||||||
python-version: '3.12'
|
|
||||||
|
|
||||||
- name: Update git config
|
- name: Update git config
|
||||||
run: |
|
run: |
|
||||||
@@ -131,29 +119,54 @@ jobs:
|
|||||||
cat $PARTIAL_CHANGELOG
|
cat $PARTIAL_CHANGELOG
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Create mergeback branch and PR
|
- name: Create mergeback branch
|
||||||
if: ${{ steps.check.outputs.exists != 'true' && endsWith(github.ref_name, steps.getVersion.outputs.latest_release_branch) }}
|
if: ${{ steps.check.outputs.exists != 'true' && endsWith(github.ref_name, steps.getVersion.outputs.latest_release_branch) }}
|
||||||
uses: ./.github/actions/prepare-mergeback-branch
|
env:
|
||||||
with:
|
VERSION: "${{ steps.getVersion.outputs.version }}"
|
||||||
base: "${{ env.BASE_BRANCH }}"
|
NEW_BRANCH: "${{ steps.getVersion.outputs.newBranch }}"
|
||||||
head: "${{ env.HEAD_BRANCH }}"
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
branch: "${{ steps.getVersion.outputs.newBranch }}"
|
run: |
|
||||||
version: "${{ steps.getVersion.outputs.version }}"
|
set -exu
|
||||||
token: "${{ secrets.GITHUB_TOKEN }}"
|
pr_title="Mergeback ${VERSION} ${HEAD_BRANCH} into ${BASE_BRANCH}"
|
||||||
|
pr_body=$(cat << EOF
|
||||||
|
This PR bumps the version number and updates the changelog after the ${VERSION} release.
|
||||||
|
|
||||||
- name: Generate token
|
Please do the following:
|
||||||
uses: actions/create-github-app-token@v2.2.1
|
|
||||||
id: app-token
|
- [ ] Remove and re-add the "Update dependencies" label to the PR to trigger just this workflow.
|
||||||
with:
|
- [ ] Wait for the "Update dependencies" workflow to push a commit updating the dependencies.
|
||||||
app-id: ${{ vars.AUTOMATION_APP_ID }}
|
- [ ] Mark the PR as ready for review to trigger the full set of PR checks.
|
||||||
private-key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}
|
- [ ] Approve and merge the PR. When merging the PR, make sure "Create a merge commit" is
|
||||||
|
selected rather than "Squash and merge" or "Rebase and merge".
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
# Update the version number ready for the next release
|
||||||
|
npm version patch --no-git-tag-version
|
||||||
|
|
||||||
|
# Update the changelog, adding a new version heading directly above the most recent existing one
|
||||||
|
awk '!f && /##/{print "'"## [UNRELEASED]\n\nNo user facing changes.\n"'"; f=1}1' CHANGELOG.md > temp && mv temp CHANGELOG.md
|
||||||
|
git add .
|
||||||
|
git commit -m "Update changelog and version after ${VERSION}"
|
||||||
|
|
||||||
|
git push origin "${NEW_BRANCH}"
|
||||||
|
|
||||||
|
# PR checks won't be triggered on PRs created by Actions. Therefore mark the PR as draft
|
||||||
|
# so that a maintainer can take the PR out of draft, thereby triggering the PR checks.
|
||||||
|
gh pr create \
|
||||||
|
--head "${NEW_BRANCH}" \
|
||||||
|
--base "${BASE_BRANCH}" \
|
||||||
|
--title "${pr_title}" \
|
||||||
|
--label "Update dependencies" \
|
||||||
|
--body "${pr_body}" \
|
||||||
|
--assignee "${GITHUB_ACTOR}" \
|
||||||
|
--draft
|
||||||
|
|
||||||
- name: Create the GitHub release
|
- name: Create the GitHub release
|
||||||
if: steps.check.outputs.exists != 'true'
|
|
||||||
env:
|
env:
|
||||||
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
|
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
|
||||||
VERSION: "${{ steps.getVersion.outputs.version }}"
|
VERSION: "${{ steps.getVersion.outputs.version }}"
|
||||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
# Do not mark this release as latest. The most recent CLI release must be marked as latest.
|
# Do not mark this release as latest. The most recent CLI release must be marked as latest.
|
||||||
gh release create \
|
gh release create \
|
||||||
|
|||||||
148
.github/workflows/pr-checks.yml
vendored
148
.github/workflows/pr-checks.yml
vendored
@@ -8,90 +8,128 @@ on:
|
|||||||
types: [opened, synchronize, reopened, ready_for_review]
|
types: [opened, synchronize, reopened, ready_for_review]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
unit-tests:
|
check-js:
|
||||||
name: Unit Tests
|
name: Check JS
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 45
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
node-types-version: [16.11, current] # we backport this matrix job in order to maintain the same check names
|
||||||
node-version: [20, 24]
|
|
||||||
permissions:
|
steps:
|
||||||
contents: read
|
- name: Checkout
|
||||||
security-events: write # needed to upload ESLint results
|
uses: actions/checkout@v4
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
- name: Lint
|
||||||
|
id: lint
|
||||||
|
run: npm run-script lint-ci
|
||||||
|
|
||||||
|
- name: Upload sarif
|
||||||
|
uses: github/codeql-action/upload-sarif@v3
|
||||||
|
# Only upload SARIF for the latest version of Node.js
|
||||||
|
if: "!cancelled() && matrix.node-types-version == 'current' && !startsWith(github.head_ref, 'dependabot/')"
|
||||||
|
with:
|
||||||
|
sarif_file: eslint.sarif
|
||||||
|
category: eslint
|
||||||
|
|
||||||
|
- name: Update version of @types/node
|
||||||
|
if: matrix.node-types-version != 'current'
|
||||||
|
env:
|
||||||
|
NODE_TYPES_VERSION: ${{ matrix.node-types-version }}
|
||||||
|
run: |
|
||||||
|
# Export `NODE_TYPES_VERSION` so it's available to jq
|
||||||
|
export NODE_TYPES_VERSION="${NODE_TYPES_VERSION}"
|
||||||
|
contents=$(jq '.devDependencies."@types/node" = env.NODE_TYPES_VERSION' package.json)
|
||||||
|
echo "${contents}" > package.json
|
||||||
|
# Usually we run `npm install` on macOS to ensure that we pick up macOS-only dependencies.
|
||||||
|
# However we're not checking in the updated lockfile here, so it's fine to run
|
||||||
|
# `npm install` on Linux.
|
||||||
|
npm install
|
||||||
|
|
||||||
|
if [ ! -z "$(git status --porcelain)" ]; then
|
||||||
|
git config --global user.email "github-actions@github.com"
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
# The period in `git add --all .` ensures that we stage deleted files too.
|
||||||
|
git add --all .
|
||||||
|
git commit -m "Use @types/node=${NODE_TYPES_VERSION}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Check generated JS
|
||||||
|
if: matrix.node-types-version != 'current' # we do not need to test the newer node on the v2 branch
|
||||||
|
run: .github/workflows/script/check-js.sh
|
||||||
|
|
||||||
|
check-node-modules:
|
||||||
|
if: github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/releases/v')
|
||||||
|
name: Check modules up to date
|
||||||
|
runs-on: macos-latest
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Prepare git (Windows)
|
- uses: actions/checkout@v4
|
||||||
if: runner.os == 'Windows'
|
- name: Check node modules up to date
|
||||||
run: git config --global core.autocrlf false
|
run: .github/workflows/script/check-node-modules.sh
|
||||||
|
|
||||||
- uses: actions/checkout@v6
|
check-file-contents:
|
||||||
|
if: github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/releases/v')
|
||||||
|
name: Check file contents
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 45
|
||||||
|
|
||||||
- name: Set up Node.js
|
steps:
|
||||||
uses: actions/setup-node@v6
|
- name: Checkout
|
||||||
with:
|
uses: actions/checkout@v4
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.11
|
python-version: 3.11
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
# Use the system Bash shell to ensure we can run commands like `npm ci`
|
python -m pip install --upgrade pip
|
||||||
# that are not available in the default shell on Windows.
|
# When updating this, update the autogenerated code header in `sync.py` too.
|
||||||
npm config set script-shell bash
|
pip install ruamel.yaml==0.17.31
|
||||||
npm ci
|
|
||||||
|
|
||||||
- name: Verify compiled JS up to date
|
|
||||||
run: .github/workflows/script/check-js.sh
|
|
||||||
|
|
||||||
|
# Ensure the generated PR check workflows are up to date.
|
||||||
- name: Verify PR checks up to date
|
- name: Verify PR checks up to date
|
||||||
if: always()
|
|
||||||
run: .github/workflows/script/verify-pr-checks.sh
|
run: .github/workflows/script/verify-pr-checks.sh
|
||||||
|
|
||||||
- name: Run unit tests
|
npm-test:
|
||||||
if: always()
|
if: github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/releases/v')
|
||||||
run: npm test
|
name: Unit Test
|
||||||
|
needs: [check-js, check-node-modules]
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
timeout-minutes: 45
|
||||||
|
|
||||||
- name: Run pr-checks tests
|
steps:
|
||||||
if: always()
|
- uses: actions/checkout@v4
|
||||||
working-directory: pr-checks
|
- name: npm test
|
||||||
run: python -m unittest discover
|
run: |
|
||||||
|
# Run any commands referenced in package.json using Bash, otherwise
|
||||||
- name: Lint
|
# we won't be able to find them on Windows.
|
||||||
if: always() && matrix.os != 'windows-latest'
|
npm config set script-shell bash
|
||||||
run: npm run lint-ci
|
npm test
|
||||||
|
|
||||||
- name: Upload sarif
|
|
||||||
uses: github/codeql-action/upload-sarif@v4
|
|
||||||
if: matrix.os == 'ubuntu-latest' && matrix.node-version == 24
|
|
||||||
with:
|
|
||||||
sarif_file: eslint.sarif
|
|
||||||
category: eslint
|
|
||||||
|
|
||||||
check-node-version:
|
check-node-version:
|
||||||
if: github.event.pull_request && github.triggering_actor != 'dependabot[bot]'
|
if: github.event.pull_request
|
||||||
name: Check Action Node versions
|
name: Check Action Node versions
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
env:
|
env:
|
||||||
BASE_REF: ${{ github.base_ref }}
|
BASE_REF: ${{ github.base_ref }}
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- id: head-version
|
- id: head-version
|
||||||
name: Verify all Actions use the same Node version
|
name: Verify all Actions use the same Node version
|
||||||
run: |
|
run: |
|
||||||
@@ -106,7 +144,7 @@ jobs:
|
|||||||
- id: checkout-base
|
- id: checkout-base
|
||||||
name: 'Backport: Check out base ref'
|
name: 'Backport: Check out base ref'
|
||||||
if: ${{ startsWith(github.head_ref, 'backport-') }}
|
if: ${{ startsWith(github.head_ref, 'backport-') }}
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ env.BASE_REF }}
|
ref: ${{ env.BASE_REF }}
|
||||||
|
|
||||||
|
|||||||
77
.github/workflows/prepare-release.yml
vendored
77
.github/workflows/prepare-release.yml
vendored
@@ -1,77 +0,0 @@
|
|||||||
name: Prepare release
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
outputs:
|
|
||||||
version:
|
|
||||||
description: "The version that is being released."
|
|
||||||
value: ${{ jobs.prepare.outputs.version }}
|
|
||||||
major_version:
|
|
||||||
description: "The major version of the release."
|
|
||||||
value: ${{ jobs.prepare.outputs.major_version }}
|
|
||||||
latest_tag:
|
|
||||||
description: "The most recent, existing release tag."
|
|
||||||
value: ${{ jobs.prepare.outputs.latest_tag }}
|
|
||||||
backport_source_branch:
|
|
||||||
description: "The release branch for the given tag."
|
|
||||||
value: ${{ jobs.prepare.outputs.backport_source_branch }}
|
|
||||||
backport_target_branches:
|
|
||||||
description: "JSON encoded list of branches to target with backports."
|
|
||||||
value: ${{ jobs.prepare.outputs.backport_target_branches }}
|
|
||||||
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- .github/workflows/prepare-release.yml
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
prepare:
|
|
||||||
name: "Prepare release"
|
|
||||||
runs-on: ubuntu-slim
|
|
||||||
if: github.repository == 'github/codeql-action'
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
version: ${{ steps.versions.outputs.version }}
|
|
||||||
major_version: ${{ steps.versions.outputs.major_version }}
|
|
||||||
latest_tag: ${{ steps.versions.outputs.latest_tag }}
|
|
||||||
backport_source_branch: ${{ steps.branches.outputs.backport_source_branch }}
|
|
||||||
backport_target_branches: ${{ steps.branches.outputs.backport_target_branches }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
fetch-depth: 0 # Need full history for calculation of diffs
|
|
||||||
|
|
||||||
- name: Configure runner for release
|
|
||||||
uses: ./.github/actions/release-initialise
|
|
||||||
|
|
||||||
- name: Get version tags
|
|
||||||
id: versions
|
|
||||||
run: |
|
|
||||||
VERSION="v$(jq '.version' -r 'package.json')"
|
|
||||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
|
||||||
MAJOR_VERSION=$(cut -d '.' -f1 <<< "${VERSION}")
|
|
||||||
echo "major_version=${MAJOR_VERSION}" >> $GITHUB_OUTPUT
|
|
||||||
LATEST_TAG=$(git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+' | head -1)
|
|
||||||
echo "latest_tag=${LATEST_TAG}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Determine older release branches
|
|
||||||
id: branches
|
|
||||||
uses: ./.github/actions/release-branches
|
|
||||||
with:
|
|
||||||
major_version: ${{ steps.versions.outputs.major_version }}
|
|
||||||
latest_tag: ${{ steps.versions.outputs.latest_tag }}
|
|
||||||
|
|
||||||
- name: Print release information
|
|
||||||
run: |
|
|
||||||
echo 'version: ${{ steps.versions.outputs.version }}'
|
|
||||||
echo 'major_version: ${{ steps.versions.outputs.major_version }}'
|
|
||||||
echo 'latest_tag: ${{ steps.versions.outputs.latest_tag }}'
|
|
||||||
echo 'backport_source_branch: ${{ steps.branches.outputs.backport_source_branch }}'
|
|
||||||
echo 'backport_target_branches: ${{ steps.branches.outputs.backport_target_branches }}'
|
|
||||||
34
.github/workflows/publish-immutable-action.yml
vendored
34
.github/workflows/publish-immutable-action.yml
vendored
@@ -1,27 +1,35 @@
|
|||||||
name: 'Publish Immutable Action Version'
|
name: 'Publish Immutable Action Version'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
release:
|
||||||
tags:
|
types: [published]
|
||||||
# Match version tags, but not the major version tags.
|
|
||||||
- 'v[0-9]+.**'
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-slim
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
id-token: write
|
id-token: write
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Check release name
|
||||||
uses: actions/checkout@v6
|
id: check
|
||||||
|
env:
|
||||||
- name: Publish immutable release
|
RELEASE_NAME: ${{ github.event.release.name }}
|
||||||
|
run: |
|
||||||
|
echo "Release name: ${{ github.event.release.name }}"
|
||||||
|
if [[ $RELEASE_NAME == v* ]]; then
|
||||||
|
echo "This is a CodeQL Action release. Create an Immutable Action"
|
||||||
|
echo "is-action-release=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "This is a CodeQL Bundle release. Do not create an Immutable Action"
|
||||||
|
echo "is-action-release=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
- name: Checking out
|
||||||
|
if: steps.check.outputs.is-action-release == 'true'
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Publish
|
||||||
|
if: steps.check.outputs.is-action-release == 'true'
|
||||||
id: publish
|
id: publish
|
||||||
uses: actions/publish-immutable-action@v0.0.4
|
uses: actions/publish-immutable-action@v0.0.4
|
||||||
|
|||||||
11
.github/workflows/python312-windows.yml
vendored
11
.github/workflows/python312-windows.yml
vendored
@@ -12,26 +12,19 @@ on:
|
|||||||
- cron: '0 0 * * 1'
|
- cron: '0 0 * * 1'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-setup-python-scripts:
|
test-setup-python-scripts:
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
env:
|
env:
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.12
|
python-version: 3.12
|
||||||
|
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
19
.github/workflows/query-filters.yml
vendored
19
.github/workflows/query-filters.yml
vendored
@@ -15,31 +15,14 @@ on:
|
|||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
query-filters:
|
query-filters:
|
||||||
name: Query Filters Tests
|
name: Query Filters Tests
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
contents: read # This permission is needed to allow the GitHub Actions workflow to read the contents of the repository.
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Node.js
|
|
||||||
uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
node-version: 24
|
|
||||||
cache: npm
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|||||||
117
.github/workflows/rebuild.yml
vendored
117
.github/workflows/rebuild.yml
vendored
@@ -5,32 +5,19 @@ on:
|
|||||||
types: [labeled]
|
types: [labeled]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rebuild:
|
rebuild:
|
||||||
name: Rebuild Action
|
name: Rebuild Action
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event.label.name == 'Rebuild' || github.event_name == 'workflow_dispatch'
|
if: github.event.label.name == 'Rebuild'
|
||||||
|
|
||||||
env:
|
|
||||||
HEAD_REF: ${{ github.event.pull_request.head.ref || github.event.ref }}
|
|
||||||
BASE_BRANCH: ${{ github.event.pull_request.base.ref || 'main' }}
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write # needed to push rebuilt commit
|
|
||||||
pull-requests: write # needed to comment on the PR
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
ref: ${{ github.event.pull_request.head.ref }}
|
||||||
ref: ${{ env.HEAD_REF }}
|
|
||||||
|
|
||||||
- name: Remove label
|
- name: Remove label
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
@@ -38,103 +25,55 @@ jobs:
|
|||||||
gh pr edit --repo github/codeql-action "$PR_NUMBER" \
|
gh pr edit --repo github/codeql-action "$PR_NUMBER" \
|
||||||
--remove-label "Rebuild"
|
--remove-label "Rebuild"
|
||||||
|
|
||||||
- name: Configure git
|
|
||||||
run: |
|
|
||||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
||||||
git config --global user.name "github-actions[bot]"
|
|
||||||
|
|
||||||
- name: Merge in changes from base branch
|
- name: Merge in changes from base branch
|
||||||
id: merge
|
env:
|
||||||
|
BASE_BRANCH: ${{ github.event.pull_request.base.ref }}
|
||||||
run: |
|
run: |
|
||||||
git fetch origin "$BASE_BRANCH"
|
git fetch origin "$BASE_BRANCH"
|
||||||
|
|
||||||
# Allow merge conflicts in `lib`, since rebuilding should resolve them.
|
# Allow merge conflicts in `lib`, since rebuilding should resolve them.
|
||||||
git merge "origin/$BASE_BRANCH" || echo "Merge conflicts detected, continuing."
|
git merge "origin/$BASE_BRANCH" || echo "Merge conflicts detected"
|
||||||
MERGE_RESULT=$?
|
|
||||||
|
|
||||||
if [ "$MERGE_RESULT" -ne 0 ]; then
|
# Check for merge conflicts outside of `lib`. Disable git diff's trailing whitespace check
|
||||||
echo "merge-in-progress=true" >> $GITHUB_OUTPUT
|
# since `node_modules/@types/semver/README.md` fails it.
|
||||||
|
if git -c core.whitespace=-trailing-space diff --check | grep --invert-match '^lib/'; then
|
||||||
# Check for merge conflicts outside of `lib`. Disable git diff's trailing whitespace check
|
echo "Merge conflicts detected outside of lib/ directory. Please resolve them manually."
|
||||||
# since `node_modules/@types/semver/README.md` fails it.
|
git -c core.whitespace=-trailing-space diff --check | grep --invert-match '^lib/' || true
|
||||||
if git -c core.whitespace=-trailing-space diff --check | grep --invert-match '^lib/'; then
|
exit 1
|
||||||
echo "Merge conflicts were detected outside of the lib directory. Please resolve them manually."
|
|
||||||
git -c core.whitespace=-trailing-space diff --check | grep --invert-match '^lib/' || true
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "No merge conflicts found outside the lib directory. We should be able to resolve all of" \
|
|
||||||
"these by rebuilding the Action."
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Compile TypeScript
|
- name: Compile TypeScript
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm install
|
||||||
npm run lint -- --fix
|
npm run lint -- --fix
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.11
|
python-version: 3.11
|
||||||
|
|
||||||
- name: Sync back version updates to generated workflows
|
|
||||||
# Only sync back versions on Dependabot update PRs
|
|
||||||
if: startsWith(env.HEAD_REF, 'dependabot/')
|
|
||||||
working-directory: pr-checks
|
|
||||||
run: |
|
|
||||||
python3 sync_back.py -v
|
|
||||||
|
|
||||||
- name: Generate workflows
|
- name: Generate workflows
|
||||||
working-directory: pr-checks
|
|
||||||
run: |
|
run: |
|
||||||
|
cd pr-checks
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install ruamel.yaml==0.17.31
|
pip install ruamel.yaml==0.17.31
|
||||||
python3 sync.py
|
python3 sync.py
|
||||||
|
|
||||||
- name: "Merge in progress: Finish merge and push"
|
- name: Check for changes and push
|
||||||
if: steps.merge.outputs.merge-in-progress == 'true'
|
|
||||||
run: |
|
|
||||||
echo "Finishing merge and pushing changes."
|
|
||||||
git add --all
|
|
||||||
git commit --no-edit
|
|
||||||
git push
|
|
||||||
|
|
||||||
- name: "No merge in progress: Check for changes and push"
|
|
||||||
if: steps.merge.outputs.merge-in-progress != 'true'
|
|
||||||
id: push
|
|
||||||
run: |
|
|
||||||
if [ ! -z "$(git status --porcelain)" ]; then
|
|
||||||
echo "Changes detected, committing and pushing."
|
|
||||||
git add --all
|
|
||||||
# If the merge originally had conflicts, finish the merge.
|
|
||||||
# Otherwise, just commit the changes.
|
|
||||||
if git rev-parse --verify MERGE_HEAD >/dev/null 2>&1; then
|
|
||||||
echo "In progress merge detected, finishing it up."
|
|
||||||
git merge --continue
|
|
||||||
else
|
|
||||||
echo "No in-progress merge detected, committing changes."
|
|
||||||
git commit -m "Rebuild"
|
|
||||||
fi
|
|
||||||
echo "Pushing changes"
|
|
||||||
git push
|
|
||||||
echo "changes=true" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "No changes detected, nothing to commit."
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Notify about rebuild
|
|
||||||
if: >-
|
|
||||||
github.event_name == 'pull_request' &&
|
|
||||||
(
|
|
||||||
steps.merge.outputs.merge-in-progress == 'true' ||
|
|
||||||
steps.push.outputs.changes == 'true'
|
|
||||||
)
|
|
||||||
env:
|
env:
|
||||||
|
BRANCH: ${{ github.event.pull_request.head.ref }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
run: |
|
run: |
|
||||||
echo "Pushed a commit to rebuild the Action." \
|
if [ ! -z "$(git status --porcelain)" ]; then
|
||||||
"Please mark the PR as ready for review to trigger PR checks." |
|
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
gh pr comment --body-file - --repo github/codeql-action "$PR_NUMBER"
|
git config --global user.name "github-actions[bot]"
|
||||||
gh pr ready --undo --repo github/codeql-action "$PR_NUMBER"
|
git add --all
|
||||||
|
git commit -m "Rebuild"
|
||||||
|
git push origin "HEAD:$BRANCH"
|
||||||
|
echo "Pushed a commit to rebuild the Action." \
|
||||||
|
"Please mark the PR as ready for review to trigger PR checks." |
|
||||||
|
gh pr comment --body-file - --repo github/codeql-action "$PR_NUMBER"
|
||||||
|
gh pr ready --undo --repo github/codeql-action "$PR_NUMBER"
|
||||||
|
fi
|
||||||
|
|||||||
186
.github/workflows/rollback-release.yml
vendored
186
.github/workflows/rollback-release.yml
vendored
@@ -1,186 +0,0 @@
|
|||||||
name: Rollback release
|
|
||||||
on:
|
|
||||||
# You can trigger this workflow via workflow dispatch to start a rollback.
|
|
||||||
# This will create a draft release that mirrors the release for `rollback-tag`.
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
rollback-tag:
|
|
||||||
type: string
|
|
||||||
description: "The tag of an old release to roll-back to."
|
|
||||||
required: true
|
|
||||||
# Only for dry-runs of changes to the workflow.
|
|
||||||
push:
|
|
||||||
# Don't run dry-run on release branches, to avoid an issue where the
|
|
||||||
# "new" tag determined by the "Prepare release" job already exists.
|
|
||||||
branches-ignore:
|
|
||||||
- releases/v*
|
|
||||||
paths:
|
|
||||||
- .github/workflows/rollback-release.yml
|
|
||||||
- .github/actions/prepare-mergeback-branch/**
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
prepare:
|
|
||||||
name: "Prepare release"
|
|
||||||
if: github.repository == 'github/codeql-action'
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
uses: ./.github/workflows/prepare-release.yml
|
|
||||||
|
|
||||||
rollback:
|
|
||||||
name: "Create rollback release"
|
|
||||||
if: github.repository == 'github/codeql-action'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 45
|
|
||||||
|
|
||||||
# Don't set the deployment environment for test runs
|
|
||||||
# The Actions token does not have permissions to push changes to workflow files.
|
|
||||||
# Since workflow files may change as part of a backport PR, we use the "Automation" environment for real runs to authenticate as a GitHub App and push these changes.
|
|
||||||
environment: ${{ github.event_name == 'workflow_dispatch' && 'Automation' || '' }}
|
|
||||||
|
|
||||||
needs:
|
|
||||||
- prepare
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write # needed to push to the repo (tags and releases)
|
|
||||||
pull-requests: write # needed to create the mergeback PR
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
fetch-depth: 0 # Need full history for calculation of diffs
|
|
||||||
|
|
||||||
- name: Configure runner for release
|
|
||||||
uses: ./.github/actions/release-initialise
|
|
||||||
|
|
||||||
- name: Create tag for testing
|
|
||||||
if: github.event_name != 'workflow_dispatch'
|
|
||||||
run: git tag v0.0.0
|
|
||||||
|
|
||||||
# We start by preparing the mergeback branch, mainly so that we have the updated changelog
|
|
||||||
# readily available for the partial changelog that's needed for the release.
|
|
||||||
- name: Prepare mergeback branch
|
|
||||||
id: mergeback-branch
|
|
||||||
env:
|
|
||||||
BASE_BRANCH: ${{ (github.event_name == 'workflow_dispatch' && 'main') || github.ref_name }}
|
|
||||||
VERSION: ${{ needs.prepare.outputs.version }}
|
|
||||||
run: |
|
|
||||||
set -x
|
|
||||||
|
|
||||||
# Checkout the base branch, since we may be testing on a different branch
|
|
||||||
git checkout "$BASE_BRANCH"
|
|
||||||
|
|
||||||
# Generate a new branch name for the mergeback PR
|
|
||||||
short_sha="${GITHUB_SHA:0:8}"
|
|
||||||
NEW_BRANCH="mergeback/${VERSION}-to-${BASE_BRANCH}-${short_sha}"
|
|
||||||
echo "new-branch=${NEW_BRANCH}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
# Create the mergeback branch
|
|
||||||
git checkout -b "${NEW_BRANCH}"
|
|
||||||
|
|
||||||
- name: Prepare rollback changelog
|
|
||||||
env:
|
|
||||||
NEW_CHANGELOG: "${{ runner.temp }}/new_changelog.md"
|
|
||||||
# We usually expect to checkout `inputs.rollback-tag` (required for `workflow_dispatch`),
|
|
||||||
# but use `v0.0.0` for testing.
|
|
||||||
ROLLBACK_TAG: ${{ inputs.rollback-tag || 'v0.0.0' }}
|
|
||||||
LATEST_TAG: ${{ needs.prepare.outputs.latest_tag }}
|
|
||||||
VERSION: "${{ needs.prepare.outputs.version }}"
|
|
||||||
run: |
|
|
||||||
python .github/workflows/script/rollback_changelog.py \
|
|
||||||
--target-version "${ROLLBACK_TAG:1}" \
|
|
||||||
--rollback-version "${LATEST_TAG:1}" \
|
|
||||||
--new-version "$VERSION" > $NEW_CHANGELOG
|
|
||||||
|
|
||||||
echo "::group::New CHANGELOG"
|
|
||||||
cat $NEW_CHANGELOG
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
- name: Create tags
|
|
||||||
env:
|
|
||||||
# We usually expect to checkout `inputs.rollback-tag` (required for `workflow_dispatch`),
|
|
||||||
# but use `v0.0.0` for testing.
|
|
||||||
ROLLBACK_TAG: ${{ inputs.rollback-tag || 'v0.0.0' }}
|
|
||||||
RELEASE_TAG: ${{ needs.prepare.outputs.version }}
|
|
||||||
MAJOR_VERSION_TAG: ${{ needs.prepare.outputs.major_version }}
|
|
||||||
run: |
|
|
||||||
git checkout "refs/tags/${ROLLBACK_TAG}"
|
|
||||||
git tag --annotate "${RELEASE_TAG}" --message "${RELEASE_TAG}"
|
|
||||||
git tag --annotate "${MAJOR_VERSION_TAG}" --message "${MAJOR_VERSION_TAG}" --force
|
|
||||||
|
|
||||||
- name: Push tags
|
|
||||||
# skip when testing
|
|
||||||
if: github.event_name == 'workflow_dispatch'
|
|
||||||
env:
|
|
||||||
RELEASE_TAG: ${{ needs.prepare.outputs.version }}
|
|
||||||
MAJOR_VERSION_TAG: ${{ needs.prepare.outputs.major_version }}
|
|
||||||
run: |
|
|
||||||
git push origin --atomic --force refs/tags/"${RELEASE_TAG}" refs/tags/"${MAJOR_VERSION_TAG}"
|
|
||||||
|
|
||||||
- name: Prepare partial Changelog
|
|
||||||
env:
|
|
||||||
NEW_CHANGELOG: "${{ runner.temp }}/new_changelog.md"
|
|
||||||
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
|
|
||||||
VERSION: "${{ needs.prepare.outputs.version }}"
|
|
||||||
run: |
|
|
||||||
python .github/workflows/script/prepare_changelog.py $NEW_CHANGELOG "$VERSION" > $PARTIAL_CHANGELOG
|
|
||||||
|
|
||||||
echo "::group::Partial CHANGELOG"
|
|
||||||
cat $PARTIAL_CHANGELOG
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
- name: Generate token
|
|
||||||
if: github.event_name == 'workflow_dispatch'
|
|
||||||
uses: actions/create-github-app-token@v2.2.1
|
|
||||||
id: app-token
|
|
||||||
with:
|
|
||||||
app-id: ${{ vars.AUTOMATION_APP_ID }}
|
|
||||||
private-key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}
|
|
||||||
|
|
||||||
- name: Create the rollback release
|
|
||||||
if: github.event_name == 'workflow_dispatch'
|
|
||||||
env:
|
|
||||||
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
|
|
||||||
VERSION: "${{ needs.prepare.outputs.version }}"
|
|
||||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
||||||
RELEASE_URL: "${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ needs.prepare.outputs.version }}"
|
|
||||||
run: |
|
|
||||||
set -exu
|
|
||||||
|
|
||||||
# Do not mark this release as latest. The most recent bundle release must be marked as latest.
|
|
||||||
# Set as a draft to give us an opportunity to review the rollback release.
|
|
||||||
gh release create \
|
|
||||||
"$VERSION" \
|
|
||||||
--latest=false \
|
|
||||||
--draft \
|
|
||||||
--title "$VERSION" \
|
|
||||||
--notes-file "$PARTIAL_CHANGELOG"
|
|
||||||
|
|
||||||
echo "Created draft rollback release at $RELEASE_URL" >> $GITHUB_STEP_SUMMARY
|
|
||||||
|
|
||||||
- name: Update changelog
|
|
||||||
env:
|
|
||||||
NEW_CHANGELOG: "${{ runner.temp }}/new_changelog.md"
|
|
||||||
NEW_BRANCH: "${{ steps.mergeback-branch.outputs.new-branch }}"
|
|
||||||
run: |
|
|
||||||
git checkout "${NEW_BRANCH}"
|
|
||||||
mv ${NEW_CHANGELOG} CHANGELOG.md
|
|
||||||
|
|
||||||
- name: Create mergeback branch and PR
|
|
||||||
uses: ./.github/actions/prepare-mergeback-branch
|
|
||||||
with:
|
|
||||||
base: "main"
|
|
||||||
head: ""
|
|
||||||
branch: "${{ steps.mergeback-branch.outputs.new-branch }}"
|
|
||||||
version: "${{ needs.prepare.outputs.version }}"
|
|
||||||
token: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
# Setting this to `true` for non-workflow_dispatch events will
|
|
||||||
# still push the `branch`, but won't create a corresponding PR
|
|
||||||
dry-run: "${{ github.event_name != 'workflow_dispatch' }}"
|
|
||||||
|
|
||||||
18
.github/workflows/script/bundle_changelog.py
vendored
18
.github/workflows/script/bundle_changelog.py
vendored
@@ -1,18 +0,0 @@
|
|||||||
import os
|
|
||||||
import re
|
|
||||||
|
|
||||||
# Get the PR number from the PR URL.
|
|
||||||
pr_number = os.environ['PR_URL'].split('/')[-1]
|
|
||||||
changelog_note = f"- Update default CodeQL bundle version to {os.environ['CLI_VERSION']}. [#{pr_number}]({os.environ['PR_URL']})"
|
|
||||||
|
|
||||||
# If the "[UNRELEASED]" section starts with "no user facing changes", remove that line.
|
|
||||||
with open('CHANGELOG.md', 'r') as f:
|
|
||||||
changelog = f.read()
|
|
||||||
|
|
||||||
changelog = changelog.replace('## [UNRELEASED]\n\nNo user facing changes.', '## [UNRELEASED]\n')
|
|
||||||
|
|
||||||
# Add the changelog note to the bottom of the "[UNRELEASED]" section.
|
|
||||||
changelog = re.sub(r'\n## (\d+\.\d+\.\d+)', f'{changelog_note}\n\n## \\1', changelog, count=1)
|
|
||||||
|
|
||||||
with open('CHANGELOG.md', 'w') as f:
|
|
||||||
f.write(changelog)
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user