| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- version: 2.1
- executors:
- hardware-array:
- machine:
- resource_class: exo/hardware
- jobs:
- check_chip:
- executor: hardware-array
- parameters:
- target_chip:
- type: string
- description: "The Apple chip to check for (e.g., M1, M2, M3)"
- steps:
- - checkout
- - run:
- name: Check for << parameters.target_chip >> Chip
- command: |
- # Retrieve the chip information
- CHIP=$(sysctl -n machdep.cpu.brand_string | grep -o "M[1-4]" || echo "Unknown")
-
- # Display machine details
- echo "=== Machine Details ==="
- echo "Hostname: $(hostname)"
- echo "IP Address: $(ifconfig | grep 'inet ' | grep -v 127.0.0.1 | awk '{print $2}')"
- echo "Chip: $CHIP"
- echo "========================"
- # Check if the machine has the target chip
- if [[ "$CHIP" == "<< parameters.target_chip >>" ]]; then
- echo "✅ Runner has the << parameters.target_chip >> chip."
- else
- # Exit silently without error
- exit 0
- fi
- workflows:
- benchmark:
- jobs:
- - check_chip:
- name: "Check Chip M1"
- target_chip: "M1"
- - check_chip:
- name: "Check Chip M2"
- target_chip: "M2"
- - check_chip:
- name: "Check Chip M4"
- target_chip: "M4"
|