fork/GramFirmware

git clone https://git.julia.blue/fork/GramFirmware

CarVacfix ci and remove builds for avr for nowfb9ad76

gram
2.3 KiB89 linesraw
1name: PlatformIO CI
2
3on: [push]
4
5jobs:
6  build:
7    runs-on: ubuntu-latest
8    permissions:
9      contents: write
10    env:
11      VERSION_REF: ${{ github.ref_type == 'tag' && github.ref_name || github.sha }}
12      PIO_ENV: ${{ matrix.env }}
13      BIN_EXT: ${{ matrix.bin_ext }}
14    strategy:
15      fail-fast: false
16      matrix:
17        include:
18          - env: b0xx_r4
19            bin_ext: uf2
20          - env: pico
21            bin_ext: uf2
22          - env: schism
23            bin_ext: uf2
24          - env: ranadigital
25            bin_ext: uf2
26#          - env: arduino_uno
27#            bin_ext: hex
28#          - env: arduino_nano
29#            bin_ext: hex
30#          - env: arduino_mega
31#            bin_ext: hex
32#          - env: arduino_leonardo
33#            bin_ext: hex
34#          - env: arduino_micro
35#            bin_ext: hex
36#          - env: b0xx_r1
37#            bin_ext: hex
38#          - env: b0xx_r2
39#            bin_ext: hex
40#          - env: gccmx
41#            bin_ext: hex
42#          - env: gccpcb1
43#            bin_ext: hex
44#          - env: gccpcb2
45#            bin_ext: hex
46#          - env: lbx
47#            bin_ext: hex
48#          - env: smashbox
49#            bin_ext: hex
50
51    steps:
52    - name: Check out source code
53      uses: actions/checkout@v4
54
55    - name: Set up Python
56      uses: actions/setup-python@v5
57      with:
58        python-version: '3.10'
59
60    - name: Install PlatformIO
61      run: |
62        python -m pip install --upgrade pip
63        pip install --upgrade platformio
64
65    - name: Set artifact filename environment variable
66      run: |
67        echo "ARTIFACT_NAME=HayBox-${VERSION_REF}-${PIO_ENV}.${BIN_EXT}" >> "$GITHUB_ENV"
68
69    - name: Set artifact path environment variable
70      run: |
71        echo "ARTIFACT_PATH=${PIO_ENV}/${ARTIFACT_NAME}" >> "$GITHUB_ENV"
72
73    - name: Build ${{ matrix.env }} env
74      run: |
75        pio run -e "$PIO_ENV"
76        mkdir -p "$PIO_ENV"
77        cp ".pio/build/${PIO_ENV}/firmware.${BIN_EXT}" "$ARTIFACT_PATH"
78
79    - name: Publish ${{ matrix.env }} artifacts
80      uses: actions/upload-artifact@v4
81      with:
82        name: ${{ env.ARTIFACT_NAME }}
83        path: ${{ env.ARTIFACT_PATH }}
84
85    - name: Upload binaries to release
86      uses: softprops/action-gh-release@v1
87      if: github.ref_type == 'tag'
88      with:
89        files: ${{ env.ARTIFACT_PATH }}