Skip to content

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #81

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #81

Workflow file for this run

name: Build
env:
SKETCH_NAME: "*.ino"
PROJECT_NAME: ESP32-BLECollector
on:
push:
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- '**build.yml'
pull_request:
release:
types: [published]
workflow_dispatch:
inputs:
# logLevel:
# description: 'Log level'
# required: true
# default: 'warning'
tag_name:
description: 'Target tag'
jobs:
matrix_build:
name: ${{ matrix.fancy-name }}
runs-on: ubuntu-latest
strategy:
matrix:
arduino-boards-fqbn:
- esp32:esp32:m5stack-core-esp32:PartitionScheme=min_spiffs
- esp32:esp32:m5stack-fire
- esp32:esp32:m5stack-core2
- esp32:esp32:odroid_esp32:PartitionScheme=min_spiffs
- esp32:esp32:esp32s3box
platform-url:
- https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
required-libraries:
- ESP32-Chimera-Core,Time,LovyanGFX,M5Stack-SD-Updater,Sqlite3Esp32,TinyGPSPlus,NimBLE-Arduino
include:
- arduino-boards-fqbn: esp32:esp32:m5stack-core-esp32:PartitionScheme=min_spiffs
fancy-name: M5Stack
bin-name: M5stack-BLECollector.bin
- arduino-boards-fqbn: esp32:esp32:m5stack-core2
fancy-name: M5Core2
bin-name: M5Core2-BLECollector.bin
- arduino-boards-fqbn: esp32:esp32:m5stack-fire
fancy-name: M5Fire
bin-name: M5Fire-BLECollector.bin
- arduino-boards-fqbn: esp32:esp32:odroid_esp32:PartitionScheme=min_spiffs
fancy-name: OdroidGo
bin-name: OdroidGo-BLECollector.bin
- arduino-boards-fqbn: esp32:esp32:esp32s3box
fancy-name: S3Box
bin-name: S3Box-BLECollector.bin
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Compile example
uses: ArminJo/arduino-test-compile@v3
with:
arduino-board-fqbn: ${{ matrix.arduino-boards-fqbn }}
platform-url: ${{ matrix.platform-url }}
required-libraries: ${{ matrix.required-libraries }}
build-properties: ${{ toJson(matrix.build-properties) }}
sketch-names: ${{ env.SKETCH_NAME }}
set-build-path: true
extra-arduino-cli-args: --warnings none
- name: Copy compiled binary
#if: startsWith(github.ref, 'refs/tags/')
run: |
binFile=`find . | grep 'ESP32-BLECollector.ino.bin' | head -1`
binPath=`dirname $binFile`
echo "binPath: $binPath"
echo "binFile: $binFile"
echo "binName: ${{ matrix.bin-name }}"
ls $binPath
mkdir -p /home/runner/builds
cp "$binFile" "/home/runner/builds/${{ matrix.bin-name }}"
- name: Upload artifact ${{ matrix.bin-name }}
uses: actions/upload-artifact@v3
#if: startsWith(github.ref, 'refs/tags/')
with:
name: ${{ matrix.bin-name }}
path: /home/runner/builds/${{ matrix.bin-name }}
post_build:
name: Gather Artefacts
runs-on: ubuntu-latest
# wait until matrix jobs are all finished
needs: matrix_build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create artifacts dir
#if: startsWith(github.ref, 'refs/tags/')
run: mkdir -p /home/runner/builds
- name: Download artifacts
uses: actions/download-artifact@v4.1.7
#if: startsWith(github.ref, 'refs/tags/')
with:
path: /home/runner/builds
- name: Dispatch check
uses: softprops/action-gh-release@v1
if: github.event.inputs.tag_name != ''
with:
tag_name: ${{ github.event.inputs.tag_name }}
files: |
/home/runner/builds/M5stack-BLECollector.bin/*
/home/runner/builds/M5Core2-BLECollector.bin/*
/home/runner/builds/M5Fire-BLECollector.bin/*
/home/runner/builds/OdroidGo-BLECollector.bin/*
/home/runner/builds/S3Box-BLECollector.bin/*
- name: Release check
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
/home/runner/builds/M5stack-BLECollector.bin
/home/runner/builds/M5Core2-BLECollector.bin
/home/runner/builds/M5Fire-BLECollector.bin
/home/runner/builds/OdroidGo-BLECollector.bin
/home/runner/builds/S3Box-BLECollector.bin