|
|
@@ -4,24 +4,21 @@ parameters:
|
|
|
target_chips:
|
|
|
type: string
|
|
|
default: "M1,M2"
|
|
|
- description: "comma-separated chip types"
|
|
|
+ description: "Comma-separated chip types"
|
|
|
|
|
|
jobs:
|
|
|
check_chip:
|
|
|
parameters:
|
|
|
runner_name:
|
|
|
type: string
|
|
|
- machine:
|
|
|
- image: exo/hardware
|
|
|
- name: << parameters.runner_name >>
|
|
|
+ machine: true
|
|
|
+ resource_class: << parameters.runner_name >>
|
|
|
steps:
|
|
|
- run:
|
|
|
name: Get and compare chip info
|
|
|
command: |
|
|
|
- # Get chip info
|
|
|
CHIP=$(sysctl -n machdep.cpu.brand_string | grep -o "M[1-4]" || echo "Unknown")
|
|
|
|
|
|
- # Check if chip matches target
|
|
|
if echo "<< pipeline.parameters.target_chips >>" | tr ',' '\n' | grep -q "$CHIP"; then
|
|
|
echo "Found matching chip: $CHIP"
|
|
|
echo "Hello $CHIP"
|
|
|
@@ -35,8 +32,6 @@ workflows:
|
|
|
check-chips:
|
|
|
jobs:
|
|
|
- check_chip:
|
|
|
- name: check-e0
|
|
|
- runner_name: hardware-runner-e0
|
|
|
matrix:
|
|
|
parameters:
|
|
|
- runner_name: ["hardware-runner-e0", "hardware-runner-e1"]
|
|
|
+ runner_name: ["exo/hardware", "exo/hardware"]
|