kopia lustrzana https://github.com/jgromes/RadioLib
[CI] Added option to build single platform arduino:avr:mega
rodzic
8f1303c061
commit
ee4b20d661
|
@ -11,7 +11,7 @@ jobs:
|
||||||
Build:
|
Build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
board:
|
board:
|
||||||
- arduino:avr:uno
|
- arduino:avr:uno
|
||||||
- arduino:avr:mega:cpu=atmega2560
|
- arduino:avr:mega:cpu=atmega2560
|
||||||
- arduino:avr:leonardo
|
- arduino:avr:leonardo
|
||||||
|
@ -29,12 +29,12 @@ jobs:
|
||||||
- stm32duino:STM32F1:mapleMini:bootloader_version=original,cpu_speed=speed_72mhz
|
- stm32duino:STM32F1:mapleMini:bootloader_version=original,cpu_speed=speed_72mhz
|
||||||
- adafruit:samd:adafruit_feather_m0:usbstack=arduino,debug=off
|
- adafruit:samd:adafruit_feather_m0:usbstack=arduino,debug=off
|
||||||
- arduino-beta:mbed:envie_m4
|
- arduino-beta:mbed:envie_m4
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: ${{ matrix.board }}
|
name: ${{ matrix.board }}
|
||||||
env:
|
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:
|
steps:
|
||||||
- name: Install arduino-cli
|
- name: Install arduino-cli
|
||||||
if: ${{ env.run-build == 'true' }}
|
if: ${{ env.run-build == 'true' }}
|
||||||
|
@ -42,7 +42,7 @@ jobs:
|
||||||
mkdir -p ~/.local/bin
|
mkdir -p ~/.local/bin
|
||||||
echo "::add-path::~/.local/bin"
|
echo "::add-path::~/.local/bin"
|
||||||
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=~/.local/bin sh
|
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=~/.local/bin sh
|
||||||
|
|
||||||
- name: Get platform name
|
- name: Get platform name
|
||||||
if: ${{ env.run-build == 'true' }}
|
if: ${{ env.run-build == 'true' }}
|
||||||
uses: jungwinter/split@v1
|
uses: jungwinter/split@v1
|
||||||
|
@ -50,7 +50,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
msg: ${{ matrix.board }}
|
msg: ${{ matrix.board }}
|
||||||
seperator: ':'
|
seperator: ':'
|
||||||
|
|
||||||
- name: Prepare platform-specific settings
|
- name: Prepare platform-specific settings
|
||||||
if: ${{ env.run-build == 'true' }}
|
if: ${{ env.run-build == 'true' }}
|
||||||
id: prep
|
id: prep
|
||||||
|
@ -58,19 +58,19 @@ jobs:
|
||||||
# common settings - skip nothing, all warnings
|
# common settings - skip nothing, all warnings
|
||||||
echo "::set-output name=skip-pattern::''"
|
echo "::set-output name=skip-pattern::''"
|
||||||
echo "::set-output name=warnings::'all'"
|
echo "::set-output name=warnings::'all'"
|
||||||
|
|
||||||
# platform-dependent settings - board index URLs, skip paterns etc.
|
# platform-dependent settings - board index URLs, skip paterns etc.
|
||||||
if [[ "${{ contains(matrix.board, 'esp8266:esp8266') }}" == "true" ]]; then
|
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=index-url::--additional-urls http://arduino.esp8266.com/stable/package_esp8266com_index.json"
|
||||||
echo "::set-output name=skip-pattern::(HTTP|MQTT).*ino"
|
echo "::set-output name=skip-pattern::(HTTP|MQTT).*ino"
|
||||||
|
|
||||||
elif [[ "${{ contains(matrix.board, 'esp32:esp32') }}" == "true" ]]; then
|
elif [[ "${{ contains(matrix.board, 'esp32:esp32') }}" == "true" ]]; then
|
||||||
python -m pip install pyserial
|
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"
|
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
|
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"
|
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
|
elif [[ "${{ contains(matrix.board, 'adafruit:nrf52') }}" == "true" ]]; then
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y python3 python3-pip python3-setuptools
|
sudo apt-get install -y python3 python3-pip python3-setuptools
|
||||||
|
@ -78,35 +78,35 @@ jobs:
|
||||||
pip3 install --user adafruit-nrfutil
|
pip3 install --user adafruit-nrfutil
|
||||||
echo "::add-path::~/.local/bin"
|
echo "::add-path::~/.local/bin"
|
||||||
echo "::set-output name=index-url::--additional-urls https://www.adafruit.com/package_adafruit_index.json"
|
echo "::set-output name=index-url::--additional-urls https://www.adafruit.com/package_adafruit_index.json"
|
||||||
|
|
||||||
elif [[ "${{ contains(matrix.board, 'SparkFun:apollo3') }}" == "true" ]]; then
|
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=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'"
|
echo "::set-output name=warnings::'none'"
|
||||||
|
|
||||||
elif [[ "${{ contains(matrix.board, 'arduino:mbed') }}" == "true" ]]; then
|
elif [[ "${{ contains(matrix.board, 'arduino:mbed') }}" == "true" ]]; then
|
||||||
echo "::set-output name=skip-pattern::(HTTP|MQTT).*ino"
|
echo "::set-output name=skip-pattern::(HTTP|MQTT).*ino"
|
||||||
|
|
||||||
elif [[ "${{ contains(matrix.board, 'stm32duino:STM32F1') }}" == "true" ]]; then
|
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"
|
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
|
elif [[ "${{ contains(matrix.board, 'adafruit:samd') }}" == "true" ]]; then
|
||||||
echo "::set-output name=index-url::--additional-urls https://www.adafruit.com/package_adafruit_index.json"
|
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
|
elif [[ "${{ contains(matrix.board, 'arduino-beta:mbed') }}" == "true" ]]; then
|
||||||
echo "::set-output name=skip-pattern::(HTTP|MQTT).*ino"
|
echo "::set-output name=skip-pattern::(HTTP|MQTT).*ino"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Install platform
|
- name: Install platform
|
||||||
if: ${{ env.run-build == 'true' }}
|
if: ${{ env.run-build == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
arduino-cli core update-index ${{ format('{0}', steps.prep.outputs.index-url) }}
|
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) }}
|
arduino-cli core install ${{ format('{0}:{1} {2}', steps.split.outputs._0, steps.split.outputs._1, steps.prep.outputs.index-url) }}
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
if: ${{ env.run-build == 'true' }}
|
if: ${{ env.run-build == 'true' }}
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Build examples
|
- name: Build examples
|
||||||
if: ${{ env.run-build == 'true' }}
|
if: ${{ env.run-build == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
|
@ -127,7 +127,7 @@ jobs:
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
Doxygen:
|
Doxygen:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -135,12 +135,12 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y doxygen
|
sudo apt-get install -y doxygen
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Generate docs
|
- name: Generate docs
|
||||||
run: doxygen Doxyfile
|
run: doxygen Doxyfile
|
||||||
|
|
||||||
- uses: JamesIves/github-pages-deploy-action@releases/v3
|
- uses: JamesIves/github-pages-deploy-action@releases/v3
|
||||||
with:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
Ładowanie…
Reference in New Issue