From 50f739bacf8724777f507ecdb2460b42b335111c Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 16 Apr 2021 10:41:54 +0800 Subject: [PATCH] ci changes --- .github/workflows/main.yml | 95 ++++++++++++++++++++------------------ 1 file changed, 49 insertions(+), 46 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 63e5a9732..6f325cbe5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,58 +9,61 @@ on: jobs: setup: runs-on: ubuntu-latest - steps: - echo "No action setup currently needed, skipping..." + # steps: + # echo "No action setup currently needed, skipping..." build: needs: setup - runs-on: ubuntu-latest - - name: Checkout code - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: 3.x + runs-on: ubuntu-latest + steps: - - name: Cache python libs - uses: actions/cache@v1 - id: cache-pip # needed in if test - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip + - name: Checkout code + uses: actions/checkout@v2 + with: + submodules: 'recursive' + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.x - - name: Upgrade python tools - # We actually want to run this every time - # if: steps.cache-pip.outputs.cache-hit != 'true' - run: | - python -m pip install --upgrade pip - pip install -U platformio meshtastic adafruit-nrfutil + - name: Cache python libs + uses: actions/cache@v1 + id: cache-pip # needed in if test + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip - - name: Cache platformio - uses: actions/cache@v1 - id: cache-platformio # needed in if test - with: - path: ~/.platformio - key: ${{ runner.os }}-platformio + - name: Upgrade python tools + # We actually want to run this every time + # if: steps.cache-pip.outputs.cache-hit != 'true' + run: | + python -m pip install --upgrade pip + pip install -U platformio meshtastic adafruit-nrfutil - - name: Upgrade platformio - run: | - pio upgrade + - name: Cache platformio + uses: actions/cache@v1 + id: cache-platformio # needed in if test + with: + path: ~/.platformio + key: ${{ runner.os }}-platformio - - name: Build for tbeam - run: platformio run -e tbeam - - 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()' + - name: Upgrade platformio + run: | + pio upgrade + + - name: Build for tbeam + run: platformio run -e tbeam + - 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()'