Renamed the 'cortex' machine and examples into 'cortex-m' for more coherency. #38
Workflow file for this run
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 compiler and examples | |
on: [push, pull_request] | |
env: | |
# Create a new and unique cache for each run, otherwise the cache from the previous actions would be used | |
CACHE_KEY: repo-${{ github.run_id }} | |
GOIL: ${{ github.workspace }}/goil/makefile-unix/goil | |
jobs: | |
goil: | |
name: Build Goil compiler | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Build Goil | |
run: ./build.py | |
working-directory: goil/makefile-unix | |
- name: Cache Goil build | |
# Cache the source and build files to share them later with other jobs | |
uses: actions/cache/save@v3 | |
with: | |
path: ${{ github.workspace }} | |
key: ${{ env.CACHE_KEY }} | |
raspberry-pi-examples: | |
name: Build Raspberry Pi examples | |
runs-on: ubuntu-22.04 | |
needs: goil | |
strategy: | |
matrix: | |
# List only the examples that currently compile | |
example_name: [blink] | |
steps: | |
- name: Install ARM toolchain | |
run: | | |
sudo apt update | |
sudo apt install -y gcc-arm-none-eabi | |
- name: Retrieve sources and Goil binary | |
uses: actions/cache/restore@v3 | |
with: | |
path: ${{ github.workspace }} | |
key: ${{ env.CACHE_KEY }} | |
- name: Generate the code | |
run: ${{ env.GOIL }} --target=cortex-a/armv7/bcm2836/rpi2 --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil | |
working-directory: examples/cortex-a/armv7/bcm2836/rpi2/${{ matrix.example_name }} | |
- name: Build the code | |
run: ./make.py | |
working-directory: examples/cortex-a/armv7/bcm2836/rpi2/${{ matrix.example_name }} | |
avr-arduino-uno-examples: | |
name: Build AVR Arduino Uno examples | |
runs-on: ubuntu-22.04 | |
needs: goil | |
strategy: | |
matrix: | |
example_name: [blink, customCounterExample, extInterrupt, serial, trace] | |
steps: | |
- name: Install AVR toolchain | |
run: | | |
sudo apt update | |
sudo apt install -y avr-libc gcc-avr | |
- name: Retrieve sources and Goil binary | |
uses: actions/cache/restore@v3 | |
with: | |
path: ${{ github.workspace }} | |
key: ${{ env.CACHE_KEY }} | |
- name: Generate the code | |
# Use a wildcard to find the .oil file because it is not always named the same than the directory is it contained by | |
run: ${{ env.GOIL }} --target=avr/arduino/uno --templates=../../../../goil/templates/ *.oil | |
working-directory: examples/avr/arduinoUno/${{ matrix.example_name }} | |
- name: Build the code | |
run: ./make.py | |
working-directory: examples/avr/arduinoUno/${{ matrix.example_name }} | |
avr-arduino-mega-2560-examples: | |
name: Build AVR Arduino Mega 2560 examples | |
runs-on: ubuntu-22.04 | |
needs: goil | |
strategy: | |
matrix: | |
example_name: [blink, extInterrupt, serial] | |
steps: | |
- name: Install AVR toolchain | |
run: | | |
sudo apt update | |
sudo apt install -y avr-libc gcc-avr | |
- name: Retrieve sources and Goil binary | |
uses: actions/cache/restore@v3 | |
with: | |
path: ${{ github.workspace }} | |
key: ${{ env.CACHE_KEY }} | |
- name: Generate the code | |
run: ${{ env.GOIL }} --target=avr/arduino/mega --templates=../../../../goil/templates/ ${{ matrix.example_name }}.oil | |
working-directory: examples/avr/arduinoMega2560/${{ matrix.example_name }} | |
- name: Build the code | |
run: ./make.py | |
working-directory: examples/avr/arduinoMega2560/${{ matrix.example_name }} | |
posix-examples: | |
name: Build POSIX examples | |
runs-on: ubuntu-22.04 | |
needs: goil | |
strategy: | |
matrix: | |
example_name: [can_demo, events, ioc, isr, messages, one_task, periodic, trace_test] | |
steps: | |
- name: Retrieve sources and Goil binary | |
uses: actions/cache/restore@v3 | |
with: | |
path: ${{ github.workspace }} | |
key: ${{ env.CACHE_KEY }} | |
- name: Generate the code | |
run: ${{ env.GOIL }} --target=posix/linux --templates=../../../goil/templates/ ${{ matrix.example_name }}.oil | |
working-directory: examples/posix/${{ matrix.example_name }} | |
- name: Build the code | |
run: ./make.py | |
working-directory: examples/posix/${{ matrix.example_name }} | |
cortex-m-arduino-m0-examples: | |
name: Build Cortex-M Arduino M0 examples | |
runs-on: ubuntu-22.04 | |
needs: goil | |
strategy: | |
matrix: | |
example_name: [blink] | |
steps: | |
- name: Install ARM toolchain | |
run: | | |
sudo apt update | |
sudo apt install -y gcc-arm-none-eabi | |
- name: Retrieve sources and Goil binary | |
uses: actions/cache/restore@v3 | |
with: | |
path: ${{ github.workspace }} | |
key: ${{ env.CACHE_KEY }} | |
- name: Generate the code | |
run: ${{ env.GOIL }} --target=cortex-m/armv6m/samd21/ArduinoM0 --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil | |
working-directory: examples/cortex-m/armv6m/samd21/ArduinoM0/${{ matrix.example_name }} | |
- name: Build the code | |
run: ./make.py | |
working-directory: examples/cortex-m/armv6m/samd21/ArduinoM0/${{ matrix.example_name }} | |
cortex-m-xplained-pro-examples: | |
name: Build Cortex-M Xplained Pro examples | |
runs-on: ubuntu-22.04 | |
needs: goil | |
strategy: | |
matrix: | |
example_name: [blink, readbutton, readbutton_isr] | |
steps: | |
- name: Install ARM toolchain | |
run: | | |
sudo apt update | |
sudo apt install -y gcc-arm-none-eabi | |
- name: Retrieve sources and Goil binary | |
uses: actions/cache/restore@v3 | |
with: | |
path: ${{ github.workspace }} | |
key: ${{ env.CACHE_KEY }} | |
- name: Generate the code | |
run: ${{ env.GOIL }} --target=cortex-m/armv6m/samd21/XPlainedPro --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil | |
working-directory: examples/cortex-m/armv6m/samd21/XPlainedPro/${{ matrix.example_name }} | |
- name: Build the code | |
run: ./make.py | |
working-directory: examples/cortex-m/armv6m/samd21/XPlainedPro/${{ matrix.example_name }} | |
cortex-m-arduino-due-examples: | |
name: Build Cortex-M Arduino Due examples | |
runs-on: ubuntu-22.04 | |
needs: goil | |
strategy: | |
matrix: | |
example_name: [blink] | |
steps: | |
- name: Install ARM toolchain | |
run: | | |
sudo apt update | |
sudo apt install -y gcc-arm-none-eabi | |
- name: Retrieve sources and Goil binary | |
uses: actions/cache/restore@v3 | |
with: | |
path: ${{ github.workspace }} | |
key: ${{ env.CACHE_KEY }} | |
- name: Generate the code | |
run: ${{ env.GOIL }} --target=cortex-m/armv7m/atsam3x8e/arduino_due --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil | |
working-directory: examples/cortex-m/armv7m/atsam3x8e/arduino_due/${{ matrix.example_name }} | |
- name: Build the code | |
run: ./make.py | |
working-directory: examples/cortex-m/armv7m/atsam3x8e/arduino_due/${{ matrix.example_name }} | |
cortex-m-smart-fusion-2-examples: | |
name: Build Cortex-M SmartFusion2 examples | |
runs-on: ubuntu-22.04 | |
needs: goil | |
strategy: | |
matrix: | |
# List only the examples that currently compile | |
example_name: [blink] | |
steps: | |
- name: Install ARM toolchain | |
run: | | |
sudo apt update | |
sudo apt install -y gcc-arm-none-eabi | |
- name: Retrieve sources and Goil binary | |
uses: actions/cache/restore@v3 | |
with: | |
path: ${{ github.workspace }} | |
key: ${{ env.CACHE_KEY }} | |
- name: Generate the code | |
run: ${{ env.GOIL }} --target=cortex-m/armv7m/SmartFusion2 --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil | |
working-directory: examples/cortex-m/armv7m/SmartFusion2/starterKit/${{ matrix.example_name }} | |
- name: Build the code | |
run: ./make.py | |
working-directory: examples/cortex-m/armv7m/SmartFusion2/starterKit/${{ matrix.example_name }} | |
cortex-m-smart-nucleo-f303-examples: | |
name: Build Cortex-M Nucleo-F303 examples | |
runs-on: ubuntu-22.04 | |
needs: goil | |
strategy: | |
matrix: | |
# List only the examples that currently compile | |
example_name: [blink, serial] | |
steps: | |
- name: Install ARM toolchain | |
run: | | |
sudo apt update | |
sudo apt install -y gcc-arm-none-eabi | |
- name: Retrieve sources and Goil binary | |
uses: actions/cache/restore@v3 | |
with: | |
path: ${{ github.workspace }} | |
key: ${{ env.CACHE_KEY }} | |
- name: Generate the code | |
run: ${{ env.GOIL }} --target=cortex-m/armv7em/stm32f303 --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil | |
working-directory: examples/cortex-m/armv7em/stm32f303/Nucleo-32/${{ matrix.example_name }} | |
- name: Build the code | |
run: ./make.py | |
working-directory: examples/cortex-m/armv7em/stm32f303/Nucleo-32/${{ matrix.example_name }} | |
cortex-m-smart-nucleo-l432-examples: | |
name: Build Cortex-M Nucleo-F432 examples | |
runs-on: ubuntu-22.04 | |
needs: goil | |
strategy: | |
matrix: | |
# List only the examples that currently compile | |
example_name: [blink, readbutton, serial] | |
steps: | |
- name: Install ARM toolchain | |
run: | | |
sudo apt update | |
sudo apt install -y gcc-arm-none-eabi | |
- name: Retrieve sources and Goil binary | |
uses: actions/cache/restore@v3 | |
with: | |
path: ${{ github.workspace }} | |
key: ${{ env.CACHE_KEY }} | |
- name: Generate the code | |
run: ${{ env.GOIL }} --target=cortex-m/armv7em/stm32l432 --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil | |
working-directory: examples/cortex-m/armv7em/stm32l432/Nucleo-32/${{ matrix.example_name }} | |
- name: Build the code | |
run: ./make.py | |
working-directory: examples/cortex-m/armv7em/stm32l432/Nucleo-32/${{ matrix.example_name }} | |
cortex-m-smart-stm32f4discovery-examples: | |
name: Build Cortex-M STM32F4DISCOVERY examples | |
runs-on: ubuntu-22.04 | |
needs: goil | |
strategy: | |
matrix: | |
# List only the examples that currently compile | |
example_name: [blink, readbutton, testDisableEnable] | |
steps: | |
- name: Install ARM toolchain | |
run: | | |
sudo apt update | |
sudo apt install -y gcc-arm-none-eabi | |
- name: Retrieve sources and Goil binary | |
uses: actions/cache/restore@v3 | |
with: | |
path: ${{ github.workspace }} | |
key: ${{ env.CACHE_KEY }} | |
- name: Generate the code | |
run: ${{ env.GOIL }} --target=cortex-m/armv7em/stm32f407/stm32f4discovery --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil | |
working-directory: examples/cortex-m/armv7em/stm32f407/stm32f4discovery/${{ matrix.example_name }} | |
- name: Build the code | |
run: ./make.py | |
working-directory: examples/cortex-m/armv7em/stm32f407/stm32f4discovery/${{ matrix.example_name }} |