Browse Source

Merge pull request #14 from DavidAntliff/esp-idf-v4.1-beta1

Add travis support for ESP IDF v4.1-beta1.
main
David Antliff 6 years ago
committed by GitHub
parent
commit
91d812bd9d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 40
      .travis.yml
  2. 12
      CMakeLists.txt

40
.travis.yml

@ -1,33 +1,37 @@
os: linux
dist: bionic dist: bionic
language: python language: python
python: "3.8" python: "3.8"
before_install: jobs:
# Save path to the git respository include:
- PROJECT_PATH=$(pwd) - stage: # IDF v3.3
install:
install: # Install ESP32 toochain following steps as described
# Install ESP32 toochain following steps as desribed
# in http://esp-idf.readthedocs.io/en/latest/linux-setup.html # in http://esp-idf.readthedocs.io/en/latest/linux-setup.html
# #
# Get required packages - already done above, see addons: apt: packages:
# - sudo apt-get install git wget make libncurses-dev flex bison gperf python python-serial
# Prepare directory for the toolchain
- mkdir -p ~/esp
- cd ~/esp
# Download binary toolchain for the ESP32 # Download binary toolchain for the ESP32
- pushd ~
- wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz - wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz
- tar -xzf xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz - tar -xzf xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz
# Make xtensa-esp32-elf available for all terminal sessions # Make xtensa-esp32-elf available for all terminal sessions
- export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin - export PATH=$PATH:$(pwd)/xtensa-esp32-elf/bin
# Get ESP-IDF from github # Get ESP-IDF from github
- git clone --recursive --branch v3.3 --single-branch --shallow-submodules https://github.com/espressif/esp-idf.git - git clone --recursive --branch v3.3 --single-branch --shallow-submodules https://github.com/espressif/esp-idf.git esp-idf
# Set the path to ESP-IDF directory # Set the path to ESP-IDF directory
- export IDF_PATH=~/esp/esp-idf - export IDF_PATH=$(pwd)/esp-idf
# Install python dependencies # Install python dependencies
- pip install --requirement $IDF_PATH/requirements.txt - pip install --requirement $IDF_PATH/requirements.txt
- popd
script: script:
# Build project within the original repository
- cd $PROJECT_PATH
- $IDF_PATH/tools/idf.py build - $IDF_PATH/tools/idf.py build
- stage: # IDF v4.1-beta1
install:
- pushd ~
- git clone --recursive --branch v4.1-beta1 --single-branch --shallow-submodules https://github.com/espressif/esp-idf.git esp-idf
- esp-idf/install.sh
- popd
script:
- source ~/esp-idf/export.sh && idf.py build

12
CMakeLists.txt

@ -5,5 +5,15 @@ cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake) include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp32-ds18b20-example) project(esp32-ds18b20-example)
if (NOT IDF_VERSION_MAJOR)
set(IDF_VERSION_MAJOR 3)
endif()
if (IDF_VERSION_MAJOR GREATER 3)
set(PROJECT_ELF ${project_elf})
else()
set(PROJECT_ELF ${IDF_PROJECT_EXECUTABLE})
endif()
# Ignore false clang warnings about `struct foo = { 0 }` # Ignore false clang warnings about `struct foo = { 0 }`
target_compile_options(${IDF_PROJECT_EXECUTABLE} PRIVATE -Wno-missing-braces -Wmissing-field-initializers) target_compile_options(${PROJECT_ELF} PRIVATE -Wno-missing-braces -Wmissing-field-initializers)

Loading…
Cancel
Save