updatet versions of actions and added os-matrix

This commit is contained in:
Tim Huyeng 2022-10-27 13:11:50 +02:00
parent 2313480e11
commit a2d93ef0e4

View File

@ -8,38 +8,39 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-latest strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Cache pip - name: Cache pip
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ~/.cache/pip path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: | restore-keys: |
${{ runner.os }}-pip- ${{ runner.os }}-pip-
- name: Cache PlatformIO - name: Cache PlatformIO
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ~/.platformio path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v3 uses: actions/setup-python@v4
with: with:
python-version: "3.9.15" python-version: "3.9.15"
- name: Install PlatformIO - name: Install PlatformIO
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install --upgrade platformio pip install --upgrade platformio
- run: ls
- name: Copy of necessary files - name: Copy of necessary files
run: | run: |
cp platformio_orig.ini platformio.ini cp platformio_orig.ini platformio.ini
cp src/loraconf_sample.h src/loraconf.h cp src/loraconf_sample.h src/loraconf.h
cp src/ota_sample.conf src/ota.conf cp src/ota_sample.conf src/ota.conf
cp src/paxcounter_orig.conf src/paxcounter.conf cp src/paxcounter_orig.conf src/paxcounter.conf
- run: ls
- name: Run PlatformIO - name: Run PlatformIO
run: pio run run: pio run