0.3.rev.A. Update documentation #283
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
# ------------------------------------------------------------------------------ | |
# USB EPROM/Flash Programmer | |
# | |
# Copyright (2024) Robson Martins | |
# | |
# This work is licensed under a Creative Commons Attribution-NonCommercial- | |
# ShareAlike 4.0 International License. | |
# ------------------------------------------------------------------------------ | |
name: Test Firmware | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
BUILD_TYPE: Debug | |
FIRMWARE_PROJECT_DIR: ${{github.workspace}}/firmware/usbflashprog | |
jobs: | |
build: | |
name: Test Firmware | |
runs-on: ubuntu-latest | |
steps: | |
# ------------------------------------------------------------------------ | |
# Checkout the sources | |
# ------------------------------------------------------------------------ | |
- name: Checkout the Sources | |
uses: actions/checkout@v4 | |
# ------------------------------------------------------------------------ | |
# Configure CMake | |
# ------------------------------------------------------------------------ | |
- name: Configure CMake | |
working-directory: ${{env.FIRMWARE_PROJECT_DIR}} | |
run: cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DTEST_BUILD=ON | |
# ------------------------------------------------------------------------ | |
# Build | |
# ------------------------------------------------------------------------ | |
- name: Build | |
working-directory: ${{env.FIRMWARE_PROJECT_DIR}} | |
run: cmake --build build --config ${{env.BUILD_TYPE}} | |
# ------------------------------------------------------------------------ | |
# Test | |
# ------------------------------------------------------------------------ | |
- name: Test | |
working-directory: ${{env.FIRMWARE_PROJECT_DIR}}/build | |
run: ctest -C ${{env.BUILD_TYPE}} |