Compare commits

...

6 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
3f1383a26b Disable Kotlin setup on slim runners
Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
2025-10-30 11:19:23 +00:00
Henry Mercer
580628ab68 Merge branch 'main' into copilot/update-actions-runner-to-ubuntu-slim 2025-10-30 11:11:44 +00:00
copilot-swe-agent[bot]
17062a6896 Simplify runnerSize logic and add clarifying comments
Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
2025-10-30 11:08:00 +00:00
copilot-swe-agent[bot]
8afe386a9f Use runnerSize property instead of runnerImages for better compatibility
Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
2025-10-30 11:04:45 +00:00
copilot-swe-agent[bot]
cbbc19b214 Add ubuntu-slim runner support for lightweight workflows
Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
2025-10-30 10:42:00 +00:00
copilot-swe-agent[bot]
d363b1c2bf Initial plan 2025-10-30 10:33:51 +00:00
9 changed files with 36 additions and 20 deletions

View File

@@ -36,7 +36,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-slim
version: linked
name: Clean up database cluster directory
if: github.triggering_actor != 'dependabot[bot]'
@@ -54,7 +54,7 @@ jobs:
with:
version: ${{ matrix.version }}
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
setup-kotlin: 'false'
- name: Add a file to the database cluster directory
run: |
mkdir -p "${{ runner.temp }}/customDbLocation/javascript"

View File

@@ -36,7 +36,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-slim
version: linked
name: Config input
if: github.triggering_actor != 'dependabot[bot]'
@@ -61,7 +61,7 @@ jobs:
with:
version: ${{ matrix.version }}
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
setup-kotlin: 'false'
- name: Copy queries into workspace
run: |
cp -a ../action/queries .

View File

@@ -36,7 +36,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-slim
version: linked
name: Language aliases
if: github.triggering_actor != 'dependabot[bot]'
@@ -54,7 +54,7 @@ jobs:
with:
version: ${{ matrix.version }}
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
setup-kotlin: 'false'
- uses: ./../action/init
with:
languages: C#,java-kotlin,swift,typescript

View File

@@ -15,7 +15,7 @@ defaults:
jobs:
check-expected-release-files:
runs-on: ubuntu-latest
runs-on: ubuntu-slim
permissions:
contents: read

View File

@@ -16,7 +16,7 @@ permissions:
jobs:
sizeup:
name: Label PR with size
runs-on: ubuntu-latest
runs-on: ubuntu-slim
steps:
- name: Run sizeup

View File

@@ -1,6 +1,7 @@
name: "Clean up database cluster directory"
description: "The database cluster directory is cleaned up if it is not empty."
versions: ["linked"]
runnerSize: "slim"
steps:
- name: Add a file to the database cluster directory
run: |

View File

@@ -2,6 +2,7 @@ name: "Config input"
description: "Tests specifying configuration using the config input"
installNode: true
versions: ["linked"]
runnerSize: "slim"
steps:
- name: Copy queries into workspace
run: |

View File

@@ -1,6 +1,7 @@
name: "Language aliases"
description: "Tests that language aliases are resolved correctly"
versions: ["linked"]
runnerSize: "slim"
steps:
- uses: ./../action/init
with:

View File

@@ -76,22 +76,34 @@ for file in sorted((this_dir / 'checks').glob('*.yml')):
if version == "latest":
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"])
for operatingSystem in operatingSystems:
runnerImagesForOs = [image for image in runnerImages if image.startswith(operatingSystem)]
for runnerImage in runnerImagesForOs:
matrix.append({
'os': runnerImage,
'version': version
})
# 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)
runnerImage = f"{operatingSystem}-{runnerSize}"
matrix.append({
'os': runnerImage,
'version': version
})
useAllPlatformBundle = "false" # Default to false
if checkSpecification.get('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:
newMatrix = []
@@ -136,9 +148,10 @@ for file in sorted((this_dir / 'checks').glob('*.yml')):
'with': {
'version': '${{ matrix.version }}',
'use-all-platform-bundle': useAllPlatformBundle,
# If the action is being run from a container, then do not setup kotlin.
# This is because the kotlin binaries cannot be downloaded from the container.
'setup-kotlin': str(not 'container' in checkSpecification).lower(),
# If the action is being run from a container or on a slim runner, then do not setup kotlin.
# Containers: kotlin binaries cannot be downloaded from the container.
# Slim runners: limited resources may cause issues with Kotlin setup.
'setup-kotlin': str(not 'container' in checkSpecification and finalRunnerSize != 'slim').lower(),
}
})