Add warning and update PR checks for Swift on Linux (#2399)
* PR checks: Only run Swift build command on MacOS * PR checks: update to only test Swift on MacOS * Log warning if workflow is running Swift on Ubuntu --------- Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
This commit is contained in:
parent
8b7d7393fb
commit
9c646c24a4
20 changed files with 66 additions and 64 deletions
|
|
@ -7,10 +7,9 @@ steps:
|
|||
- 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: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
- uses: ./../action/.github/actions/setup-swift
|
||||
with:
|
||||
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
||||
- name: Build code
|
||||
shell: bash
|
||||
run: ./build.sh
|
||||
|
|
|
|||
|
|
@ -20,10 +20,6 @@ steps:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
- uses: ./../action/.github/actions/setup-swift
|
||||
with:
|
||||
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
||||
|
||||
- name: Build code
|
||||
shell: bash
|
||||
run: ./build.sh
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ steps:
|
|||
run: |
|
||||
cd "$RUNNER_TEMP/results"
|
||||
expected_baseline_languages="c csharp go java kotlin javascript python ruby"
|
||||
if [[ $RUNNER_OS != "Windows" ]]; then
|
||||
if [[ $RUNNER_OS == "macOS" ]]; then
|
||||
expected_baseline_languages+=" swift"
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,6 @@
|
|||
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"
|
||||
operatingSystems: ["macos", "ubuntu"]
|
||||
excludeOsAndVersionCombination: [
|
||||
# Known failure for Swift on Linux before CLI v2.17.4.
|
||||
[ "ubuntu", "stable-20230403" ],
|
||||
[ "ubuntu", "stable-v2.13.5" ],
|
||||
[ "ubuntu", "stable-v2.14.6" ],
|
||||
[ "ubuntu", "stable-v2.15.5" ],
|
||||
[ "ubuntu", "stable-v2.16.6" ],
|
||||
]
|
||||
steps:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
|
|
@ -18,9 +10,12 @@ steps:
|
|||
id: init
|
||||
with:
|
||||
db-location: "${{ runner.temp }}/customDbLocation"
|
||||
# Swift is not supported on Ubuntu so we manually exclude it from the list here
|
||||
languages: ${{ runner.os == 'Linux' && 'cpp,csharp,go,java,javascript,python,ruby' || '' }}
|
||||
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 }}
|
||||
|
||||
|
|
@ -72,8 +67,8 @@ steps:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
- name: Check language autodetect for Swift
|
||||
if: runner.os != 'Windows' && matrix.version != 'stable-20230403'
|
||||
- name: Check language autodetect for Swift on MacOS
|
||||
if: runner.os == 'macOS' && matrix.version != 'stable-20230403'
|
||||
shell: bash
|
||||
run: |
|
||||
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
name: "Swift analysis using a custom build command"
|
||||
description: "Tests creation of a Swift database using custom build"
|
||||
versions: ["linked", "default", "nightly-latest"]
|
||||
operatingSystems: ["macos", "ubuntu"]
|
||||
operatingSystems: ["macos"]
|
||||
env:
|
||||
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
|
||||
steps:
|
||||
|
|
|
|||
|
|
@ -12,10 +12,9 @@ steps:
|
|||
- 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.gz
|
||||
- uses: ./../action/.github/actions/setup-swift
|
||||
with:
|
||||
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
||||
- name: Build code
|
||||
shell: bash
|
||||
run: ./build.sh
|
||||
|
|
|
|||
|
|
@ -1,24 +1,15 @@
|
|||
name: "Test unsetting environment variables"
|
||||
description: "An end-to-end integration test that unsets some environment variables"
|
||||
operatingSystems: ["ubuntu"]
|
||||
excludeOsAndVersionCombination: [
|
||||
# Known failure for Swift on Linux before CLI v2.17.4.
|
||||
[ "ubuntu", "stable-20230403" ],
|
||||
[ "ubuntu", "stable-v2.13.5" ],
|
||||
[ "ubuntu", "stable-v2.14.6" ],
|
||||
[ "ubuntu", "stable-v2.15.5" ],
|
||||
[ "ubuntu", "stable-v2.16.6" ],
|
||||
]
|
||||
|
||||
steps:
|
||||
- uses: ./../action/init
|
||||
id: init
|
||||
with:
|
||||
db-location: ${{ runner.temp }}/customDbLocation
|
||||
# Swift is not supported on Ubuntu so we manually exclude it from the list here
|
||||
languages: cpp,csharp,go,java,javascript,python,ruby
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
- uses: ./../action/.github/actions/setup-swift
|
||||
with:
|
||||
codeql-path: ${{ steps.init.outputs.codeql-path }}
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '>=1.21.0'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue