mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-02 18:51:38 +02:00
github action test
This commit is contained in:
parent
135a1f8032
commit
17df96ed68
2 changed files with 82 additions and 28 deletions
108
.github/workflows/compile_development.yml
vendored
108
.github/workflows/compile_development.yml
vendored
|
@ -5,14 +5,34 @@ on:
|
|||
branches: development*
|
||||
paths-ignore:
|
||||
- '**.md' # Do no build on *.md changes
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'lumapu/ahoy' && github.ref_name == 'development03'
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
build-en:
|
||||
needs: check
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
variant:
|
||||
- esp8266
|
||||
- esp8266-prometheus
|
||||
- esp8285
|
||||
- esp32-wroom32
|
||||
- esp32-wroom32-prometheus
|
||||
- esp32-wroom32-ethernet
|
||||
- esp32-s2-mini
|
||||
- esp32-c3-mini
|
||||
- opendtufusion
|
||||
- opendtufusion-ethernet
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: development03
|
||||
- uses: benjlevesque/short-sha@v2.1
|
||||
id: short-sha
|
||||
with:
|
||||
|
@ -43,29 +63,63 @@ jobs:
|
|||
pip install --upgrade platformio
|
||||
|
||||
- name: Run PlatformIO
|
||||
run: >
|
||||
pio run -d src
|
||||
--environment esp8266
|
||||
--environment esp8266-prometheus
|
||||
--environment esp8285
|
||||
--environment esp32-wroom32
|
||||
--environment esp32-wroom32-prometheus
|
||||
--environment esp32-wroom32-ethernet
|
||||
--environment esp32-s2-mini
|
||||
--environment esp32-c3-mini
|
||||
--environment opendtufusion
|
||||
--environment opendtufusion-ethernet
|
||||
--environment esp8266-de
|
||||
--environment esp8266-prometheus-de
|
||||
--environment esp8285-de
|
||||
--environment esp32-wroom32-de
|
||||
--environment esp32-wroom32-prometheus-de
|
||||
--environment esp32-wroom32-ethernet-de
|
||||
--environment esp32-s2-mini-de
|
||||
--environment esp32-c3-mini-de
|
||||
--environment opendtufusion-de
|
||||
--environment opendtufusion-ethernet-de
|
||||
run: pio run -d src -e ${{ matrix.variant }}
|
||||
|
||||
build-de:
|
||||
needs: check
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
variant:
|
||||
- esp8266-de
|
||||
- esp8266-prometheus-de
|
||||
- esp8285-de
|
||||
- esp32-wroom32-de
|
||||
- esp32-wroom32-prometheus-de
|
||||
- esp32-wroom32-ethernet-de
|
||||
- esp32-s2-mini-de
|
||||
- esp32-c3-mini-de
|
||||
- opendtufusion-de
|
||||
- opendtufusion-ethernet-de
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: benjlevesque/short-sha@v2.1
|
||||
id: short-sha
|
||||
with:
|
||||
length: 7
|
||||
|
||||
- name: Cache Pip
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Cache PlatformIO
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4.3.0
|
||||
with:
|
||||
python-version: "3.x"
|
||||
|
||||
- name: Install PlatformIO
|
||||
run: |
|
||||
python -m pip install setuptools --upgrade pip
|
||||
pip install --upgrade platformio
|
||||
|
||||
- name: Run PlatformIO
|
||||
run: pio run -d src -e ${{ matrix.variant }}
|
||||
|
||||
deploy:
|
||||
needs: [build-en, build-de]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Copy boot_app0.bin
|
||||
run: cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin src/.pio/build/opendtufusion/ota.bin
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ namespace ah {
|
|||
sprintf(str, "n/a");
|
||||
else {
|
||||
t = (t + (millis() % 1000)) / 1000;
|
||||
sprintf(str, "%02d:%02d:%02d.%03d", hour(t), minute(t), second(t), millis() % 1000);
|
||||
sprintf(str, "%02d:%02d:%02d.%03d", hour(t), minute(t), second(t), (uint16_t)(millis() % 1000));
|
||||
}
|
||||
return String(str);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue