Adjust temperature offset value for WiFi mode #137
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build OpenCO2_Sensor | |
| on: push | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Arduino CLI | |
| uses: arduino/setup-arduino-cli@v2 | |
| with: | |
| version: "1.1.1" | |
| - name: Install ESP32 core + libraries | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| ESP_URL="https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" | |
| arduino-cli core update-index --additional-urls "$ESP_URL" | |
| arduino-cli core install esp32:[email protected] --additional-urls "$ESP_URL" | |
| arduino-cli lib update-index | |
| arduino-cli lib install "FastLED" "Sensirion Core" "Sensirion I2C SCD4x" "WiFiManager" | |
| - name: Compile and export binaries | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| # Find the sketch (.ino). If you have multiple, hardcode one path here. | |
| INO="$(find . -maxdepth 3 -type f -name '*.ino' | head -n 1)" | |
| if [[ -z "${INO:-}" ]]; then | |
| echo "ERROR: No .ino sketch found." | |
| exit 1 | |
| fi | |
| SKETCH_DIR="$(dirname "$INO")" | |
| echo "Using sketch: $INO" | |
| echo "Sketch directory: $SKETCH_DIR" | |
| arduino-cli compile \ | |
| --fqbn "esp32:esp32:esp32s2" \ | |
| --additional-urls "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" \ | |
| --library "$GITHUB_WORKSPACE/esp32-waveshare-epd" \ | |
| --export-binaries \ | |
| "$SKETCH_DIR" | |
| echo "Exported binaries:" | |
| find "$SKETCH_DIR" -type f -name '*.bin' -print || true | |
| - name: Create FIRMWARE.BIN | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| BIN="$( | |
| find . -type f -name '*.bin' \ | |
| ! -path '*/.git/*' \ | |
| ! -name '*bootloader*' \ | |
| ! -name '*partitions*' \ | |
| ! -name '*ota_data_initial*' \ | |
| -printf '%s %p\n' \ | |
| | sort -nr \ | |
| | head -n 1 \ | |
| | awk '{print $2}' | |
| )" | |
| if [[ -z "${BIN:-}" || ! -f "$BIN" ]]; then | |
| echo "ERROR: No firmware .bin found." | |
| echo "All .bin files found:" | |
| find . -type f -name '*.bin' -print || true | |
| exit 1 | |
| fi | |
| echo "Selected firmware bin: $BIN" | |
| cp "$BIN" FIRMWARE.BIN | |
| - name: Upload firmware artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: firmware | |
| path: FIRMWARE.BIN |