From 9fbd6e658a38c91b9972c7890fc3540189dbb545 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Wed, 17 Nov 2021 11:30:06 +0100 Subject: [PATCH] CI: Build on linux and Run host tests --- .github/workflows/host-test.yml | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/host-test.yml diff --git a/.github/workflows/host-test.yml b/.github/workflows/host-test.yml new file mode 100644 index 000000000..387cbe768 --- /dev/null +++ b/.github/workflows/host-test.yml @@ -0,0 +1,44 @@ +name: Host test + +on: [push, pull_request] + +jobs: + host_test: + name: Build and test + runs-on: ubuntu-20.04 + container: espressif/idf:release-v4.3 + env: + lwip: lwip-2.1.2 + lwip_contrib: contrib-2.1.0 + lwip_uri: http://download.savannah.nongnu.org/releases/lwip + + + steps: + - name: Checkout esp-protocols + uses: actions/checkout@master + with: + path: esp-protocols + + - name: Build and Test + shell: bash + run: | + apt-get update && apt-get install -y gcc-8 g++-8 + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 + export LWIP_PATH=`pwd`/${{ env.lwip }} + export LWIP_CONTRIB_PATH=`pwd`/${{ env.lwip_contrib }} + wget --no-verbose ${lwip_uri}/${lwip}.zip + unzip -oq ${lwip}.zip + wget --no-verbose ${lwip_uri}/${lwip_contrib}.zip + unzip -oq ${lwip_contrib}.zip + . ${IDF_PATH}/export.sh + cd $GITHUB_WORKSPACE/esp-protocols/components/esp_modem/examples/linux_modem + idf.py build + cd $GITHUB_WORKSPACE/esp-protocols/components/esp_modem/test/host_test + idf.py build + ./build/host_modem_test.elf -r junit -o junit.xml + + - name: Publish Results + uses: EnricoMi/publish-unit-test-result-action@v1 + if: always() + with: + files: esp-protocols/components/esp_modem/test/host_test/junit.xml