[CI] Added option to build single platform arduino:avr:mega
This commit is contained in:
parent
8f1303c061
commit
ee4b20d661
1 changed files with 23 additions and 23 deletions
46
.github/workflows/main.yml
vendored
46
.github/workflows/main.yml
vendored
|
@ -11,7 +11,7 @@ jobs:
|
|||
Build:
|
||||
strategy:
|
||||
matrix:
|
||||
board:
|
||||
board:
|
||||
- arduino:avr:uno
|
||||
- arduino:avr:mega:cpu=atmega2560
|
||||
- arduino:avr:leonardo
|
||||
|
@ -29,12 +29,12 @@ jobs:
|
|||
- stm32duino:STM32F1:mapleMini:bootloader_version=original,cpu_speed=speed_72mhz
|
||||
- adafruit:samd:adafruit_feather_m0:usbstack=arduino,debug=off
|
||||
- arduino-beta:mbed:envie_m4
|
||||
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
name: ${{ matrix.board }}
|
||||
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') }}
|
||||
|
||||
run-build: ${{ (matrix.board == 'arduino:avr:uno') || contains(github.event.head_commit.message, 'CI_BUILD_ALL') || contains(github.event.head_commit.message, 'Bump version to') || contains(github.event.head_commit.message, matrix.board) }}
|
||||
|
||||
steps:
|
||||
- name: Install arduino-cli
|
||||
if: ${{ env.run-build == 'true' }}
|
||||
|
@ -42,7 +42,7 @@ jobs:
|
|||
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: Get platform name
|
||||
if: ${{ env.run-build == 'true' }}
|
||||
uses: jungwinter/split@v1
|
||||
|
@ -50,7 +50,7 @@ jobs:
|
|||
with:
|
||||
msg: ${{ matrix.board }}
|
||||
seperator: ':'
|
||||
|
||||
|
||||
- name: Prepare platform-specific settings
|
||||
if: ${{ env.run-build == 'true' }}
|
||||
id: prep
|
||||
|
@ -58,19 +58,19 @@ jobs:
|
|||
# common settings - skip nothing, all warnings
|
||||
echo "::set-output name=skip-pattern::''"
|
||||
echo "::set-output name=warnings::'all'"
|
||||
|
||||
|
||||
# platform-dependent settings - board index URLs, skip paterns etc.
|
||||
if [[ "${{ contains(matrix.board, 'esp8266:esp8266') }}" == "true" ]]; then
|
||||
echo "::set-output name=index-url::--additional-urls http://arduino.esp8266.com/stable/package_esp8266com_index.json"
|
||||
echo "::set-output name=skip-pattern::(HTTP|MQTT).*ino"
|
||||
|
||||
|
||||
elif [[ "${{ contains(matrix.board, 'esp32:esp32') }}" == "true" ]]; then
|
||||
python -m pip install pyserial
|
||||
echo "::set-output name=index-url::--additional-urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json"
|
||||
|
||||
|
||||
elif [[ "${{ contains(matrix.board, 'STM32:stm32') }}" == "true" ]]; then
|
||||
echo "::set-output name=index-url::--additional-urls https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json"
|
||||
|
||||
|
||||
elif [[ "${{ contains(matrix.board, 'adafruit:nrf52') }}" == "true" ]]; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python3 python3-pip python3-setuptools
|
||||
|
@ -78,35 +78,35 @@ jobs:
|
|||
pip3 install --user adafruit-nrfutil
|
||||
echo "::add-path::~/.local/bin"
|
||||
echo "::set-output name=index-url::--additional-urls https://www.adafruit.com/package_adafruit_index.json"
|
||||
|
||||
|
||||
elif [[ "${{ contains(matrix.board, 'SparkFun:apollo3') }}" == "true" ]]; then
|
||||
echo "::set-output name=index-url::--additional-urls https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json"
|
||||
echo "::set-output name=warnings::'none'"
|
||||
|
||||
|
||||
elif [[ "${{ contains(matrix.board, 'arduino:mbed') }}" == "true" ]]; then
|
||||
echo "::set-output name=skip-pattern::(HTTP|MQTT).*ino"
|
||||
|
||||
|
||||
elif [[ "${{ contains(matrix.board, 'stm32duino:STM32F1') }}" == "true" ]]; then
|
||||
echo "::set-output name=index-url::--additional-urls http://dan.drown.org/stm32duino/package_STM32duino_index.json"
|
||||
|
||||
|
||||
elif [[ "${{ contains(matrix.board, 'adafruit:samd') }}" == "true" ]]; then
|
||||
echo "::set-output name=index-url::--additional-urls https://www.adafruit.com/package_adafruit_index.json"
|
||||
|
||||
|
||||
elif [[ "${{ contains(matrix.board, 'arduino-beta:mbed') }}" == "true" ]]; then
|
||||
echo "::set-output name=skip-pattern::(HTTP|MQTT).*ino"
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
- name: Install platform
|
||||
if: ${{ env.run-build == 'true' }}
|
||||
run: |
|
||||
arduino-cli core update-index ${{ format('{0}', steps.prep.outputs.index-url) }}
|
||||
arduino-cli core install ${{ format('{0}:{1} {2}', steps.split.outputs._0, steps.split.outputs._1, steps.prep.outputs.index-url) }}
|
||||
|
||||
|
||||
- name: Checkout repository
|
||||
if: ${{ env.run-build == 'true' }}
|
||||
uses: actions/checkout@v2
|
||||
|
||||
|
||||
- name: Build examples
|
||||
if: ${{ env.run-build == 'true' }}
|
||||
run: |
|
||||
|
@ -127,7 +127,7 @@ jobs:
|
|||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
Doxygen:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
@ -135,12 +135,12 @@ jobs:
|
|||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y doxygen
|
||||
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
||||
- name: Generate docs
|
||||
run: doxygen Doxyfile
|
||||
|
||||
|
||||
- uses: JamesIves/github-pages-deploy-action@releases/v3
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
Loading…
Add table
Reference in a new issue