Skip to content

Commit

Permalink
Use Swift version 5.7 in PR checks
Browse files Browse the repository at this point in the history
The version installed in the latest runner image, 5.7.1, is not yet
supported.
  • Loading branch information
Henry Mercer committed Nov 22, 2022
1 parent bab5a14 commit e9e73b0
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 4 deletions.
4 changes: 4 additions & 0 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.

19 changes: 17 additions & 2 deletions .github/workflows/__multi-language-autodetect.yml

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

3 changes: 3 additions & 0 deletions .github/workflows/__swift-autobuild.yml

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

3 changes: 3 additions & 0 deletions .github/workflows/__swift-custom-build.yml

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

4 changes: 4 additions & 0 deletions pr-checks/checks/export-file-baseline-information.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: "Export file baseline information"
description: "Tests that file baseline information is exported when the feature is enabled"
versions: ["nightly-latest"]
steps:
- uses: swift-actions/setup-swift@v1
if: "!startsWith(matrix.os, 'windows')"
with:
swift-version: 5.7
- uses: ./../action/init
with:
languages: javascript
Expand Down
18 changes: 16 additions & 2 deletions pr-checks/checks/multi-language-autodetect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,23 @@ operatingSystems: ["ubuntu", "macos"]
env:
CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT: "true" # Remove when Swift is GA.
steps:
- uses: swift-actions/setup-swift@v1
if: "!startsWith(matrix.os, 'windows')"
with:
swift-version: 5.7

- uses: ./../action/init
with:
db-location: "${{ runner.temp }}/customDbLocation"
tools: ${{ steps.prepare-test.outputs.tools-url }}

- name: Build code
shell: bash
run: ./build.sh

- uses: ./../action/analyze
id: analysis

- name: Check language autodetect for all languages excluding Ruby, Swift
shell: bash
run: |
Expand Down Expand Up @@ -46,7 +54,8 @@ steps:
echo "Did not create a database for Python, or created it in the wrong location."
exit 1
fi
- name: Check language autodetect for Ruby, Swift
- name: Check language autodetect for Ruby
if: "(matrix.version == 'cached' || matrix.version == 'latest' || matrix.version == 'nightly-latest')"
shell: bash
run: |
Expand All @@ -55,8 +64,13 @@ steps:
echo "Did not create a database for Ruby, or created it in the wrong location."
exit 1
fi
- name: Check language autodetect for Swift
if: "!startsWith(matrix.os, 'windows') && (matrix.version == 'cached' || matrix.version == 'latest' || matrix.version == 'nightly-latest')"
shell: bash
run: |
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}
if [[ ! -d $SWIFT_DB ]] || [[ ! $SWIFT_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
echo "Did not create a database for Swift, or created it in the wrong location."
exit 1
fi
fi
3 changes: 3 additions & 0 deletions pr-checks/checks/swift-autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ operatingSystems: ["macos"]
env:
CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT: "true"
steps:
- uses: swift-actions/setup-swift@v1
with:
swift-version: 5.7
- uses: ./../action/init
with:
languages: swift
Expand Down
3 changes: 3 additions & 0 deletions pr-checks/checks/swift-custom-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ env:
CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT: "true"
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
steps:
- uses: swift-actions/setup-swift@v1
with:
swift-version: 5.7
- uses: ./../action/init
with:
languages: swift
Expand Down

0 comments on commit e9e73b0

Please sign in to comment.