Merge pull request #410 from CDarius/m5stack_cores3 #646
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: | |
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/[email protected] | |
- 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: | |
#if: false | |
needs: set-matrix | |
uses: ./.github/workflows/build_util.yml | |
strategy: | |
fail-fast: false | |
matrix: | |
port: | |
# Alphabetical order | |
- 'kinetis_k32l2' | |
- 'lpc55' | |
- 'mimxrt10xx' | |
- 'stm32f3' | |
- 'stm32f4' | |
- 'stm32l4' | |
with: | |
port: ${{ matrix.port }} | |
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.port].board) }} | |
build-system: 'make' | |
toolchain: 'arm-gcc' | |
# --------------------------------------- | |
# Build ESP | |
# --------------------------------------- | |
esp: | |
#if: false | |
needs: set-matrix | |
uses: ./.github/workflows/build_util.yml | |
with: | |
port: 'espressif' | |
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)['espressif'].board) }} | |
build-system: 'make' | |
toolchain: 'esp-idf' | |
toolchain_version: 'v5.1.4' | |
# --------------------------------------- | |
# 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) }} | |
# --------------------------------------- | |
# Build ARM with CMake | |
# --------------------------------------- | |
arm-cmake: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
board: | |
# Alphabetical order by family | |
- 'metro_m7_1011' | |
# - 'stm32f303disco' # overflows flash | |
- 'stm32f411ve_discovery' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Fetch tags | |
run: git fetch --tags | |
- name: Install ARM GCC | |
uses: carlosperate/arm-none-eabi-gcc-action@v1 | |
with: | |
release: '11.2-2022.02' | |
- name: Get Dependencies | |
run: | | |
sudo apt install -y ninja-build | |
python tools/get_deps.py --board ${{ matrix.board }} | |
- name: Build | |
run: | | |
cmake . -B _build -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DBOARD=${{ matrix.board }} | |
cmake --build _build |