mirror of
https://github.com/github/codeql-action.git
synced 2025-12-18 21:39:15 +08:00
Compare commits
6 Commits
copilot/up
...
copilot/up
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f1383a26b | ||
|
|
580628ab68 | ||
|
|
17062a6896 | ||
|
|
8afe386a9f | ||
|
|
cbbc19b214 | ||
|
|
d363b1c2bf |
4
.github/workflows/__cleanup-db-cluster-dir.yml
generated
vendored
4
.github/workflows/__cleanup-db-cluster-dir.yml
generated
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-slim
|
||||||
version: linked
|
version: linked
|
||||||
name: Clean up database cluster directory
|
name: Clean up database cluster directory
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
if: github.triggering_actor != 'dependabot[bot]'
|
||||||
@@ -54,7 +54,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'false'
|
||||||
- name: Add a file to the database cluster directory
|
- name: Add a file to the database cluster directory
|
||||||
run: |
|
run: |
|
||||||
mkdir -p "${{ runner.temp }}/customDbLocation/javascript"
|
mkdir -p "${{ runner.temp }}/customDbLocation/javascript"
|
||||||
|
|||||||
4
.github/workflows/__config-input.yml
generated
vendored
4
.github/workflows/__config-input.yml
generated
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-slim
|
||||||
version: linked
|
version: linked
|
||||||
name: Config input
|
name: Config input
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
if: github.triggering_actor != 'dependabot[bot]'
|
||||||
@@ -61,7 +61,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'false'
|
||||||
- name: Copy queries into workspace
|
- name: Copy queries into workspace
|
||||||
run: |
|
run: |
|
||||||
cp -a ../action/queries .
|
cp -a ../action/queries .
|
||||||
|
|||||||
4
.github/workflows/__language-aliases.yml
generated
vendored
4
.github/workflows/__language-aliases.yml
generated
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-slim
|
||||||
version: linked
|
version: linked
|
||||||
name: Language aliases
|
name: Language aliases
|
||||||
if: github.triggering_actor != 'dependabot[bot]'
|
if: github.triggering_actor != 'dependabot[bot]'
|
||||||
@@ -54,7 +54,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'true'
|
setup-kotlin: 'false'
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: C#,java-kotlin,swift,typescript
|
languages: C#,java-kotlin,swift,typescript
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ defaults:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-expected-release-files:
|
check-expected-release-files:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-slim
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|||||||
2
.github/workflows/label-pr-size.yml
vendored
2
.github/workflows/label-pr-size.yml
vendored
@@ -16,7 +16,7 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
sizeup:
|
sizeup:
|
||||||
name: Label PR with size
|
name: Label PR with size
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-slim
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Run sizeup
|
- name: Run sizeup
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
name: "Clean up database cluster directory"
|
name: "Clean up database cluster directory"
|
||||||
description: "The database cluster directory is cleaned up if it is not empty."
|
description: "The database cluster directory is cleaned up if it is not empty."
|
||||||
versions: ["linked"]
|
versions: ["linked"]
|
||||||
|
runnerSize: "slim"
|
||||||
steps:
|
steps:
|
||||||
- name: Add a file to the database cluster directory
|
- name: Add a file to the database cluster directory
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ name: "Config input"
|
|||||||
description: "Tests specifying configuration using the config input"
|
description: "Tests specifying configuration using the config input"
|
||||||
installNode: true
|
installNode: true
|
||||||
versions: ["linked"]
|
versions: ["linked"]
|
||||||
|
runnerSize: "slim"
|
||||||
steps:
|
steps:
|
||||||
- name: Copy queries into workspace
|
- name: Copy queries into workspace
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
name: "Language aliases"
|
name: "Language aliases"
|
||||||
description: "Tests that language aliases are resolved correctly"
|
description: "Tests that language aliases are resolved correctly"
|
||||||
versions: ["linked"]
|
versions: ["linked"]
|
||||||
|
runnerSize: "slim"
|
||||||
steps:
|
steps:
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -76,22 +76,34 @@ for file in sorted((this_dir / 'checks').glob('*.yml')):
|
|||||||
if version == "latest":
|
if version == "latest":
|
||||||
raise ValueError('Did not recognize "version: latest". Did you mean "version: linked"?')
|
raise ValueError('Did not recognize "version: latest". Did you mean "version: linked"?')
|
||||||
|
|
||||||
runnerImages = ["ubuntu-latest", "macos-latest", "windows-latest"]
|
# Determine runner size
|
||||||
|
# "default" is used in check specifications and maps to "latest" for the actual runner image
|
||||||
|
runnerSize = checkSpecification.get('runnerSize', 'default')
|
||||||
|
if runnerSize == 'default':
|
||||||
|
runnerSize = 'latest'
|
||||||
|
|
||||||
|
# Build runner images based on runner size and operating systems
|
||||||
operatingSystems = checkSpecification.get('operatingSystems', ["ubuntu"])
|
operatingSystems = checkSpecification.get('operatingSystems', ["ubuntu"])
|
||||||
|
|
||||||
for operatingSystem in operatingSystems:
|
for operatingSystem in operatingSystems:
|
||||||
runnerImagesForOs = [image for image in runnerImages if image.startswith(operatingSystem)]
|
# Construct the runner image name: {os}-{size}
|
||||||
|
# Note: Not all OS types may support all runner sizes (e.g., only ubuntu-slim exists as of now)
|
||||||
for runnerImage in runnerImagesForOs:
|
runnerImage = f"{operatingSystem}-{runnerSize}"
|
||||||
matrix.append({
|
matrix.append({
|
||||||
'os': runnerImage,
|
'os': runnerImage,
|
||||||
'version': version
|
'version': version
|
||||||
})
|
})
|
||||||
|
|
||||||
useAllPlatformBundle = "false" # Default to false
|
useAllPlatformBundle = "false" # Default to false
|
||||||
if checkSpecification.get('useAllPlatformBundle'):
|
if checkSpecification.get('useAllPlatformBundle'):
|
||||||
useAllPlatformBundle = checkSpecification['useAllPlatformBundle']
|
useAllPlatformBundle = checkSpecification['useAllPlatformBundle']
|
||||||
|
|
||||||
|
# Store the runner size for use in prepare-test step
|
||||||
|
# This is determined once per check specification
|
||||||
|
finalRunnerSize = checkSpecification.get('runnerSize', 'default')
|
||||||
|
if finalRunnerSize == 'default':
|
||||||
|
finalRunnerSize = 'latest'
|
||||||
|
|
||||||
|
|
||||||
if 'analysisKinds' in checkSpecification:
|
if 'analysisKinds' in checkSpecification:
|
||||||
newMatrix = []
|
newMatrix = []
|
||||||
@@ -136,9 +148,10 @@ for file in sorted((this_dir / 'checks').glob('*.yml')):
|
|||||||
'with': {
|
'with': {
|
||||||
'version': '${{ matrix.version }}',
|
'version': '${{ matrix.version }}',
|
||||||
'use-all-platform-bundle': useAllPlatformBundle,
|
'use-all-platform-bundle': useAllPlatformBundle,
|
||||||
# If the action is being run from a container, then do not setup kotlin.
|
# If the action is being run from a container or on a slim runner, then do not setup kotlin.
|
||||||
# This is because the kotlin binaries cannot be downloaded from the container.
|
# Containers: kotlin binaries cannot be downloaded from the container.
|
||||||
'setup-kotlin': str(not 'container' in checkSpecification).lower(),
|
# Slim runners: limited resources may cause issues with Kotlin setup.
|
||||||
|
'setup-kotlin': str(not 'container' in checkSpecification and finalRunnerSize != 'slim').lower(),
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user