1414 - macos-arm64
1515 - macos-x64
1616 - all
17+ ubuntu_version :
18+ description : " Ubuntu runner baseline for Linux builds. Ignored for macOS."
19+ required : true
20+ default : " 22.04"
21+ type : choice
22+ options :
23+ - " 22.04"
24+ - " 24.04"
1725 ref_name :
1826 description : " Branch, tag, or commit SHA to build. Leave empty to use the selected workflow ref."
1927 required : false
@@ -23,7 +31,7 @@ permissions:
2331 contents : read
2432
2533concurrency :
26- group : cli-package-manual-${{ inputs.platform }}-${{ inputs.ref_name || github.ref }}
34+ group : cli-package-manual-${{ inputs.platform }}-${{ inputs.ubuntu_version }}-${{ inputs. ref_name || github.ref }}
2735 cancel-in-progress : true
2836
2937jobs :
4654 shell : bash
4755 env :
4856 INPUT_PLATFORM : ${{ inputs.platform }}
57+ INPUT_UBUNTU_VERSION : ${{ inputs.ubuntu_version }}
4958 INPUT_REF_NAME : ${{ inputs.ref_name }}
5059 run : |
5160 set -euo pipefail
@@ -55,12 +64,29 @@ jobs:
5564 SHORT_SHA="$(git rev-parse --short HEAD)"
5665 CHECKOUT_REF="$FULL_SHA"
5766
67+ case "${INPUT_UBUNTU_VERSION}" in
68+ 22.04)
69+ LINUX_X64_RUNNER="ubuntu-22.04"
70+ LINUX_ARM64_RUNNER="ubuntu-22.04-arm"
71+ LINUX_NAME_SUFFIX="ubuntu2204"
72+ ;;
73+ 24.04)
74+ LINUX_X64_RUNNER="ubuntu-24.04"
75+ LINUX_ARM64_RUNNER="ubuntu-24.04-arm"
76+ LINUX_NAME_SUFFIX="ubuntu2404"
77+ ;;
78+ *)
79+ echo "Unsupported ubuntu_version: ${INPUT_UBUNTU_VERSION}" >&2
80+ exit 1
81+ ;;
82+ esac
83+
5884 case "${INPUT_PLATFORM}" in
5985 linux-arm64)
60- MATRIX='{ "platform":[{"os":"ubuntu-24.04-arm", "name": "linux-arm64", "target": "aarch64-unknown-linux-gnu", "can_smoke_test":true}]}'
86+ MATRIX="{\ "platform\ ":[{\ "os\":\"${LINUX_ARM64_RUNNER}\",\ "name\":\ "linux-arm64-${LINUX_NAME_SUFFIX}\",\ "target\":\ "aarch64-unknown-linux-gnu\",\ "can_smoke_test\ ":true}]}"
6187 ;;
6288 linux-x64)
63- MATRIX='{ "platform":[{"os":"ubuntu-latest", "name": "linux-x64", "target": "x86_64-unknown-linux-gnu", "can_smoke_test":true}]}'
89+ MATRIX="{\ "platform\ ":[{\ "os\":\"${LINUX_X64_RUNNER}\",\ "name\":\ "linux-x64-${LINUX_NAME_SUFFIX}\",\ "target\":\ "x86_64-unknown-linux-gnu\",\ "can_smoke_test\ ":true}]}"
6490 ;;
6591 macos-arm64)
6692 MATRIX='{"platform":[{"os":"macos-15","name":"macos-arm64","target":"aarch64-apple-darwin","can_smoke_test":true}]}'
6995 MATRIX='{"platform":[{"os":"macos-15-intel","name":"macos-x64","target":"x86_64-apple-darwin","can_smoke_test":true}]}'
7096 ;;
7197 all)
72- MATRIX='{ "platform":[{"os": "macos-15", "name": "macos-arm64", "target": "aarch64-apple-darwin", "can_smoke_test":true},{"os": "macos-15-intel", "name": "macos-x64", "target": "x86_64-apple-darwin", "can_smoke_test":true},{"os":"ubuntu-latest", "name": "linux-x64", "target": "x86_64-unknown-linux-gnu", "can_smoke_test":true},{"os":"ubuntu-24.04-arm", "name": "linux-arm64", "target": "aarch64-unknown-linux-gnu", "can_smoke_test":true}]}'
98+ MATRIX="{\ "platform\ ":[{\ "os\":\ "macos-15\",\ "name\":\ "macos-arm64\",\ "target\":\ "aarch64-apple-darwin\",\ "can_smoke_test\ ":true},{\ "os\":\ "macos-15-intel\",\ "name\":\ "macos-x64\",\ "target\":\ "x86_64-apple-darwin\",\ "can_smoke_test\ ":true},{\ "os\":\"${LINUX_X64_RUNNER}\",\ "name\":\ "linux-x64-${LINUX_NAME_SUFFIX}\",\ "target\":\ "x86_64-unknown-linux-gnu\",\ "can_smoke_test\ ":true},{\ "os\":\"${LINUX_ARM64_RUNNER}\",\ "name\":\ "linux-arm64-${LINUX_NAME_SUFFIX}\",\ "target\":\ "aarch64-unknown-linux-gnu\",\ "can_smoke_test\ ":true}]}"
7399 ;;
74100 *)
75101 echo "Unsupported platform: ${INPUT_PLATFORM}" >&2
0 commit comments