H7开发板移植 #34
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
| # This workflow is for a CMake project running on a STM32(arm-none-eabi). | |
| name: STM32 Build Check | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| # Customize the CMake build preset here (See CMakePresets.json file for options) | |
| BUILD_PRESET: Debug | |
| jobs: | |
| build: | |
| # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. | |
| # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install GNU Arm Toolchain(arm-none-eabi) by Action | |
| uses: carlosperate/arm-none-eabi-gcc-action@v1 | |
| # - name: Install GNU Arm Toolchain(arm-none-eabi) by APT | |
| # run: | | |
| # sudo apt-get update | |
| # sudo apt-get install -y gcc-arm-none-eabi libnewlib-arm-none-eabi | |
| - name: Install Ninja | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ninja-build | |
| - name: Check Toolchain version | |
| run: | | |
| arm-none-eabi-gcc --version | |
| cmake --version | |
| ninja --version | |
| - name: Configure CMake | |
| # Configure CMake to use the preset in CMakePresets.json file. | |
| run: cmake --preset ${{env.BUILD_PRESET}} | |
| - name: Build | |
| # Build program with the given configuration | |
| run: cmake --build --preset ${{env.BUILD_PRESET}} |