Skip to content

Commit

Permalink
Merge pull request #131 from trombik/issue_129
Browse files Browse the repository at this point in the history
bugfix: update CI to fix Issue #129
  • Loading branch information
UncleRus authored Nov 7, 2020
2 parents e651996 + 6de371c commit 6ca0399
Showing 1 changed file with 69 additions and 52 deletions.
121 changes: 69 additions & 52 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- make
branch:
- master
- v4.0.2
- v4.1
- v4.2-beta1
steps:
Expand Down Expand Up @@ -69,15 +70,24 @@ jobs:
SDK_NAME="esp-idf"
GCC_PREFIX="xtensa-esp32-elf"
GCC_FILE="${GCC_PREFIX}-gcc"
# /home/runner/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin
TOOLCHAIN_DIR="${HOME}/.espressif/tools"
case "${{ matrix.branch }}" in
v4.1|v4.2*)
v4.0.2)
TOOLCHAIN_VERSION="esp-2020r3-8.4.0"
;;
v4.1)
TOOLCHAIN_VERSION="esp-2020r2-8.2.0"
;;
v4.2.*|v4.2-*)
TOOLCHAIN_VERSION="esp-2020r2-8.2.0"
;;
master)
TOOLCHAIN_VERSION="esp-2020r3-8.4.0"
;;
*)
echo "Unknown matrix.branch: ${{ matrix.branch }}"
exit 1
;;
esac
REPO_DIR=`pwd`
EXAMPLE_DIR="${REPO_DIR}/examples"
Expand All @@ -88,20 +98,20 @@ jobs:
# than under __PROJECT_PATH
IDF_PATH="${__PROJECT_PATH}/idf"
echo "::set-env name=IDF_PATH::${IDF_PATH}"
echo "IDF_PATH=${IDF_PATH}" >> ${GITHUB_ENV}
# XXX prefix all the environment variables with `__PROJECT_` to avoid pollution
echo "::set-env name=__PROJECT_EXAMPLE_DIR::${EXAMPLE_DIR}"
echo "::set-env name=__PROJECT_GCC_FILE::${GCC_FILE}"
echo "::set-env name=__PROJECT_GCC_PREFIX::${GCC_PREFIX}"
echo "::set-env name=__PROJECT_SDK_NAME::${SDK_NAME}"
echo "::set-env name=__PROJECT_TOOLCHAIN_FILE::${TOOLCHAIN_FILE}"
echo "::set-env name=__PROJECT_TOOLCHAIN_DIR::${TOOLCHAIN_DIR}"
echo "::set-env name=__PROJECT_TOOLCHAIN_VERSION::${TOOLCHAIN_VERSION}"
echo "::set-env name=__PROJECT_DISTFILE_DIR::${DISTFILE_DIR}"
echo "::set-env name=__PROJECT_PATH::${__PROJECT_PATH}"
echo "::set-env name=__PROJECT_BUILD_COMMAND::${__PROJECT_BUILD_COMMAND}"
echo "::set-env name=__PROJECT_BUILD_COMMAND_ARG::${__PROJECT_BUILD_COMMAND_ARG}"
echo "__PROJECT_EXAMPLE_DIR=${EXAMPLE_DIR}" >> ${GITHUB_ENV}
echo "__PROJECT_GCC_FILE=${GCC_FILE}" >> ${GITHUB_ENV}
echo "__PROJECT_GCC_PREFIX=${GCC_PREFIX}" >> ${GITHUB_ENV}
echo "__PROJECT_SDK_NAME=${SDK_NAME}" >> ${GITHUB_ENV}
echo "__PROJECT_TOOLCHAIN_FILE=${TOOLCHAIN_FILE}" >> ${GITHUB_ENV}
echo "__PROJECT_TOOLCHAIN_DIR=${TOOLCHAIN_DIR}" >> ${GITHUB_ENV}
echo "__PROJECT_TOOLCHAIN_VERSION=${TOOLCHAIN_VERSION}" >> ${GITHUB_ENV}
echo "__PROJECT_DISTFILE_DIR=${DISTFILE_DIR}" >> ${GITHUB_ENV}
echo "__PROJECT_PATH=${__PROJECT_PATH}" >> ${GITHUB_ENV}
echo "__PROJECT_BUILD_COMMAND=${__PROJECT_BUILD_COMMAND}" >> ${GITHUB_ENV}
echo "__PROJECT_BUILD_COMMAND_ARG=${__PROJECT_BUILD_COMMAND_ARG}" >> ${GITHUB_ENV}
- name: Checkout the SDK
uses: actions/checkout@v2
Expand Down Expand Up @@ -159,20 +169,23 @@ jobs:
# IDF_CCACHE_ENABLE does not work either.
if: ${{ matrix.build_method == 'make' }}
run: |
ccache --version
GCC_BIN_DIR="${__PROJECT_TOOLCHAIN_DIR}/${__PROJECT_GCC_PREFIX}/${__PROJECT_TOOLCHAIN_VERSION}/${__PROJECT_GCC_PREFIX}/bin"
CCACHE_BIN_DIR="${HOME}/ccache_bin"
mkdir -p "${CCACHE_BIN_DIR}"
(cd "${CCACHE_BIN_DIR}" && ln -s /usr/bin/ccache "${__PROJECT_GCC_FILE}")
export PATH="${CCACHE_BIN_DIR}:$PATH:${GCC_BIN_DIR}"
${CCACHE_BIN_DIR}/${__PROJECT_GCC_FILE} --version
echo "::set-env name=PATH::${PATH}"
echo "::set-env name=CCACHE_BASEDIR::${__PROJECT_EXAMPLE_DIR}"
echo "::set-env name=CCACHE_NOHASHDIR::true"
echo "PATH=${PATH}" >> ${GITHUB_ENV}
echo "CCACHE_BASEDIR=${__PROJECT_EXAMPLE_DIR}" >> ${GITHUB_ENV}
echo "CCACHE_NOHASHDIR=true" >> ${GITHUB_ENV}
- name: Build (make)
if: ${{ matrix.build_method == 'make' }}
run: |
# make sure gcc is in $PATH
echo ${PATH}
${__PROJECT_GCC_FILE} --version
IGNORE_FILE="travis-ignore"
. ${IDF_PATH}/export.sh
Expand All @@ -197,8 +210,7 @@ jobs:
# CMakelist.txt to 3.x, but not practical.
- make
branch:
- v3.1.7
- v3.2.3
- v3.2.5
- v3.3.2
steps:
- name: Checkout
Expand Down Expand Up @@ -241,19 +253,19 @@ jobs:
# than under __PROJECT_PATH
IDF_PATH="${__PROJECT_PATH}/idf"
echo "::set-env name=IDF_PATH::${IDF_PATH}"
echo "IDF_PATH=${IDF_PATH}" >> ${GITHUB_ENV}
# XXX prefix all the environment variables with `__PROJECT_` to avoid pollution
echo "::set-env name=__PROJECT_EXAMPLE_DIR::${EXAMPLE_DIR}"
echo "::set-env name=__PROJECT_GCC_FILE::${GCC_FILE}"
echo "::set-env name=__PROJECT_GCC_PREFIX::${GCC_PREFIX}"
echo "::set-env name=__PROJECT_SDK_NAME::${SDK_NAME}"
echo "::set-env name=__PROJECT_TOOLCHAIN_DIR::${TOOLCHAIN_DIR}"
echo "::set-env name=__PROJECT_TOOLCHAIN_FILE::${TOOLCHAIN_FILE}"
echo "::set-env name=__PROJECT_DISTFILE_DIR::${DISTFILE_DIR}"
echo "::set-env name=__PROJECT_PATH::${__PROJECT_PATH}"
echo "::set-env name=__PROJECT_BUILD_COMMAND::${__PROJECT_BUILD_COMMAND}"
echo "::set-env name=__PROJECT_BUILD_COMMAND_ARG::${__PROJECT_BUILD_COMMAND_ARG}"
echo "__PROJECT_EXAMPLE_DIR=${EXAMPLE_DIR}" >> ${GITHUB_ENV}
echo "__PROJECT_GCC_FILE=${GCC_FILE}" >> ${GITHUB_ENV}
echo "__PROJECT_GCC_PREFIX=${GCC_PREFIX}" >> ${GITHUB_ENV}
echo "__PROJECT_SDK_NAME=${SDK_NAME}" >> ${GITHUB_ENV}
echo "__PROJECT_TOOLCHAIN_DIR=${TOOLCHAIN_DIR}" >> ${GITHUB_ENV}
echo "__PROJECT_TOOLCHAIN_FILE=${TOOLCHAIN_FILE}" >> ${GITHUB_ENV}
echo "__PROJECT_DISTFILE_DIR=${DISTFILE_DIR}" >> ${GITHUB_ENV}
echo "__PROJECT_PATH=${__PROJECT_PATH}" >> ${GITHUB_ENV}
echo "__PROJECT_BUILD_COMMAND=${__PROJECT_BUILD_COMMAND}" >> ${GITHUB_ENV}
echo "__PROJECT_BUILD_COMMAND_ARG=${__PROJECT_BUILD_COMMAND_ARG}" >> ${GITHUB_ENV}
- name: Checkout the SDK
uses: actions/checkout@v2
Expand Down Expand Up @@ -291,17 +303,18 @@ jobs:
- name: Setup ccache
run: |
ccache --version
CCACHE_BIN_DIR="${HOME}/ccache_bin"
mkdir -p "${CCACHE_BIN_DIR}"
(cd "${CCACHE_BIN_DIR}" && ln -s /usr/bin/ccache "${__PROJECT_GCC_FILE}")
echo "::set-env name=PATH::${CCACHE_BIN_DIR}:$PATH:${__PROJECT_TOOLCHAIN_DIR}/${__PROJECT_GCC_PREFIX}/bin"
echo "::set-env name=CCACHE_BASEDIR::${__PROJECT_EXAMPLE_DIR}"
echo "::set-env name=CCACHE_NOHASHDIR::true"
echo "PATH=${CCACHE_BIN_DIR}:$PATH:${__PROJECT_TOOLCHAIN_DIR}/${__PROJECT_GCC_PREFIX}/bin" >> ${GITHUB_ENV}
echo "CCACHE_BASEDIR=${__PROJECT_EXAMPLE_DIR}" >> ${GITHUB_ENV}
echo "CCACHE_NOHASHDIR=true" >> ${GITHUB_ENV}
- name: Build (make)
if: ${{ matrix.build_method == 'make' }}
run: |
echo ${PATH}
${__PROJECT_GCC_FILE} --version
IGNORE_FILE="travis-ignore"
# XXX only v3.3.x has export.sh
Expand Down Expand Up @@ -360,7 +373,7 @@ jobs:
GCC_PREFIX="xtensa-lx106-elf"
GCC_FILE="${GCC_PREFIX}-gcc"
TOOLCHAIN_DIR="${HOME}/esp32"
TOOLCHAIN_FILE="xtensa-lx106-elf-linux64-1.22.0-100-ge567ec7-5.2.0.tar.gz"
TOOLCHAIN_FILE="xtensa-lx106-elf-gcc8_4_0-esp-2020r3-linux-amd64.tar.gz"
REPO_DIR=`pwd`
EXAMPLE_DIR="${REPO_DIR}/examples"
DISTFILE_DIR="${HOME}/distfiles"
Expand All @@ -369,19 +382,19 @@ jobs:
# XXX actions/checkout does not allow to checkout a repository other
# than under __PROJECT_PATH
IDF_PATH="${__PROJECT_PATH}/idf"
echo "::set-env name=IDF_PATH::${IDF_PATH}"
echo "IDF_PATH=${IDF_PATH}" >> ${GITHUB_ENV}
# XXX prefix all the environment variables with `__PROJECT_` to avoid pollution
echo "::set-env name=__PROJECT_EXAMPLE_DIR::${EXAMPLE_DIR}"
echo "::set-env name=__PROJECT_GCC_FILE::${GCC_FILE}"
echo "::set-env name=__PROJECT_GCC_PREFIX::${GCC_PREFIX}"
echo "::set-env name=__PROJECT_SDK_NAME::${SDK_NAME}"
echo "::set-env name=__PROJECT_TOOLCHAIN_DIR::${TOOLCHAIN_DIR}"
echo "::set-env name=__PROJECT_TOOLCHAIN_FILE::${TOOLCHAIN_FILE}"
echo "::set-env name=__PROJECT_DISTFILE_DIR::${DISTFILE_DIR}"
echo "::set-env name=__PROJECT_PATH::${__PROJECT_PATH}"
echo "::set-env name=__PROJECT_BUILD_COMMAND::${__PROJECT_BUILD_COMMAND}"
echo "::set-env name=__PROJECT_BUILD_COMMAND_ARG::${__PROJECT_BUILD_COMMAND_ARG}"
echo "__PROJECT_EXAMPLE_DIR=${EXAMPLE_DIR}" >> ${GITHUB_ENV}
echo "__PROJECT_GCC_FILE=${GCC_FILE}" >> ${GITHUB_ENV}
echo "__PROJECT_GCC_PREFIX=${GCC_PREFIX}" >> ${GITHUB_ENV}
echo "__PROJECT_SDK_NAME=${SDK_NAME}" >> ${GITHUB_ENV}
echo "__PROJECT_TOOLCHAIN_DIR=${TOOLCHAIN_DIR}" >> ${GITHUB_ENV}
echo "__PROJECT_TOOLCHAIN_FILE=${TOOLCHAIN_FILE}" >> ${GITHUB_ENV}
echo "__PROJECT_DISTFILE_DIR=${DISTFILE_DIR}" >> ${GITHUB_ENV}
echo "__PROJECT_PATH=${__PROJECT_PATH}" >> ${GITHUB_ENV}
echo "__PROJECT_BUILD_COMMAND=${__PROJECT_BUILD_COMMAND}" >> ${GITHUB_ENV}
echo "__PROJECT_BUILD_COMMAND_ARG=${__PROJECT_BUILD_COMMAND_ARG}" >> ${GITHUB_ENV}
- name: Checkout the SDK
uses: actions/checkout@v2
Expand Down Expand Up @@ -414,17 +427,21 @@ jobs:
- name: Setup ccache
run: |
ccache --version
__PROJECT_CCACHE_BIN_DIR="${HOME}/ccache_bin"
mkdir -p "${__PROJECT_CCACHE_BIN_DIR}"
(cd "${__PROJECT_CCACHE_BIN_DIR}" && ln -s /usr/bin/ccache "${__PROJECT_GCC_FILE}")
echo "::set-env name=PATH::${__PROJECT_CCACHE_BIN_DIR}:$PATH:${__PROJECT_TOOLCHAIN_DIR}/${__PROJECT_GCC_PREFIX}/bin"
echo "::set-env name=CCACHE_BASEDIR::${__PROJECT_EXAMPLE_DIR}"
echo "::set-env name=CCACHE_NOHASHDIR::true"
echo "PATH=${__PROJECT_CCACHE_BIN_DIR}:$PATH:${__PROJECT_TOOLCHAIN_DIR}/${__PROJECT_GCC_PREFIX}/bin" >> ${GITHUB_ENV}
echo "CCACHE_BASEDIR=${__PROJECT_EXAMPLE_DIR}" >> ${GITHUB_ENV}
echo "CCACHE_NOHASHDIR=true" >> ${GITHUB_ENV}
- name: Build (make)
if: ${{ matrix.build_method == 'make' }}
run: |
# make sure gcc is in $PATH
echo ${PATH}
${__PROJECT_GCC_FILE} --version
IGNORE_FILE="travis-ignore-esp8266"
# these drivers do not compile for ESP8266 yet
Expand Down

0 comments on commit 6ca0399

Please sign in to comment.