CI improvements
This commit is contained in:
1
.github/workflows/main.yml
vendored
1
.github/workflows/main.yml
vendored
@@ -12,6 +12,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
node: [feedc0de, comred]
|
node: [feedc0de, comred]
|
||||||
steps:
|
steps:
|
||||||
|
@@ -1,5 +1,23 @@
|
|||||||
cmake_minimum_required(VERSION 3.16.3)
|
cmake_minimum_required(VERSION 3.16.3)
|
||||||
|
|
||||||
|
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/sdkconfig)
|
||||||
|
message(FATAL_ERROR "sdkconfig not found (please run ./switchconf.sh)")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/config.cmake)
|
||||||
|
message(FATAL_ERROR "config.cmake not found (please run ./switchconf.sh)")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(READ_SYMLINK ${CMAKE_CURRENT_SOURCE_DIR}/sdkconfig result)
|
||||||
|
if (result STREQUAL "")
|
||||||
|
message(FATAL_ERROR "sdkconfig is not a symlink (please run ./switchconf.sh)")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(READ_SYMLINK ${CMAKE_CURRENT_SOURCE_DIR}/config.cmake result)
|
||||||
|
if (result STREQUAL "")
|
||||||
|
message(FATAL_ERROR "config.cmake is not a symlink (please run ./switchconf.sh)")
|
||||||
|
endif()
|
||||||
|
|
||||||
include(config.cmake)
|
include(config.cmake)
|
||||||
|
|
||||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
@@ -8,3 +26,14 @@ set(CMAKE_CXX_STANDARD 17)
|
|||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
project(${BOBBY_APP_NAME})
|
project(${BOBBY_APP_NAME})
|
||||||
|
|
||||||
|
set(expected_build_folder "${CMAKE_CURRENT_SOURCE_DIR}/build")
|
||||||
|
file(READ_SYMLINK "${expected_build_folder}" expected_build_folder_resolved)
|
||||||
|
if(NOT IS_ABSOLUTE "${expected_build_folder_resolved}")
|
||||||
|
get_filename_component(dir "${linkname}" DIRECTORY)
|
||||||
|
set(expected_build_folder_resolved "${dir}/${expected_build_folder_resolved}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT PROJECT_BINARY_DIR STREQUAL "${expected_build_folder}" AND NOT PROJECT_BINARY_DIR STREQUAL "${expected_build_folder_resolved}")
|
||||||
|
message(FATAL_ERROR "building in ${PROJECT_BINARY_DIR} is not supported, you have to build in ${expected_build_folder} or ${expected_build_folder_resolved} (please run ./switchconf.sh)")
|
||||||
|
endif()
|
||||||
|
@@ -1,6 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
VALID_CONFIGS=(feedc0de comred mick peter greyhash)
|
VALID_CONFIGS=(
|
||||||
|
"feedc0de"
|
||||||
|
"comred"
|
||||||
|
"mick"
|
||||||
|
"peter"
|
||||||
|
"greyhash"
|
||||||
|
)
|
||||||
|
|
||||||
print_usage() {
|
print_usage() {
|
||||||
echo "usage: ./switchconf.sh ${VALID_CONFIGS[@]}"
|
echo "usage: ./switchconf.sh ${VALID_CONFIGS[@]}"
|
||||||
|
Reference in New Issue
Block a user