-
Notifications
You must be signed in to change notification settings - Fork 429
Add warning and update PR checks for Swift on Linux #2399
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
Conversation
7bac0e4 to
c470a9e
Compare
cb826c1 to
d0fa9dd
Compare
d0fa9dd to
ea4581b
Compare
henrymercer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, a couple of suggestions
| @@ -1,28 +1,30 @@ | |||
| name: "Multi-language repository" | |||
| description: "An end-to-end integration test of a multi-language repository using automatic language detection" | |||
| description: "An end-to-end integration test of a multi-language repository using automatic language detection for MacOS" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| description: "An end-to-end integration test of a multi-language repository using automatic language detection for MacOS" | |
| description: "An end-to-end integration test of a multi-language repository using automatic language detection" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 I added the bit about MacOS because the test actually no longer tests autodetect for MacOS (since I had to manually exclude Swift from the languages input).
| if: runner.os == 'Linux' | ||
| with: | ||
| db-location: "${{ runner.temp }}/customDbLocation" | ||
| # We manually exclude Swift from the languages list here, as it is not supported on Ubuntu | ||
| languages: cpp,csharp,go,java,javascript,python,ruby | ||
| tools: ${{ steps.prepare-test.outputs.tools-url }} | ||
|
|
||
| - uses: ./../action/init | ||
| id: init-macos | ||
| if: runner.os == 'macOS' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively we could make the languages input conditional, e.g. something like languages: ${{ runner.os == 'Linus' && 'cpp,csharp,go,java,javascript,python,ruby' || '' }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that's a good point! I had thought that an empty languages input might cause us to run with no languages but it looks like we guard against that and turn autodetect on:
codeql-action/src/config-utils.ts
Lines 384 to 392 in 5cdd182
| let rawLanguages = (languagesInput || "") | |
| .split(",") | |
| .map((x) => x.trim().toLowerCase()) | |
| .filter((x) => x.length > 0); | |
| let autodetected: boolean; | |
| if (rawLanguages.length) { | |
| autodetected = false; | |
| } else { | |
| autodetected = true; |
aeisenberg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Looks good after the typo is fixed.
Co-authored-by: Andrew Eisenberg <[email protected]>
|
Pushed a commit to rebuild the Action. Please mark the PR as ready for review to trigger PR checks. |
|
Huh.. not sure why the |
We are deprecating Swift support on Linux for code scanning (changenote in #2403).
This PR logs a warning for users in the
initAction if it's determined that Swift on Linux is being run.This change also updates the manual build script
build.shwhich we also use in internal repositories for testing: theswiftcommand will only be run on MacOS rather than on both MacOS and Linux.As a result, we can also update our PR checks that only test on Linux, to remove the
setup-swiftAction step as it is no longer needed; and other checks that look for the existence of Swift databases on Linux.I've removed
Swift analysis using a custom build commandcheck on Linux images from required checks formain,releases/v3, andreleases/v2already as well.Merge / deployment checklist