Add installGo input for adding setup-go step in sync.py
This commit is contained in:
parent
429b71ea4b
commit
8f71d47b93
47 changed files with 140 additions and 66 deletions
|
|
@ -3,12 +3,13 @@ description: "Tests using an all-platform CodeQL Bundle"
|
|||
versions: ["nightly-latest"]
|
||||
operatingSystems: ["ubuntu"]
|
||||
useAllPlatformBundle: "true"
|
||||
installGo: "true"
|
||||
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
|
||||
languages: cpp,csharp,go,java,javascript,python,ruby
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
- name: Build code
|
||||
shell: bash
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
name: "Analyze: 'ref' and 'sha' from inputs"
|
||||
description: "Checks that specifying 'ref' and 'sha' as inputs works"
|
||||
versions: ["default"]
|
||||
installGo: "true"
|
||||
steps:
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ name: "Build mode manual"
|
|||
description: "An end-to-end integration test of a Java repository built using 'build-mode: manual'"
|
||||
operatingSystems: ["ubuntu"]
|
||||
versions: ["nightly-latest"]
|
||||
installGo: "true"
|
||||
steps:
|
||||
- uses: ./../action/init
|
||||
id: init
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
name: "Export file baseline information"
|
||||
description: "Tests that file baseline information is exported when the feature is enabled"
|
||||
versions: ["nightly-latest"]
|
||||
installGo: "true"
|
||||
env:
|
||||
CODEQL_ACTION_SUBLANGUAGE_FILE_COVERAGE: true
|
||||
steps:
|
||||
|
|
|
|||
|
|
@ -5,12 +5,10 @@ operatingSystems:
|
|||
versions:
|
||||
- linked
|
||||
- nightly-latest
|
||||
installGo: "true"
|
||||
env:
|
||||
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
|
||||
steps:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ">=1.21.0"
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
languages: go
|
||||
|
|
|
|||
|
|
@ -4,11 +4,8 @@ description: "Checks that we emit a diagnostic if Go is changed after the init s
|
|||
operatingSystems: ["ubuntu"]
|
||||
# pinned to a version which does not support statically linked binaries for indirect tracing
|
||||
versions: ["default"]
|
||||
installGo: "true"
|
||||
steps:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
# We need a Go version that ships with statically linked binaries on Linux
|
||||
go-version: ">=1.21.0"
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
languages: go
|
||||
|
|
|
|||
|
|
@ -4,11 +4,8 @@ description: "Checks that we emit a diagnostic if the `file` program is not inst
|
|||
operatingSystems: ["ubuntu"]
|
||||
# pinned to a version which does not support statically linked binaries for indirect tracing
|
||||
versions: ["default"]
|
||||
installGo: "true"
|
||||
steps:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
# We need a Go version that ships with statically linked binaries on Linux
|
||||
go-version: ">=1.21.0"
|
||||
- name: Remove `file` program
|
||||
run: |
|
||||
echo $(which file)
|
||||
|
|
|
|||
|
|
@ -4,11 +4,8 @@ description: "Checks that our workaround for indirect tracing for Go 1.21+ on Li
|
|||
operatingSystems: ["ubuntu"]
|
||||
# pinned to a version which does not support statically linked binaries for indirect tracing
|
||||
versions: ["default"]
|
||||
installGo: "true"
|
||||
steps:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
# We need a Go version that ships with statically linked binaries on Linux
|
||||
go-version: ">=1.21.0"
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
languages: go
|
||||
|
|
|
|||
|
|
@ -3,13 +3,8 @@ description: "Checks that Go tracing works when using an autobuilder step"
|
|||
operatingSystems: ["ubuntu", "macos"]
|
||||
env:
|
||||
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
|
||||
installGo: "true"
|
||||
steps:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "~1.24.0"
|
||||
# to avoid potentially misleading autobuilder results where we expect it to download
|
||||
# dependencies successfully, but they actually come from a warm cache
|
||||
cache: false
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
languages: go
|
||||
|
|
|
|||
|
|
@ -1,13 +1,8 @@
|
|||
name: "Go: tracing with custom build steps"
|
||||
description: "Checks that Go tracing traces the build when using custom build steps"
|
||||
operatingSystems: ["ubuntu", "macos"]
|
||||
installGo: "true"
|
||||
steps:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "~1.24.0"
|
||||
# to avoid potentially misleading autobuilder results where we expect it to download
|
||||
# dependencies successfully, but they actually come from a warm cache
|
||||
cache: false
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
languages: go
|
||||
|
|
|
|||
|
|
@ -3,13 +3,8 @@ description: "Checks that we run the autobuilder in legacy workflows with neithe
|
|||
operatingSystems: ["ubuntu", "macos"]
|
||||
env:
|
||||
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
|
||||
installGo: "true"
|
||||
steps:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "~1.24.0"
|
||||
# to avoid potentially misleading autobuilder results where we expect it to download
|
||||
# dependencies successfully, but they actually come from a warm cache
|
||||
cache: false
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
languages: go
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
name: "Multi-language repository"
|
||||
description: "An end-to-end integration test of a multi-language repository using automatic language detection for macOS"
|
||||
operatingSystems: ["macos", "ubuntu"]
|
||||
installGo: "true"
|
||||
steps:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ">=1.21.0"
|
||||
|
||||
- uses: ./../action/init
|
||||
id: init
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
name: "Packaging: Config and input passed to the CLI"
|
||||
description: "Checks that specifying packages using a combination of a config file and input to the Action works"
|
||||
versions: ["linked", "default", "nightly-latest"] # This feature is not compatible with old CLIs
|
||||
installGo: "true"
|
||||
steps:
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
name: "Packaging: Config and input"
|
||||
description: "Checks that specifying packages using a combination of a config file and input to the Action works"
|
||||
versions: ["linked", "default", "nightly-latest"] # This feature is not compatible with old CLIs
|
||||
installGo: "true"
|
||||
steps:
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
name: "Packaging: Config file"
|
||||
description: "Checks that specifying packages using only a config file works"
|
||||
versions: ["linked", "default", "nightly-latest"] # This feature is not compatible with old CLIs
|
||||
installGo: "true"
|
||||
steps:
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
name: "Packaging: Action input"
|
||||
description: "Checks that specifying packages using the input to the Action works"
|
||||
versions: ["linked", "default", "nightly-latest"] # This feature is not compatible with old CLIs
|
||||
installGo: "true"
|
||||
steps:
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ operatingSystems:
|
|||
versions:
|
||||
- linked
|
||||
- nightly-latest
|
||||
installGo: "true"
|
||||
steps:
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ name: "Split workflow"
|
|||
description: "Tests a split-up workflow in which we first build a database and later analyze it"
|
||||
operatingSystems: ["ubuntu", "macos"]
|
||||
versions: ["linked", "default", "nightly-latest"] # This feature is not compatible with old CLIs
|
||||
installGo: "true"
|
||||
steps:
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -2,6 +2,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"]
|
||||
installGo: "true"
|
||||
env:
|
||||
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
|
||||
steps:
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ name: "Local CodeQL bundle"
|
|||
description: "Tests using a CodeQL bundle from a local file rather than a URL"
|
||||
versions: ["nightly-latest"]
|
||||
operatingSystems: ["ubuntu"]
|
||||
installGo: "true"
|
||||
steps:
|
||||
- name: Fetch a CodeQL bundle
|
||||
shell: bash
|
||||
|
|
|
|||
|
|
@ -5,17 +5,15 @@ operatingSystems:
|
|||
versions:
|
||||
- linked
|
||||
- nightly-latest
|
||||
installGo: "true"
|
||||
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
|
||||
languages: cpp,csharp,go,java,javascript,python,ruby
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '>=1.21.0'
|
||||
- name: Build code
|
||||
shell: bash
|
||||
run: env -i PATH="$PATH" HOME="$HOME" ./build.sh
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
name: "Upload-sarif: 'ref' and 'sha' from inputs"
|
||||
description: "Checks that specifying 'ref' and 'sha' as inputs works"
|
||||
versions: ["default"]
|
||||
installGo: "true"
|
||||
steps:
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
name: "Use a custom `checkout_path`"
|
||||
description: "Checks that a custom `checkout_path` will find the proper commit_oid"
|
||||
versions: ["linked"]
|
||||
installGo: "true"
|
||||
steps:
|
||||
# This ensures we don't accidentally use the original checkout for any part of the test.
|
||||
- name: Delete original checkout
|
||||
|
|
|
|||
|
|
@ -108,6 +108,22 @@ for file in (this_dir / 'checks').glob('*.yml'):
|
|||
},
|
||||
]
|
||||
|
||||
installGo = False
|
||||
if checkSpecification.get('installGo'):
|
||||
installGo = True if checkSpecification['installGo'].lower() == "true" else False
|
||||
|
||||
if installGo:
|
||||
steps.append({
|
||||
'name': 'Install Go',
|
||||
'uses': 'actions/setup-go@v5',
|
||||
'with': {
|
||||
'go-version': '>=1.21.0',
|
||||
# to avoid potentially misleading autobuilder results where we expect it to download
|
||||
# dependencies successfully, but they actually come from a warm cache
|
||||
'cache': False
|
||||
}
|
||||
})
|
||||
|
||||
# If container initialisation steps are present in the check specification,
|
||||
# make sure to execute them first.
|
||||
if 'container' in checkSpecification and 'container-init-steps' in checkSpecification:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue