Skip to content

Merge pull request #454 from dhalbert/s3-upload-board-dirs #803

Merge pull request #454 from dhalbert/s3-upload-board-dirs

Merge pull request #454 from dhalbert/s3-upload-board-dirs #803

Workflow file for this run

name: Build
on:
push:
paths:
- 'apps/**'
- 'lib/**'
- 'ports/**'
- 'src/**'
- '.github/actions/**'
- '.github/workflows/build.yml'
- '.github/workflows/build_util.yml'
- '.github/workflows/build_ghostfat.yml'
pull_request:
branches: [ master ]
paths:
- 'apps/**'
- 'lib/**'
- 'ports/**'
- 'src/**'
- '.github/actions/**'
- '.github/workflows/build.yml'
- '.github/workflows/build_util.yml'
- '.github/workflows/build_ghostfat.yml'
repository_dispatch:
release:
types:
- created
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
set-matrix:
runs-on: ubuntu-latest
outputs:
json: ${{ steps.set-matrix-json.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
- name: Generate matrix json
id: set-matrix-json
run: |
MATRIX_JSON=$(python .github/workflows/ci_set_matrix.py)
echo "matrix=$MATRIX_JSON"
echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
# ---------------------------------------
# Build ARM
# ---------------------------------------
arm-make:
needs: set-matrix
uses: ./.github/workflows/build_util.yml
strategy:
fail-fast: false
matrix:
port:
# Alphabetical order
- 'kinetis_k32l2'
- 'lpc55'
- 'mimxrt10xx'
- 'stm32f3'
- 'stm32h7'
- 'stm32l4'
with:
port: ${{ matrix.port }}
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.port].board) }}
build-system: 'make'
toolchain: 'arm-gcc'
# ---------------------------------------
# Build ARM with CMake
# ---------------------------------------
arm-cmake:
needs: set-matrix
uses: ./.github/workflows/build_util.yml
strategy:
fail-fast: false
matrix:
port:
# Alphabetical order by family
- 'maxim'
# - 'stm32f303disco' # overflows flash
- 'stm32f4'
- 'stm32h5'
with:
port: ${{ matrix.port }}
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.port].board) }}
build-system: 'cmake'
toolchain: 'arm-gcc'
# ---------------------------------------
# Build ESP
# ---------------------------------------
espressif:
needs: set-matrix
uses: ./.github/workflows/build_util.yml
secrets: inherit
with:
port: 'espressif'
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)['espressif'].board) }}
build-system: 'make'
toolchain: 'esp-idf'
toolchain_version: 'v5.3.2'
# ---------------------------------------
# Build RISC-V
# ---------------------------------------
riscv:
if: false
needs: set-matrix
uses: ./.github/workflows/build_util.yml
strategy:
fail-fast: false
matrix:
port:
# Alphabetical order
- 'ch32v20x'
with:
port: ${{ matrix.port }}
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.port].board) }}
build-system: 'make'
toolchain: 'riscv-gcc'
# ---------------------------------------
# Unit testing with ghostfat
# ---------------------------------------
ghostfat:
needs: set-matrix
uses: ./.github/workflows/build_ghostfat.yml
with:
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)['test_ghostfat'].board) }}