Merge pull request #1387 from github/henrymercer/fix-swift-version
Use Swift version 5.7 in PR checks
This commit is contained in:
commit
def4f60c6c
12 changed files with 57 additions and 12 deletions
4
.github/workflows/__export-file-baseline-information.yml
generated
vendored
4
.github/workflows/__export-file-baseline-information.yml
generated
vendored
|
|
@ -42,6 +42,10 @@ jobs:
|
||||||
uses: ./.github/prepare-test
|
uses: ./.github/prepare-test
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
|
- uses: swift-actions/setup-swift@5cdaa9161ad1f55ae39a5ea1784ef96de72f95d9
|
||||||
|
if: runner.os != 'Windows'
|
||||||
|
with:
|
||||||
|
swift-version: '5.7'
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
|
|
|
||||||
5
.github/workflows/__ml-powered-queries.yml
generated
vendored
5
.github/workflows/__ml-powered-queries.yml
generated
vendored
|
|
@ -87,8 +87,7 @@ jobs:
|
||||||
- name: Check sarif
|
- name: Check sarif
|
||||||
uses: ./../action/.github/check-sarif
|
uses: ./../action/.github/check-sarif
|
||||||
# Running on Windows requires CodeQL CLI 2.9.0+.
|
# Running on Windows requires CodeQL CLI 2.9.0+.
|
||||||
if: "!(matrix.version == 'stable-20220120' && (matrix.os == 'windows-latest'\
|
if: "!(matrix.version == 'stable-20220120' && runner.os == 'Windows')"
|
||||||
\ || matrix.os == 'windows-2019'))"
|
|
||||||
with:
|
with:
|
||||||
sarif-file: ${{ runner.temp }}/results/javascript.sarif
|
sarif-file: ${{ runner.temp }}/results/javascript.sarif
|
||||||
queries-run: js/ml-powered/nosql-injection,js/ml-powered/path-injection,js/ml-powered/sql-injection,js/ml-powered/xss
|
queries-run: js/ml-powered/nosql-injection,js/ml-powered/path-injection,js/ml-powered/sql-injection,js/ml-powered/xss
|
||||||
|
|
@ -98,7 +97,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
# Running on Windows requires CodeQL CLI 2.9.0+.
|
# Running on Windows requires CodeQL CLI 2.9.0+.
|
||||||
SHOULD_RUN_ML_POWERED_QUERIES: ${{ !(matrix.version == 'stable-20220120' &&
|
SHOULD_RUN_ML_POWERED_QUERIES: ${{ !(matrix.version == 'stable-20220120' &&
|
||||||
(matrix.os == 'windows-latest' || matrix.os == 'windows-2019')) }}
|
runner.os == 'Windows') }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Expecting ML-powered queries to be run: ${SHOULD_RUN_ML_POWERED_QUERIES}"
|
echo "Expecting ML-powered queries to be run: ${SHOULD_RUN_ML_POWERED_QUERIES}"
|
||||||
|
|
|
||||||
19
.github/workflows/__multi-language-autodetect.yml
generated
vendored
19
.github/workflows/__multi-language-autodetect.yml
generated
vendored
|
|
@ -65,15 +65,23 @@ jobs:
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ^1.13.1
|
go-version: ^1.13.1
|
||||||
|
- uses: swift-actions/setup-swift@5cdaa9161ad1f55ae39a5ea1784ef96de72f95d9
|
||||||
|
if: runner.os != 'Windows'
|
||||||
|
with:
|
||||||
|
swift-version: '5.7'
|
||||||
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
db-location: ${{ runner.temp }}/customDbLocation
|
db-location: ${{ runner.temp }}/customDbLocation
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
- name: Build code
|
- name: Build code
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
|
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
id: analysis
|
id: analysis
|
||||||
|
|
||||||
- name: Check language autodetect for all languages excluding Ruby, Swift
|
- name: Check language autodetect for all languages excluding Ruby, Swift
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -107,16 +115,23 @@ jobs:
|
||||||
echo "Did not create a database for Python, or created it in the wrong location."
|
echo "Did not create a database for Python, or created it in the wrong location."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
- name: Check language autodetect for Ruby, Swift
|
|
||||||
|
- name: Check language autodetect for Ruby
|
||||||
if: (matrix.version == 'cached' || matrix.version == 'latest' || matrix.version
|
if: (matrix.version == 'cached' || matrix.version == 'latest' || matrix.version
|
||||||
== 'nightly-latest')
|
== 'nightly-latest')
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |-
|
run: |
|
||||||
RUBY_DB=${{ fromJson(steps.analysis.outputs.db-locations).ruby }}
|
RUBY_DB=${{ fromJson(steps.analysis.outputs.db-locations).ruby }}
|
||||||
if [[ ! -d $RUBY_DB ]] || [[ ! $RUBY_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
|
if [[ ! -d $RUBY_DB ]] || [[ ! $RUBY_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
|
||||||
echo "Did not create a database for Ruby, or created it in the wrong location."
|
echo "Did not create a database for Ruby, or created it in the wrong location."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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 }}
|
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}
|
||||||
if [[ ! -d $SWIFT_DB ]] || [[ ! $SWIFT_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
|
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."
|
echo "Did not create a database for Swift, or created it in the wrong location."
|
||||||
|
|
|
||||||
1
.github/workflows/__ruby.yml
generated
vendored
1
.github/workflows/__ruby.yml
generated
vendored
|
|
@ -63,5 +63,4 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
env:
|
env:
|
||||||
CODEQL_ENABLE_EXPERIMENTAL_FEATURES: 'true'
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
|
|
|
||||||
3
.github/workflows/__swift-autobuild.yml
generated
vendored
3
.github/workflows/__swift-autobuild.yml
generated
vendored
|
|
@ -42,6 +42,9 @@ jobs:
|
||||||
uses: ./.github/prepare-test
|
uses: ./.github/prepare-test
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
|
- uses: swift-actions/setup-swift@5cdaa9161ad1f55ae39a5ea1784ef96de72f95d9
|
||||||
|
with:
|
||||||
|
swift-version: '5.7'
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: swift
|
languages: swift
|
||||||
|
|
|
||||||
3
.github/workflows/__swift-custom-build.yml
generated
vendored
3
.github/workflows/__swift-custom-build.yml
generated
vendored
|
|
@ -48,6 +48,9 @@ jobs:
|
||||||
uses: ./.github/prepare-test
|
uses: ./.github/prepare-test
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
|
- uses: swift-actions/setup-swift@5cdaa9161ad1f55ae39a5ea1784ef96de72f95d9
|
||||||
|
with:
|
||||||
|
swift-version: '5.7'
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: swift
|
languages: swift
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,10 @@ name: "Export file baseline information"
|
||||||
description: "Tests that file baseline information is exported when the feature is enabled"
|
description: "Tests that file baseline information is exported when the feature is enabled"
|
||||||
versions: ["nightly-latest"]
|
versions: ["nightly-latest"]
|
||||||
steps:
|
steps:
|
||||||
|
- uses: swift-actions/setup-swift@5cdaa9161ad1f55ae39a5ea1784ef96de72f95d9
|
||||||
|
if: runner.os != 'Windows'
|
||||||
|
with:
|
||||||
|
swift-version: "5.7"
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ steps:
|
||||||
- name: Check sarif
|
- name: Check sarif
|
||||||
uses: ./../action/.github/check-sarif
|
uses: ./../action/.github/check-sarif
|
||||||
# Running on Windows requires CodeQL CLI 2.9.0+.
|
# Running on Windows requires CodeQL CLI 2.9.0+.
|
||||||
if: "!(matrix.version == 'stable-20220120' && (matrix.os == 'windows-latest' || matrix.os == 'windows-2019'))"
|
if: "!(matrix.version == 'stable-20220120' && runner.os == 'Windows')"
|
||||||
with:
|
with:
|
||||||
sarif-file: ${{ runner.temp }}/results/javascript.sarif
|
sarif-file: ${{ runner.temp }}/results/javascript.sarif
|
||||||
queries-run: js/ml-powered/nosql-injection,js/ml-powered/path-injection,js/ml-powered/sql-injection,js/ml-powered/xss
|
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:
|
||||||
- name: Check results
|
- name: Check results
|
||||||
env:
|
env:
|
||||||
# Running on Windows requires CodeQL CLI 2.9.0+.
|
# Running on Windows requires CodeQL CLI 2.9.0+.
|
||||||
SHOULD_RUN_ML_POWERED_QUERIES: ${{ !(matrix.version == 'stable-20220120' && (matrix.os == 'windows-latest' || matrix.os == 'windows-2019')) }}
|
SHOULD_RUN_ML_POWERED_QUERIES: ${{ !(matrix.version == 'stable-20220120' && runner.os == 'Windows') }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Expecting ML-powered queries to be run: ${SHOULD_RUN_ML_POWERED_QUERIES}"
|
echo "Expecting ML-powered queries to be run: ${SHOULD_RUN_ML_POWERED_QUERIES}"
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,23 @@ operatingSystems: ["ubuntu", "macos"]
|
||||||
env:
|
env:
|
||||||
CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT: "true" # Remove when Swift is GA.
|
CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT: "true" # Remove when Swift is GA.
|
||||||
steps:
|
steps:
|
||||||
|
- uses: swift-actions/setup-swift@5cdaa9161ad1f55ae39a5ea1784ef96de72f95d9
|
||||||
|
if: runner.os != 'Windows'
|
||||||
|
with:
|
||||||
|
swift-version: "5.7"
|
||||||
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
db-location: "${{ runner.temp }}/customDbLocation"
|
db-location: "${{ runner.temp }}/customDbLocation"
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
- name: Build code
|
- name: Build code
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
|
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
id: analysis
|
id: analysis
|
||||||
|
|
||||||
- name: Check language autodetect for all languages excluding Ruby, Swift
|
- name: Check language autodetect for all languages excluding Ruby, Swift
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -46,7 +54,8 @@ steps:
|
||||||
echo "Did not create a database for Python, or created it in the wrong location."
|
echo "Did not create a database for Python, or created it in the wrong location."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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')"
|
if: "(matrix.version == 'cached' || matrix.version == 'latest' || matrix.version == 'nightly-latest')"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -55,8 +64,13 @@ steps:
|
||||||
echo "Did not create a database for Ruby, or created it in the wrong location."
|
echo "Did not create a database for Ruby, or created it in the wrong location."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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 }}
|
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}
|
||||||
if [[ ! -d $SWIFT_DB ]] || [[ ! $SWIFT_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
|
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."
|
echo "Did not create a database for Swift, or created it in the wrong location."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@ name: "Ruby analysis"
|
||||||
description: "Tests creation of a Ruby database"
|
description: "Tests creation of a Ruby database"
|
||||||
versions: ["latest", "cached", "nightly-latest"]
|
versions: ["latest", "cached", "nightly-latest"]
|
||||||
operatingSystems: ["ubuntu", "macos"]
|
operatingSystems: ["ubuntu", "macos"]
|
||||||
env:
|
|
||||||
CODEQL_ENABLE_EXPERIMENTAL_FEATURES: "true"
|
|
||||||
steps:
|
steps:
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,9 @@ operatingSystems: ["macos"]
|
||||||
env:
|
env:
|
||||||
CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT: "true"
|
CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT: "true"
|
||||||
steps:
|
steps:
|
||||||
|
- uses: swift-actions/setup-swift@5cdaa9161ad1f55ae39a5ea1784ef96de72f95d9
|
||||||
|
with:
|
||||||
|
swift-version: "5.7"
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: swift
|
languages: swift
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,9 @@ env:
|
||||||
CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT: "true"
|
CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT: "true"
|
||||||
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
|
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
|
||||||
steps:
|
steps:
|
||||||
|
- uses: swift-actions/setup-swift@5cdaa9161ad1f55ae39a5ea1784ef96de72f95d9
|
||||||
|
with:
|
||||||
|
swift-version: "5.7"
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: swift
|
languages: swift
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue