From 2ae6a4f46ced0acbdf4d1ca90a78964e8e69297b Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 16 Apr 2021 09:39:10 +0800 Subject: [PATCH] improve github actions --- .github/workflows/main.yml | 41 +++++++++++++++++++++++++++++++------- docs/CNAME | 1 - 2 files changed, 34 insertions(+), 8 deletions(-) delete mode 100644 docs/CNAME diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2ac3451c..63e5a973 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,27 +1,54 @@ name: Continuous Integration on: - - push - - pull_request + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: setup: runs-on: ubuntu-latest steps: + echo "No action setup currently needed, skipping..." + + build: + needs: setup + runs-on: ubuntu-latest - name: Checkout code uses: actions/checkout@v2 with: - submodules: true + submodules: 'recursive' - name: Setup Python uses: actions/setup-python@v2 with: python-version: 3.x - - name: Install Platform IO and meshtastic-python + + - name: Cache python libs + uses: actions/cache@v1 + id: cache-pip # needed in if test + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip + + - 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 - - name: Install extra python tools + pip install -U platformio meshtastic adafruit-nrfutil + + - name: Cache platformio + uses: actions/cache@v1 + id: cache-platformio # needed in if test + with: + path: ~/.platformio + key: ${{ runner.os }}-platformio + + - name: Upgrade platformio run: | - pip install -U adafruit-nrfutil + pio upgrade + - name: Build for tbeam run: platformio run -e tbeam - name: Build for heltec diff --git a/docs/CNAME b/docs/CNAME deleted file mode 100644 index 42401b5e..00000000 --- a/docs/CNAME +++ /dev/null @@ -1 +0,0 @@ -www.meshtastic.org \ No newline at end of file