Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit def4f60

Browse files
authored
Merge pull request #1387 from github/henrymercer/fix-swift-version
Use Swift version 5.7 in PR checks
2 parents bab5a14 + 34d91a9 commit def4f60

12 files changed

+57
-12
lines changed

.github/workflows/__export-file-baseline-information.yml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__ml-powered-queries.yml

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__multi-language-autodetect.yml

Lines changed: 17 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__ruby.yml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__swift-autobuild.yml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__swift-custom-build.yml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pr-checks/checks/export-file-baseline-information.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: "Export file baseline information"
22
description: "Tests that file baseline information is exported when the feature is enabled"
33
versions: ["nightly-latest"]
44
steps:
5+
- uses: swift-actions/setup-swift@5cdaa9161ad1f55ae39a5ea1784ef96de72f95d9
6+
if: runner.os != 'Windows'
7+
with:
8+
swift-version: "5.7"
59
- uses: ./../action/init
610
with:
711
languages: javascript

pr-checks/checks/ml-powered-queries.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ steps:
3030
- name: Check sarif
3131
uses: ./../action/.github/check-sarif
3232
# Running on Windows requires CodeQL CLI 2.9.0+.
33-
if: "!(matrix.version == 'stable-20220120' && (matrix.os == 'windows-latest' || matrix.os == 'windows-2019'))"
33+
if: "!(matrix.version == 'stable-20220120' && runner.os == 'Windows')"
3434
with:
3535
sarif-file: ${{ runner.temp }}/results/javascript.sarif
3636
queries-run: js/ml-powered/nosql-injection,js/ml-powered/path-injection,js/ml-powered/sql-injection,js/ml-powered/xss
@@ -39,7 +39,7 @@ steps:
3939
- name: Check results
4040
env:
4141
# Running on Windows requires CodeQL CLI 2.9.0+.
42-
SHOULD_RUN_ML_POWERED_QUERIES: ${{ !(matrix.version == 'stable-20220120' && (matrix.os == 'windows-latest' || matrix.os == 'windows-2019')) }}
42+
SHOULD_RUN_ML_POWERED_QUERIES: ${{ !(matrix.version == 'stable-20220120' && runner.os == 'Windows') }}
4343
shell: bash
4444
run: |
4545
echo "Expecting ML-powered queries to be run: ${SHOULD_RUN_ML_POWERED_QUERIES}"

pr-checks/checks/multi-language-autodetect.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,23 @@ operatingSystems: ["ubuntu", "macos"]
44
env:
55
CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT: "true" # Remove when Swift is GA.
66
steps:
7+
- uses: swift-actions/setup-swift@5cdaa9161ad1f55ae39a5ea1784ef96de72f95d9
8+
if: runner.os != 'Windows'
9+
with:
10+
swift-version: "5.7"
11+
712
- uses: ./../action/init
813
with:
914
db-location: "${{ runner.temp }}/customDbLocation"
1015
tools: ${{ steps.prepare-test.outputs.tools-url }}
16+
1117
- name: Build code
1218
shell: bash
1319
run: ./build.sh
20+
1421
- uses: ./../action/analyze
1522
id: analysis
23+
1624
- name: Check language autodetect for all languages excluding Ruby, Swift
1725
shell: bash
1826
run: |
@@ -46,7 +54,8 @@ steps:
4654
echo "Did not create a database for Python, or created it in the wrong location."
4755
exit 1
4856
fi
49-
- name: Check language autodetect for Ruby, Swift
57+
58+
- name: Check language autodetect for Ruby
5059
if: "(matrix.version == 'cached' || matrix.version == 'latest' || matrix.version == 'nightly-latest')"
5160
shell: bash
5261
run: |
@@ -55,8 +64,13 @@ steps:
5564
echo "Did not create a database for Ruby, or created it in the wrong location."
5665
exit 1
5766
fi
67+
68+
- name: Check language autodetect for Swift
69+
if: "!startsWith(matrix.os, 'windows') && (matrix.version == 'cached' || matrix.version == 'latest' || matrix.version == 'nightly-latest')"
70+
shell: bash
71+
run: |
5872
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}
5973
if [[ ! -d $SWIFT_DB ]] || [[ ! $SWIFT_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
6074
echo "Did not create a database for Swift, or created it in the wrong location."
6175
exit 1
62-
fi
76+
fi

pr-checks/checks/ruby.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: "Ruby analysis"
22
description: "Tests creation of a Ruby database"
33
versions: ["latest", "cached", "nightly-latest"]
44
operatingSystems: ["ubuntu", "macos"]
5-
env:
6-
CODEQL_ENABLE_EXPERIMENTAL_FEATURES: "true"
75
steps:
86
- uses: ./../action/init
97
with:

pr-checks/checks/swift-autobuild.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ operatingSystems: ["macos"]
66
env:
77
CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT: "true"
88
steps:
9+
- uses: swift-actions/setup-swift@5cdaa9161ad1f55ae39a5ea1784ef96de72f95d9
10+
with:
11+
swift-version: "5.7"
912
- uses: ./../action/init
1013
with:
1114
languages: swift

pr-checks/checks/swift-custom-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ env:
66
CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT: "true"
77
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
88
steps:
9+
- uses: swift-actions/setup-swift@5cdaa9161ad1f55ae39a5ea1784ef96de72f95d9
10+
with:
11+
swift-version: "5.7"
912
- uses: ./../action/init
1013
with:
1114
languages: swift

0 commit comments

Comments
 (0)