Skip to content

Handle more syntax improvements #1179

Handle more syntax improvements

Handle more syntax improvements #1179

##############################################################################
# Copyright Christopher Kormanyos 2023 - 2024.
# Distributed under the Boost Software License,
# Version 1.0. (See accompanying file LICENSE_1_0.txt
# or copy at http://www.boost.org/LICENSE_1_0.txt)
name: real-time-cpp-examples
on:
push:
branches:
- '**'
pull_request:
schedule:
- cron: '46 23 * * *' # run at 11:46 PM UTC
jobs:
target-avr-example_led:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
example: [ chapter02_02, chapter02_06 ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: update-tools
run: sudo apt install gcc-avr avr-libc
- name: target-avr-example_led
run: |
cd ${{ matrix.example }}
./build.sh /usr/bin avr
ls -la ./bin/led.elf ./bin/led.map ./bin/led.hex
working-directory: ./examples/
target-avr-examples:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
example: [ chapter02_03, chapter02_03a, chapter03_02, chapter04_04, chapter04_04a, chapter06_01, chapter06_14, chapter09_07, chapter09_08, chapter09_08a, chapter10_08, chapter10_08a, chapter11_07, chapter12_04, chapter16_08, chapter17_03, chapter17_03a ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: update-tools
run: sudo apt install gcc-avr avr-libc
- name: target-avr-examples
run: |
cd ${{ matrix.example }}
./build.sh /usr/bin avr
ls -la ./bin/${{ matrix.example }}.elf ./bin/${{ matrix.example }}.map ./bin/${{ matrix.example }}.hex
working-directory: ./examples/
target-bcm2835_raspi_b-example10_09:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
example: [ chapter10_09 ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: update-tools
run: sudo apt install gcc-arm-none-eabi
- name: target-bcm2835_raspi_b-example10_09
run: |
cd ${{ matrix.example }}
./build.sh /usr/bin arm-none-eabi
ls -la ./bin/${{ matrix.example }}.elf ./bin/${{ matrix.example }}.map ./bin/${{ matrix.example }}.hex ./bin/kernel.img
working-directory: ./examples/
target-msvc-examples:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
example: [ chapter02_03, chapter02_03a, chapter03_02, chapter04_04, chapter04_04a, chapter06_01, chapter06_14, chapter09_07, chapter09_08, chapter09_08a, chapter10_08, chapter10_08a, chapter10_09, chapter11_07, chapter12_04, chapter17_03, chapter17_03a ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- uses: ilammy/msvc-dev-cmd@v1
with:
toolset: 14.4
- name: target-msvc-examples
run: |
cd ${{ matrix.example }}
MSBuild -m ${{ matrix.example }}.sln -p:Configuration=Release -p:Platform=x64 /t:Rebuild
dir ./Release/${{ matrix.example }}.exe
working-directory: ./examples/
target-msvc-example16_08:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
example: [ chapter16_08 ]
steps:
- uses: actions/checkout@v4
- name: clone-boost-develop
working-directory: ${{ runner.workspace }}
run: |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ${{ runner.workspace }}/boost-root
- name: clone-boost-submods
working-directory: ${{ runner.workspace }}/boost-root
run: |
git submodule update --init tools
git submodule update --init libs/config
git submodule update --init libs/math
git submodule update --init libs/multiprecision
- uses: ilammy/msvc-dev-cmd@v1
with:
toolset: 14.4
- name: bootstrap-boost
working-directory: ${{ runner.workspace }}/boost-root
run: |
./bootstrap.bat
./b2 headers
- uses: ilammy/msvc-dev-cmd@v1
with:
toolset: 14.4
- name: target-msvc-example16_08
shell: cmd
working-directory: ./
run: |
cd examples/${{ matrix.example }}
set INCLUDE=${{ runner.workspace }}\real-time-cpp\examples\${{ matrix.example }}\src\mcal\win32;%INCLUDE%
set INCLUDE=${{ runner.workspace }}\real-time-cpp\examples\${{ matrix.example }}\src;%INCLUDE%
set INCLUDE=${{ runner.workspace }}\boost-root;%INCLUDE%
MSBuild -m ${{ matrix.example }}.sln -p:useenv=true -p:Configuration=Release -p:Platform=x64 /t:Rebuild
dir .\Release\${{ matrix.example }}.exe