diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fa9bd4e3..d7832ab5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,24 +19,30 @@ jobs: board: "arduino:samd:arduino_zero_native" runs-on: ubuntu-latest + env: + run-build: ${{ (matrix.board == "arduino:avr:uno") || "contains(github.event.head_commit.message, 'CI_FORCE_BUILD'" || "contains(github.event.head_commit.message, 'Bump version to'" }} steps: - name: Install arduino-cli + if: ${{ run-build }} run: | mkdir -p ~/.local/bin echo "::add-path::~/.local/bin" curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=~/.local/bin sh - name: Install platform + if: ${{ run-build }} run: | arduino-cli core update-index arduino-cli core install ${{ matrix.platform }} echo "::set-env name=WARNINGS::all" - name: Checkout + if: ${{ run-build }} uses: actions/checkout@v2 - name: Build all examples + if: ${{ run-build }} run: | for example in $(find $PWD/examples -name '*.ino' | sort); do # check whether to skip this sketch