Improve prometheus metrics generation reliability #9
This file contains 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
# This workflow builds all platformio build targets to test whether any of them were broken by a commit. | |
name: Platform IO build | |
on: | |
push: | |
paths: | |
- src/** | |
- include/** | |
- lib/** | |
- shared/** | |
- platformio.ini | |
- .github/workflows/pio_build.yml | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
name: Platform IO build ${{ matrix.os == 'ubuntu-latest' && 'all' || 'some' }} (${{ matrix.os }}) | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
fail-fast: false | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- name: Cache pip packages and Platform IO build cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/pip | |
~/.platformio | |
.pio | |
key: platformio-${{ hashFiles('platformio.ini') }}-${{ matrix.os }} | |
- name: Install Platform IO | |
run: pip install -U platformio | |
- name: Create crdential files | |
run: | | |
echo "OTA Password" > otapass.txt | |
echo "WiFi SSID" > wifissid.txt | |
echo "WiFi Passphrase" > wifipass.txt | |
echo "MQTT Username" > mqttuser.txt | |
echo "MQTT Password" > mqttpass.txt | |
- name: Platform IO build all | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: pio run | |
- name: Platform IO build some | |
if: ${{ matrix.os != 'ubuntu-latest' }} | |
run: pio run -e esp32dev -e esp_wroom_02 |