Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main into releases/v2 #1655

Merged
merged 28 commits into from Apr 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4772c1d
Bump minimum version to 2.8.5
henrymercer Mar 28, 2023
d8fe76e
Delete legacy tracing
henrymercer Mar 28, 2023
d13d683
Bump minor version number and add changelog note
henrymercer Mar 28, 2023
6ef3700
Update CodeQL releases used in PR checks
henrymercer Mar 28, 2023
6cd5121
Merge branch 'main' into henrymercer/remove-legacy-tracing
henrymercer Mar 29, 2023
9975b73
Fix bundle version comments
henrymercer Mar 29, 2023
72d018e
Improve serialization of Swift environment variable if expression
henrymercer Mar 29, 2023
d838bac
Simplify matrix
henrymercer Mar 29, 2023
f7a67e4
Merge branch 'main' into henrymercer/remove-legacy-tracing
henrymercer Apr 5, 2023
322cea6
Set up Swift in local bundle workflow
henrymercer Apr 5, 2023
5da64f5
Set up Swift in unset environment workflow
henrymercer Apr 5, 2023
2058418
Don't expect Swift baseline info on Windows
henrymercer Apr 5, 2023
8a093aa
Merge branch 'main' into henrymercer/remove-legacy-tracing
henrymercer Apr 11, 2023
7879209
Update changelog and version after v2.2.12
invalid-email-address Apr 13, 2023
b4fa971
Update checked-in dependencies
invalid-email-address Apr 13, 2023
dc04638
Merge pull request #1647 from github/mergeback/v2.2.12-to-main-7df0ce34
henrymercer Apr 13, 2023
ae24b75
Fix pre-release trigger for update-bundle action
cklin Apr 14, 2023
be2b53b
Merge pull request #1648 from github/cklin/update-bundle-trigger
cklin Apr 14, 2023
7867d03
Update default CodeQL bundle version to 2.13.0
cklin Apr 14, 2023
9a866ed
Bump swift-actions/setup-swift in /.github/actions/setup-swift (#1650)
dependabot[bot] Apr 17, 2023
1c2f282
Fix bundle version
henrymercer Apr 18, 2023
55a2e70
Autoformat `index.ts`
henrymercer Apr 18, 2023
afdf30f
Merge pull request #1652 from github/henrymercer/fix-bundle-version
henrymercer Apr 18, 2023
66f62df
Merge branch 'main' into henrymercer/remove-legacy-tracing
henrymercer Apr 19, 2023
7019a9c
Merge pull request #1618 from github/henrymercer/remove-legacy-tracing
henrymercer Apr 20, 2023
b8cc643
Merge branch 'main' into cklin/codeql-cli-2.13.0
henrymercer Apr 20, 2023
a8affb0
Merge pull request #1649 from github/cklin/codeql-cli-2.13.0
cklin Apr 20, 2023
b203f98
Update changelog for v2.3.0
invalid-email-address Apr 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/actions/setup-swift/action.yml
@@ -1,18 +1,18 @@
name: "Set up Swift"
description: Performs necessary steps to set up appropriate Swift version.
description: Sets up an appropriate Swift version if Swift is enabled via CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT.
inputs:
codeql-path:
description: Path to the CodeQL CLI executable.
required: true
runs:
using: "composite"
steps:
- name: Get Swift version
id: get_swift_version
# We don't support Swift on Windows or prior versions of CLI.
if: "(runner.os != 'Windows') && (matrix.version == 'cached' || matrix.version == 'latest' || matrix.version == 'nightly-latest')"
if: env.CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT == 'true'
shell: bash
env:
CODEQL_PATH: ${{inputs.codeql-path}}
CODEQL_PATH: ${{ inputs.codeql-path }}
run: |
if [ $RUNNER_OS = "macOS" ]; then
PLATFORM="osx64"
Expand All @@ -26,7 +26,7 @@ runs:
VERSION="5.7.0"
fi
echo "version=$VERSION" | tee -a $GITHUB_OUTPUT
- uses: swift-actions/setup-swift@da0e3e04b5e3e15dbc3861bd835ad9f0afe56296 # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test.
if: "(runner.os != 'Windows') && (matrix.version == 'cached' || matrix.version == 'latest' || matrix.version == 'nightly-latest')"
- uses: swift-actions/setup-swift@65540b95f51493d65f5e59e97dcef9629ddf11bf # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test.
if: env.CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT == 'true'
with:
swift-version: "${{steps.get_swift_version.outputs.version}}"
swift-version: "${{ steps.get_swift_version.outputs.version }}"
80 changes: 39 additions & 41 deletions .github/actions/update-bundle/index.ts
Expand Up @@ -13,57 +13,55 @@ interface Defaults {
priorCliVersion: string;
}

const CODEQL_BUNDLE_PREFIX = 'codeql-bundle-';

function getCodeQLCliVersionForRelease(release): string {
// We do not currently tag CodeQL bundles based on the CLI version they contain.
// Instead, we use a marker file `cli-version-<version>.txt` to record the CLI version.
// This marker file is uploaded as a release asset for all new CodeQL bundles.
const cliVersionsFromMarkerFiles = release.assets
.map((asset) => asset.name.match(/cli-version-(.*)\.txt/)?.[1])
.filter((v) => v)
.map((v) => v as string);
.map((asset) => asset.name.match(/cli-version-(.*)\.txt/)?.[1])
.filter((v) => v)
.map((v) => v as string);
if (cliVersionsFromMarkerFiles.length > 1) {
throw new Error(
`Release ${release.tag_name} has multiple CLI version marker files.`
);
} else if (cliVersionsFromMarkerFiles.length === 0) {
throw new Error(
`Failed to find the CodeQL CLI version for release ${release.tag_name}.`
);
}
return cliVersionsFromMarkerFiles[0];
}
);
} else if (cliVersionsFromMarkerFiles.length === 0) {
throw new Error(
`Failed to find the CodeQL CLI version for release ${release.tag_name}.`
);
}
return cliVersionsFromMarkerFiles[0];
}

