Skip to content

gyro: use async transaction #832

gyro: use async transaction

gyro: use async transaction #832

Workflow file for this run

name: build
on:
push:
pull_request:
workflow_dispatch:
jobs:
targets:
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.set-targets.outputs.targets }}
steps:
- name: Checkout
uses: actions/checkout@v3
- id: set-targets
run: echo "targets=[$(grep '\[env:' platformio.ini | sed 's/.*:\(.*\)].*/"\1"/' | tr '\n' ',')]" >> $GITHUB_OUTPUT
build:
needs: targets
runs-on: ubuntu-latest
strategy:
matrix:
target: ${{fromJSON(needs.targets.outputs.targets)}}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: "true"
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.target }}-pip
- name: Cache platformio
uses: actions/cache@v3
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ matrix.target }}-platformio
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install platformio
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Build ${{ matrix.target }}
run: |
pio run -e ${{ matrix.target }}
cp .pio/build/${{ matrix.target }}/firmware.hex .pio/build/quicksilver.${{ matrix.target }}.hex
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target }}
path: .pio/build/quicksilver.${{ matrix.target }}.hex
upload:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: output
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: output/*/quicksilver*.hex