Skip to content

Commit

Permalink
use env for ARDUINO_LIBS, try to build ch32
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach committed Jun 10, 2024
1 parent 8f7fe50 commit 6d6cd17
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions .github/workflows/githubci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
ARDUINO_LIBS:
- 'Adafruit SPIFlash'
- 'MIDI Library'
- 'Adafruit seesaw Library'
- 'Adafruit NeoPixel'
- 'SdFat - Adafruit Fork'
- 'SD'
- 'Adafruit Circuit Playground'
- 'Adafruit InternalFlash'
- 'Pico PIO USB'

jobs:
pre-commit:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -34,6 +46,9 @@ jobs:
PRETTYNAME : "Adafruit TinyUSB Library"
run: bash ci/doxy_gen_and_deploy.sh

# ---------------------------------------
# Main
# ---------------------------------------
build:
runs-on: ubuntu-latest
needs: pre-commit
Expand All @@ -53,7 +68,8 @@ jobs:
# SAMD
- 'metro_m0_tinyusb'
- 'metro_m4_tinyusb'

# Ch32v2
- 'CH32V20x_EVT'
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -62,17 +78,28 @@ jobs:
uses: actions/checkout@v4
with:
repository: adafruit/ci-arduino
ref: add-ch32v2
path: ci

- name: pre-install
run: bash ci/actions_install.sh

- name: Install Libraries for building examples
run: arduino-cli lib install "Adafruit SPIFlash" "MIDI Library" "Adafruit seesaw Library" "Adafruit NeoPixel" "SdFat - Adafruit Fork" "SD" "Adafruit Circuit Playground" "Adafruit InternalFlash" "Pico PIO USB"
- name: Install Libraries
run: |
LIBS_STRING=""
for lib in "${{ env.ARDUINO_LIBS[@] }}"; do
LIBS_STRING+="\"$lib\" "
done
echo "$LIBS_STRING"
# arduino-cli lib install "Adafruit SPIFlash" "MIDI Library" "Adafruit seesaw Library" "Adafruit NeoPixel" "SdFat - Adafruit Fork" "SD" "Adafruit Circuit Playground" "Adafruit InternalFlash" "Pico PIO USB"
arduino-cli lib install $LIBS_STRING
- name: test platforms
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }}

# ---------------------------------------
# Build ESP32 v2
# ---------------------------------------
build-esp32-v2:
if: false
runs-on: ubuntu-latest
Expand Down

0 comments on commit 6d6cd17

Please sign in to comment.