mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 13:46:36 +00:00
Add needs
This commit is contained in:
parent
d10a7f2482
commit
2f8ab031f8
94
.github/workflows/build.yaml
vendored
94
.github/workflows/build.yaml
vendored
@ -3,14 +3,57 @@ name: Build branch
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- "**.md"
|
- '**.md'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- "**.md"
|
- '**.md'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
esp32:
|
prepare:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'true'
|
||||||
|
- name: Cache pip
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pip-
|
||||||
|
- name: Cache PlatformIO
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.platformio
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
- name: Install PlatformIO
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install --upgrade platformio
|
||||||
|
- name: Enable ESP32 platforms from platformio_override-template.ini
|
||||||
|
run: |
|
||||||
|
sed 's/; user_setups\/esp32/user_setups\/esp32/g' platformio_override-template.ini > platformio_override.ini
|
||||||
|
- name: Enable Linux platform from platformio_override.ini
|
||||||
|
run: |
|
||||||
|
sed -i 's/; user_setups\/linux/user_setups\/linux/g' platformio_override.ini
|
||||||
|
mkdir -p .pio/libdeps/linux_sdl_64bits/paho/src
|
||||||
|
- name: Install SDL2 library
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install libsdl2-dev
|
||||||
|
- name: List all files in current folder
|
||||||
|
run: |
|
||||||
|
ls -la
|
||||||
|
- name: Cat platformio_override.ini
|
||||||
|
run: |
|
||||||
|
cat platformio_override.ini
|
||||||
|
|
||||||
|
build_esp32:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: prepare
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@ -44,44 +87,6 @@ jobs:
|
|||||||
out: yeacreate
|
out: yeacreate
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: "true"
|
|
||||||
- name: Cache pip
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pip-
|
|
||||||
- name: Cache PlatformIO
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.platformio
|
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
- name: Install PlatformIO
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install --upgrade platformio
|
|
||||||
- name: Enable ESP32 platforms from platformio_override-template.ini
|
|
||||||
run: |
|
|
||||||
sed 's/; user_setups\/esp32/user_setups\/esp32/g' platformio_override-template.ini > platformio_override.ini
|
|
||||||
# - name: Enable Linux platform from platformio_override.ini
|
|
||||||
# run: |
|
|
||||||
# sed -i 's/; user_setups\/linux/user_setups\/linux/g' platformio_override.ini
|
|
||||||
# mkdir -p .pio/libdeps/linux_sdl_64bits/paho/src
|
|
||||||
# - name: Install SDL2 library
|
|
||||||
# run: |
|
|
||||||
# sudo apt-get update
|
|
||||||
# sudo apt-get install libsdl2-dev
|
|
||||||
- name: List all files in current folder
|
|
||||||
run: |
|
|
||||||
ls -la
|
|
||||||
- name: Cat platformio_override.ini
|
|
||||||
run: |
|
|
||||||
cat platformio_override.ini
|
|
||||||
- name: Run PlatformIO
|
- name: Run PlatformIO
|
||||||
run: pio run -e ${{ matrix.environment.env }}
|
run: pio run -e ${{ matrix.environment.env }}
|
||||||
- name: Upload output file
|
- name: Upload output file
|
||||||
@ -100,16 +105,17 @@ jobs:
|
|||||||
# hub release create "${assets[@]}" -m "$tag_name" "$tag_name"
|
# hub release create "${assets[@]}" -m "$tag_name" "$tag_name"
|
||||||
# env:
|
# env:
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
linux:
|
linux_build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: prepare
|
||||||
steps:
|
steps:
|
||||||
- name: Enable Linux platform from platformio_override.ini
|
- name: Enable Linux platform from platformio_override.ini
|
||||||
run: |
|
run: |
|
||||||
sed 's/; user_setups\/linux/user_setups\/linux/g' platformio_override-template.ini > platformio_override.ini
|
sed -i 's/; user_setups\/linux/user_setups\/linux/g' platformio_override.ini
|
||||||
mkdir -p .pio/libdeps/linux_sdl_64bits/paho/src
|
mkdir -p .pio/libdeps/linux_sdl_64bits/paho/src
|
||||||
- name: Install SDL2 library
|
- name: Install SDL2 library
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install libsdl2-dev
|
sudo apt-get install libsdl2-dev
|
||||||
- name: Run PlatformIO
|
- name: Run PlatformIO
|
||||||
run: pio run -e linux_sdl_64bits
|
run: pio run -e linux_sdl_64bits
|
Loading…
x
Reference in New Issue
Block a user