-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #366 from adafruit/fix-cmake-build
Fix cmake build
- Loading branch information
Showing
17 changed files
with
184 additions
and
106 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Build CMake | ||
|
||
on: | ||
pull_request: | ||
push: | ||
repository_dispatch: | ||
release: | ||
types: | ||
- created | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
# --------------------------------------- | ||
# Build ARM family | ||
# --------------------------------------- | ||
ARM: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
board: | ||
# Alphabetical order by family | ||
- 'metro_m7_1011' | ||
- 'stm32f303disco' | ||
|
||
steps: | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install Ninja | ||
run: sudo apt install -y ninja-build | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Checkout common submodules in lib | ||
run: git submodule update --init lib/tinyusb lib/uf2 | ||
|
||
- name: Install ARM GCC | ||
uses: carlosperate/arm-none-eabi-gcc-action@v1 | ||
with: | ||
release: '11.2-2022.02' | ||
|
||
- name: Build | ||
run: | | ||
cmake . -B _build -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DBOARD=${{ matrix.board }} | ||
cmake --build _build | ||
# - uses: actions/upload-artifact@v3 | ||
# with: | ||
# name: ${{ matrix.board }} | ||
# path: | | ||
# _build/ports/*/tinyusb.bin | ||
# _build/ports/*/tinyusb.hex | ||
# _build/ports/*/apps/*/*.uf2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
cmake_minimum_required(VERSION 3.17) | ||
|
||
include(${CMAKE_CURRENT_LIST_DIR}/family_support.cmake) | ||
|
||
# Espressif has its own build system | ||
if(NOT FAMILY STREQUAL espressif) | ||
project(tinyuf2_all C ASM) | ||
endif () | ||
|
||
add_subdirectory(${FAMILY}) | ||
cmake_minimum_required(VERSION 3.17) | ||
|
||
include(ports/family_support.cmake) | ||
|
||
# Espressif has its own build system | ||
if(NOT FAMILY STREQUAL espressif) | ||
project(tinyuf2_all C ASM) | ||
endif () | ||
|
||
add_subdirectory(ports/${FAMILY}) |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.