From cc9f116c679cc7d01ecf16dd3f48f922f4e73c28 Mon Sep 17 00:00:00 2001 From: Hasenradball Date: Wed, 24 Apr 2024 07:14:01 +0200 Subject: [PATCH 1/4] Create Compile_Examples_ESP8266.yml --- .../workflows/Compile_Examples_ESP8266.yml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/Compile_Examples_ESP8266.yml diff --git a/.github/workflows/Compile_Examples_ESP8266.yml b/.github/workflows/Compile_Examples_ESP8266.yml new file mode 100644 index 0000000..5169ea7 --- /dev/null +++ b/.github/workflows/Compile_Examples_ESP8266.yml @@ -0,0 +1,29 @@ +name: Compile Arduino Code + +on: [push, pull_request] + +jobs: + build-arduino: + runs-on: ubuntu-latest + if: contains(github.event.head_commit.message, '[arduino]') + steps: + # Schritte zum Kompilieren von Arduino-Beispielen + + build-esp8266: + runs-on: ubuntu-latest + if: contains(github.event.head_commit.message, '[esp8266]') + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Arduino CLI + uses: arduino/setup-arduino-cli@v1 + + - name: Install ESP8266 platform + run: | + arduino-cli core update-index + arduino-cli core install esp8266:esp8266 + + - name: Compile code + run: | + arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2 https://github.com/hasenradball/AM2302-Sensor From fd1c159e4fab1e0fb2226b6aa977d8e3d9a5a6dd Mon Sep 17 00:00:00 2001 From: Hasenradball Date: Wed, 24 Apr 2024 07:27:29 +0200 Subject: [PATCH 2/4] Update Compile_Examples_ESP8266.yml --- .../workflows/Compile_Examples_ESP8266.yml | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/Compile_Examples_ESP8266.yml b/.github/workflows/Compile_Examples_ESP8266.yml index 5169ea7..8cf6c47 100644 --- a/.github/workflows/Compile_Examples_ESP8266.yml +++ b/.github/workflows/Compile_Examples_ESP8266.yml @@ -7,23 +7,27 @@ jobs: runs-on: ubuntu-latest if: contains(github.event.head_commit.message, '[arduino]') steps: - # Schritte zum Kompilieren von Arduino-Beispielen + - uses: actions/checkout@v2 + - uses: arduino/compile-sketches@v1 + with: + libraries: | + - source-path: ./ build-esp8266: runs-on: ubuntu-latest if: contains(github.event.head_commit.message, '[esp8266]') steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Install Arduino CLI - uses: arduino/setup-arduino-cli@v1 - - - name: Install ESP8266 platform - run: | - arduino-cli core update-index - arduino-cli core install esp8266:esp8266 - - - name: Compile code - run: | - arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2 https://github.com/hasenradball/AM2302-Sensor + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Arduino CLI + uses: arduino/setup-arduino-cli@v1 + + - name: Install ESP8266 platform + run: | + arduino-cli core update-index + arduino-cli core install esp8266:esp8266 + + - name: Compile code + run: | + arduino-cli compile --fqbn esp8266:esp8266:d1_mini ./examples/Wemos_D1_mini_AM2302_Sensor_Array_Example/Wemos_D1_mini_AM2302_Sensor_Array_Example.ino From 2c6e5b501f36235e594ca17b6ac6345420199dcf Mon Sep 17 00:00:00 2001 From: Hasenradball Date: Wed, 24 Apr 2024 07:43:05 +0200 Subject: [PATCH 3/4] Update and rename .github/workflows/Compile_Examples_ESP8266.yml to compile_examples.yml update due to syntax error. --- .../Compile_Examples_ESP8266.yml => compile_examples.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) rename .github/workflows/Compile_Examples_ESP8266.yml => compile_examples.yml (97%) diff --git a/.github/workflows/Compile_Examples_ESP8266.yml b/compile_examples.yml similarity index 97% rename from .github/workflows/Compile_Examples_ESP8266.yml rename to compile_examples.yml index 8cf6c47..116ba65 100644 --- a/.github/workflows/Compile_Examples_ESP8266.yml +++ b/compile_examples.yml @@ -12,8 +12,7 @@ jobs: with: libraries: | - source-path: ./ - - build-esp8266: + build-esp8266: runs-on: ubuntu-latest if: contains(github.event.head_commit.message, '[esp8266]') steps: From 35b5cfeed48bf1194223d0c85b234feda4fc6eda Mon Sep 17 00:00:00 2001 From: Hasenradball Date: Wed, 24 Apr 2024 07:50:29 +0200 Subject: [PATCH 4/4] Update compile_examples.yml --- .github/workflows/compile_examples.yml | 35 +++++++++++++++++++------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/compile_examples.yml b/.github/workflows/compile_examples.yml index d44bd97..42e799d 100644 --- a/.github/workflows/compile_examples.yml +++ b/.github/workflows/compile_examples.yml @@ -1,16 +1,33 @@ name: Compile Examples -on: - - push - - pull_request +on: [push, pull_request] jobs: - compile-examples: + build-arduino: runs-on: ubuntu-latest + if: contains(github.event.head_commit.message, '[arduino]') + steps: + - uses: actions/checkout@v3 + - uses: arduino/compile-sketches@v1 + with: + libraries: | + - source-path: ./ + build-esp8266: + runs-on: ubuntu-latest + if: contains(github.event.head_commit.message, '[esp8266]') steps: - - uses: actions/checkout@v3 - - uses: arduino/compile-sketches@v1 - with: - libraries: | - - source-path: ./ + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Arduino CLI + uses: arduino/setup-arduino-cli@v1 + + - name: Install ESP8266 platform + run: | + arduino-cli core update-index + arduino-cli core install esp8266:esp8266 + + - name: Compile code + run: | + arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2 ./path-to-your-sketch