Add documentation comment to main function for improved readability #35
Workflow file for this run
This file contains hidden or 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
| # Build Examples Workflow | |
| # Compiles all CMake projects under code/ to ensure code examples remain buildable | |
| name: Build Examples | |
| on: | |
| pull_request: | |
| paths: | |
| - 'code/**' | |
| - 'scripts/build_examples.py' | |
| - '.github/workflows/build-examples.yml' | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'code/**' | |
| - 'scripts/build_examples.py' | |
| jobs: | |
| build-host: | |
| name: Host Examples | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install build tools | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake g++-14 ninja-build ccache | |
| sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100 | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 | |
| sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-14 100 | |
| sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-14 100 | |
| - name: Cache ccache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ccache | |
| key: ccache-host-${{ github.run_id }} | |
| restore-keys: | | |
| ccache-host- | |
| - name: Build host examples | |
| run: | | |
| export CCACHE_DIR="$HOME/.cache/ccache" | |
| mkdir -p "$CCACHE_DIR" | |
| python3 scripts/build_examples.py --host | |
| build-stm32: | |
| name: STM32 Examples | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install build tools | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi ninja-build ccache | |
| - name: Cache ccache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ccache | |
| key: ccache-stm32-${{ github.run_id }} | |
| restore-keys: | | |
| ccache-stm32- | |
| - name: Build STM32 examples | |
| run: | | |
| export CCACHE_DIR="$HOME/.cache/ccache" | |
| mkdir -p "$CCACHE_DIR" | |
| python3 scripts/build_examples.py --stm32 |