From 1342d7ac22186152aa9177d7f2894c8f59a7893b Mon Sep 17 00:00:00 2001 From: hirotakaster Date: Sun, 27 Dec 2020 22:34:29 +0900 Subject: [PATCH] compile workflow. --- .github/workflows/compile.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/compile.yml diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml new file mode 100644 index 0000000..b8ebaab --- /dev/null +++ b/.github/workflows/compile.yml @@ -0,0 +1,36 @@ +name: Compile Test +on: [push, pull_request] +jobs: + compile-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Setup Arduino CLI + uses: arduino/setup-arduino-cli@v1.1.1 + with: + version: "0.14.0" + + - name: Install platform + run: | + arduino-cli core update-index + arduino-cli core update-index --additional-urls "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" + arduino-cli core install "arduino:avr" + arduino-cli core install "esp32:esp32" --additional-urls "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" + arduino-cli lib install Ethernet + python -m pip install --upgrade pip + pip install pyserial + + - name: Arduino test + run: | + cp coap-simple.* ./examples/coaptest + sed -i -e "s/XXX/10/g" ./examples/coaptest/coaptest.ino + sed -i -e "s//\"coap-simple\.h\"/g" ./examples/coaptest/coaptest.ino + arduino-cli compile --fqbn "arduino:avr:uno" ./examples/coaptest + + - name: ESP32 test + run: | + cp coap-simple.* ./examples/esp32 + sed -i -e "s//\"coap-simple\.h\"/g" ./examples/esp32/esp32.ino + arduino-cli compile --fqbn "esp32:esp32:esp32" ./examples/esp32 \ No newline at end of file