tinyusb/.circleci/config.yml
Ha Thach b8d3c0c4a8
Circi dynamic config (#2763)
Circleci
* build cmake armgcc and arm clang on circleci
* use docker medium+
2024-08-13 23:57:01 +07:00

40 lines
1.2 KiB
YAML

version: 2.1
setup: true
orbs:
continuation: circleci/continuation@1
jobs:
set-matrix:
executor: continuation/default
docker:
- image: cimg/base:current
resource_class: small
steps:
- checkout
- run:
name: Set matrix
command: |
MATRIX_JSON=$(python .github/workflows/ci_set_matrix.py)
echo "MATRIX_JSON=$MATRIX_JSON"
TOOLCHAIN_LIST=("arm-clang" "arm-gcc")
for toolchain in "${TOOLCHAIN_LIST[@]}"; do
FAMILY=$(echo $MATRIX_JSON | jq -r ".\"$toolchain\".family")
echo "${toolchain}_FAMILY=$FAMILY"
echo " - build:" >> .circleci/config2.yml
echo " matrix:" >> .circleci/config2.yml
echo " parameters:" >> .circleci/config2.yml
echo " toolchain: ['$toolchain']" >> .circleci/config2.yml
echo " build-system: ['cmake']" >> .circleci/config2.yml
echo " family: $FAMILY" >> .circleci/config2.yml
done
- continuation/continue:
configuration_path: .circleci/config2.yml
workflows:
set-matrix:
jobs:
- set-matrix