Skip to content

Commit

Permalink
ci: make MAC_EXCLUDE a set of inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
TheButlah committed Apr 17, 2024
1 parent 7ed194c commit 363197a
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions .github/workflows/rust-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ on:
required: true
CACHIX_AUTH_TOKEN:
required: false
inputs:
MAC_EXCLUDE:
description: "A space-separated list of components that do not work on macos"
type: string
required: false
default: |
orb-thermal-cam-ctrl
seek-camera
seek-camera-sys
clude can-rs
mcu-util
orb-sound
orb-ui
push:
branches:
- main
Expand Down Expand Up @@ -114,17 +127,16 @@ jobs:

- name: Configure cargo to exclude platform-specific crates
if: ${{ matrix.platform == 'macos-13' }}
env:
MAC_EXCLUDE: ${{ inputs.MAC_EXCLUDE }}
run: |
MAC_EXCLUDE=(
"--exclude orb-thermal-cam-ctrl"
"--exclude seek-camera"
"--exclude seek-camera-sys"
"--exclude can-rs"
"--exclude mcu-util"
"--exclude orb-sound"
"--exclude orb-ui"
)
echo MAC_EXCLUDE="${MAC_EXCLUDE[*]}" >>${GITHUB_ENV}
MAC_EXCLUDE=(${MAC_EXCLUDE})
EXPANDED=""
for E in "${MAC_EXCLUDE[@]}"; do
echo "Encountered ${E}"
EXPANDED+="--exclude ${E}"
done
echo MAC_EXCLUDE="${EXPANDED}" >>${GITHUB_ENV}
cat ${GITHUB_ENV}
- name: Cargo Test
run: |
Expand Down

0 comments on commit 363197a

Please sign in to comment.