async function getBundleInfoFromRelease(release): Promise<BundleInfo> {
return {
bundleVersion: release.tag_name.substring(CODEQL_BUNDLE_PREFIX.length),
cliVersion: getCodeQLCliVersionForRelease(release)
};
}
async function getBundleInfoFromRelease(release): Promise<BundleInfo> {
return {
bundleVersion: release.tag_name,
cliVersion: getCodeQLCliVersionForRelease(release)
};
}

async function getNewDefaults(currentDefaults: Defaults): Promise<Defaults> {
const release = github.context.payload.release;
console.log('Updating default bundle as a result of the following release: ' +
`${JSON.stringify(release)}.`)
async function getNewDefaults(currentDefaults: Defaults): Promise<Defaults> {
const release = github.context.payload.release;
console.log('Updating default bundle as a result of the following release: ' +
`${JSON.stringify(release)}.`)

const bundleInfo = await getBundleInfoFromRelease(release);
return {
bundleVersion: bundleInfo.bundleVersion,
cliVersion: bundleInfo.cliVersion,
priorBundleVersion: currentDefaults.bundleVersion,
priorCliVersion: currentDefaults.cliVersion
};
}
const bundleInfo = await getBundleInfoFromRelease(release);
return {
bundleVersion: bundleInfo.bundleVersion,
cliVersion: bundleInfo.cliVersion,
priorBundleVersion: currentDefaults.bundleVersion,
priorCliVersion: currentDefaults.cliVersion
};
}

async function main() {
const previousDefaults: Defaults = JSON.parse(fs.readFileSync('../../../src/defaults.json', 'utf8'));
const newDefaults = await getNewDefaults(previousDefaults);
// Update the source file in the repository. Calling workflows should subsequently rebuild
// the Action to update `lib/defaults.json`.
fs.writeFileSync('../../../src/defaults.json', JSON.stringify(newDefaults, null, 2) + "\n");
}
async function main() {
const previousDefaults: Defaults = JSON.parse(fs.readFileSync('../../../src/defaults.json', 'utf8'));
const newDefaults = await getNewDefaults(previousDefaults);
// Update the source file in the repository. Calling workflows should subsequently rebuild
// the Action to update `lib/defaults.json`.
fs.writeFileSync('../../../src/defaults.json', JSON.stringify(newDefaults, null, 2) + "\n");
}

// Ideally, we'd await main() here, but that doesn't work well with `ts-node`.
// So instead we rely on the fact that Node won't exit until the event loop is empty.
main();
// Ideally, we'd await main() here, but that doesn't work well with `ts-node`.
// So instead we rely on the fact that Node won't exit until the event loop is empty.
main();
46 changes: 29 additions & 17 deletions .github/workflows/__analyze-ref-input.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .github/workflows/__autobuild-action.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .github/workflows/__config-export.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .github/workflows/__diagnostics-export.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 15 additions & 2 deletions .github/workflows/__export-file-baseline-information.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .github/workflows/__extractor-ram-threads.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 29 additions & 17 deletions .github/workflows/__go-custom-queries.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.