Merge pull request #6 from FoamyGuy/update_actions_version #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
pull_request: | |
push: | |
repository_dispatch: | |
release: | |
types: | |
- created | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Run pre-commit | |
uses: pre-commit/[email protected] | |
# - name: Checkout adafruit/ci-arduino | |
# uses: actions/checkout@v3 | |
# with: | |
# repository: adafruit/ci-arduino | |
# path: ci | |
# - name: pre-install | |
# run: bash ci/actions_install.sh | |
# - name: doxygen | |
# env: | |
# GH_REPO_TOKEN: ${{ secrets.GH_REPO_TOKEN }} | |
# PRETTYNAME : "Adafruit IntelliKeys" | |
# run: bash ci/doxy_gen_and_deploy.sh | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
board: | |
# RP2040 | |
- 'feather_rp2040_usbhost_tinyusb' | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Checkout adafruit/ci-arduino | |
uses: actions/checkout@v3 | |
with: | |
repository: adafruit/ci-arduino | |
path: ci | |
- name: pre-install | |
run: bash ci/actions_install.sh | |
- name: test platforms | |
run: | | |
python3 ci/build_platform.py ${{ matrix.board }} | |
tree examples/ik_translator | |
cp examples/ik_translator/build/*/ik_translator.ino.uf2 ik_translator-${{ matrix.board }}.uf2 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ik_translator-${{ matrix.board }} | |
path: ik_translator-${{ matrix.board }}.uf2 | |
- name: Prepare Release Asset | |
if: ${{ github.event_name == 'release' }} | |
run: | | |
cp ik_translator-${{ matrix.board }}.uf2 ik_translator-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2 | |
- name: Upload Release Asset | |
uses: softprops/action-gh-release@v1 | |
if: ${{ github.event_name == 'release' }} | |
with: | |
files: ik_translator-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2 |