Skip to content

Commit

Permalink
use jq
Browse files Browse the repository at this point in the history
  • Loading branch information
ahiuchingau committed Jan 17, 2024
1 parent 0147093 commit 4f6113a
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-cross-target.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ defaults:
working-directory: ot3-firmware

jobs:
format-ci-only:
format-ci:
runs-on: "ubuntu-20.04"
timeout-minutes: 20
strategy:
matrix:
target: [ bootloader, can, common, eeprom, i2c, motor-control, sensors, spi ]
target: ${{ jq '.buildPresets[] | select(.name=="format-ci") | .targets' CMakePresets.json }}
fail-fast: false
name: ${{ matrix.target }} format
steps:
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Run format-ci
run: |
cd build-cross
make ${{ matrix.target }}-format-ci
make ${{ matrix.target }}
cross-compile-target:
runs-on: "ubuntu-20.04"
Expand Down
39 changes: 39 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,45 @@
"gripper-simulator",
"hepa-uv-simulator"
]
},
{
"name": "format-ci",
"displayName": "format-ci",
"description": "format",
"configurePreset": "cross",
"jobs": 4,
"targets": [
"bootloader-format-ci",
"can-format-ci",
"common-format-ci",
"eeprom-format-ci",
"gantry-format-ci",
"gripper-format-ci",
"head-format-ci",
"hepa-uv-format-ci",
"i2c-format-ci",
"motor-control-format-ci",
"pipettes-format-ci",
"rear-panel-format-ci",
"sensors-format-ci",
"spi-format-ci"
]
},
{
"name": "lint",
"displayName": "lint",
"description": "lint targets",
"configurePreset": "cross",
"jobs": 4,
"targets": [
"bootloader-lint",
"gantry-lint",
"gripper-lint",
"head-lint",
"hepa-uv-lint",
"pipettes-lint",
"rear-panel-lint"
]
}
]
}

0 comments on commit 4f6113a

Please sign in to comment.