From 1ceeb1637a3e2d55ae2cba902c00c1e49bfe170c Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 16 Apr 2021 13:46:14 +0800 Subject: [PATCH] ugh - github composite actions are broken --- .github/actions/initbuild/action.yml | 4 ++++ .github/workflows/main.yml | 30 +++++++++++++++++++++++++++- .github/workflows/release.yml | 30 +++++++++++++++++++++++++++- 3 files changed, 62 insertions(+), 2 deletions(-) diff --git a/.github/actions/initbuild/action.yml b/.github/actions/initbuild/action.yml index a2608558..db49b31a 100644 --- a/.github/actions/initbuild/action.yml +++ b/.github/actions/initbuild/action.yml @@ -1,3 +1,7 @@ +name: 'Common init' + +# WARNING due to https://github.com/actions/runner/issues/646 +# this code can't work - must copy and paste into workflows for now because 'uses' is not supported runs: using: "composite" steps: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f72f5fc6..e316c291 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,35 @@ jobs: with: submodules: 'recursive' - - uses: ./.github/actions/initbuild + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.x + + - 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 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: | + pio upgrade # We now run integration test before other build steps (to quickly see runtime failures) - name: Build for native diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f5125dd..671d88ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,35 @@ jobs: with: submodules: 'recursive' - - uses: ./.github/actions/initbuild + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.x + + - 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 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: | + pio upgrade # Will be available in steps.version.outputs.version - name: Get version string