ci changes

This commit is contained in:
Kevin Hester 2021-04-16 10:41:54 +08:00
parent 35a9c23bb6
commit 50f739bacf

View File

@ -9,58 +9,61 @@ on:
jobs: jobs:
setup: setup:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: # steps:
echo "No action setup currently needed, skipping..." # echo "No action setup currently needed, skipping..."
build: build:
needs: setup needs: setup
runs-on: ubuntu-latest runs-on: ubuntu-latest
- name: Checkout code steps:
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Cache python libs - name: Checkout code
uses: actions/cache@v1 uses: actions/checkout@v2
id: cache-pip # needed in if test with:
with: submodules: 'recursive'
path: ~/.cache/pip
key: ${{ runner.os }}-pip
- name: Upgrade python tools - name: Setup Python
# We actually want to run this every time uses: actions/setup-python@v2
# if: steps.cache-pip.outputs.cache-hit != 'true' with:
run: | python-version: 3.x
python -m pip install --upgrade pip
pip install -U platformio meshtastic adafruit-nrfutil
- name: Cache platformio - name: Cache python libs
uses: actions/cache@v1 uses: actions/cache@v1
id: cache-platformio # needed in if test id: cache-pip # needed in if test
with: with:
path: ~/.platformio path: ~/.cache/pip
key: ${{ runner.os }}-platformio key: ${{ runner.os }}-pip
- name: Upgrade platformio - name: Upgrade python tools
run: | # We actually want to run this every time
pio upgrade # if: steps.cache-pip.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install -U platformio meshtastic adafruit-nrfutil
- name: Build for tbeam - name: Cache platformio
run: platformio run -e tbeam uses: actions/cache@v1
- name: Build for heltec id: cache-platformio # needed in if test
run: platformio run -e heltec with:
- name: Build for wisblock RAK4631 path: ~/.platformio
run: platformio run -e rak4631 key: ${{ runner.os }}-platformio
- name: Build for native
run: platformio run -e native - name: Upgrade platformio
- name: Integration test run: |
run: | pio upgrade
.pio/build/native/program &
sleep 5 - name: Build for tbeam
echo "Simulator started, launching python test..." run: platformio run -e tbeam
python3 -c 'from meshtastic.test import testSimulator; testSimulator()' - name: Build for heltec
run: platformio run -e heltec
- name: Build for wisblock RAK4631
run: platformio run -e rak4631
- name: Build for native
run: platformio run -e native
- name: Integration test
run: |
.pio/build/native/program &
sleep 5
echo "Simulator started, launching python test..."
python3 -c 'from meshtastic.test import testSimulator; testSimulator()'