-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
93 changed files
with
1,143 additions
and
1,305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ on: | |
- MegaCore:avr:1281 | ||
- teensy:avr:teensy41 | ||
- arduino:renesas_uno:minima | ||
- SiliconLabs:silabs:xg24explorerkit | ||
|
||
jobs: | ||
build: | ||
|
@@ -89,7 +90,7 @@ jobs: | |
- id: STMicroelectronics:stm32:Nucleo_64:pnum=NUCLEO_WL55JC1 | ||
run: | | ||
# Do *not* skip STM32WL examples | ||
echo "skip-pattern='LR11x0_Firmware_Update'" >> $GITHUB_OUTPUT | ||
echo "skip-pattern=(LR11x0_Firmware_Update)" >> $GITHUB_OUTPUT | ||
echo "index-url=--additional-urls https://raw.githubusercontent.com/stm32duino/BoardManagerFiles/main/package_stmicroelectronics_index.json" >> $GITHUB_OUTPUT | ||
- id: stm32duino:STM32F1:mapleMini | ||
run: | | ||
|
@@ -118,6 +119,9 @@ jobs: | |
- id: arduino:renesas_uno:minima | ||
run: | | ||
echo "skip-pattern=(STM32WL|LoRaWAN|LR11x0_Firmware_Update)" >> $GITHUB_OUTPUT | ||
- id: SiliconLabs:silabs:xg24explorerkit | ||
run: | | ||
echo "index-url=--additional-urls https://siliconlabs.github.io/arduino/package_arduinosilabs_index.json" >> $GITHUB_OUTPUT | ||
runs-on: ubuntu-latest | ||
name: ${{ matrix.id }} | ||
|
@@ -176,28 +180,62 @@ jobs: | |
if: ${{ env.run-build == 'true' }} | ||
run: | ||
| | ||
for example in $(find $PWD/examples -name '*.ino' | sort); do | ||
# check whether to skip this sketch | ||
if [ ! -z '${{ steps.prep.outputs.skip-pattern }}' ] && [[ ${example} =~ ${{ steps.prep.outputs.skip-pattern }} ]]; then | ||
# skip sketch | ||
echo -e "\n\033[1;33mSkipped ${example##*/} (matched with ${{ steps.prep.outputs.skip-pattern }})\033[0m"; | ||
else | ||
# apply special flags for LoRaWAN | ||
if [[ ${example} =~ "LoRaWAN" ]]; then | ||
flags="-DRADIOLIB_LORAWAN_DEV_ADDR=0 -DRADIOLIB_LORAWAN_FNWKSINT_KEY=0 -DRADIOLIB_LORAWAN_SNWKSINT_KEY=0 -DRADIOLIB_LORAWAN_NWKSENC_KEY=0 -DRADIOLIB_LORAWAN_APPS_KEY=0 -DRADIOLIB_LORAWAN_APP_KEY=0 -DRADIOLIB_LORAWAN_NWK_KEY=0 -DRADIOLIB_LORAWAN_DEV_EUI=0 -DARDUINO_TTGO_LORA32_V1" | ||
fi | ||
cd $PWD/extras/test/ci | ||
./build_examples.sh ${{ matrix.id }} "${{ steps.prep.outputs.skip-pattern }}" ${{ steps.prep.outputs.options }} | ||
|
||
- name: Parse sizes | ||
if: ${{ env.run-build == 'true' }} | ||
run: | ||
| | ||
cd $PWD/extras/test/ci | ||
./parse_size.sh ${{ matrix.id }} | ||
|
||
- name: Extract short commit hash | ||
id: short-hash | ||
run: echo "::set-output name=short_sha::$(git rev-parse --short HEAD)" | ||
|
||
- name: Upload size report as artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: size-file-${{ steps.split.outputs._0 }}-${{ steps.split.outputs._1 }}-${{ steps.split.outputs._2 }} | ||
path: extras/test/ci/size_${{ steps.short-hash.outputs.short_sha }}_${{ steps.split.outputs._0 }}-${{ steps.split.outputs._1 }}-${{ steps.split.outputs._2 }}.csv | ||
|
||
metrics: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Set up SSH | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "${{ secrets.ACTIONS_METRICS_DEPLOY_KEY }}" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts | ||
# build sketch | ||
echo -e "\n\033[1;33mBuilding ${example##*/} ... \033[0m"; | ||
arduino-cli compile --libraries /home/runner/work/RadioLib --fqbn ${{ matrix.id }}${{ steps.prep.outputs.options }} --build-property compiler.cpp.extra_flags="$flags" $example --warnings=${{ steps.prep.outputs.warnings }} | ||
if [ $? -ne 0 ]; then | ||
echo -e "\033[1;31m${example##*/} build FAILED\033[0m\n"; | ||
exit 1; | ||
else | ||
echo -e "\033[1;32m${example##*/} build PASSED\033[0m\n"; | ||
fi | ||
fi | ||
done | ||
- name: Clone artifact repo | ||
run: | ||
| | ||
cd $PWD/.. | ||
git clone [email protected]:radiolib-org/artifacts.git | ||
cd artifacts | ||
git config --global user.name "${{ github.actor }}" | ||
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | ||
|
||
- name: Download size artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: aggregated-sizes | ||
|
||
- name: Push size files | ||
run: | ||
| | ||
ls -R aggregated-sizes | ||
mkdir -p $PWD/../artifacts/radiolib-ci/l0 | ||
cp aggregated-sizes/*/size_*.csv $PWD/../artifacts/radiolib-ci/l0/. | ||
cd $PWD/../artifacts/radiolib-ci | ||
git add . | ||
COMMIT_URL="https://github.com/jgromes/RadioLib/commit/$GITHUB_SHA" | ||
git commit -m "Push artifacts from $COMMIT_URL" | ||
git push origin main | ||
|
||
esp-build: | ||
runs-on: ubuntu-latest | ||
|
@@ -247,7 +285,7 @@ jobs: | |
run: | | ||
cd $PWD/examples/NonArduino/Tock | ||
git clone https://github.com/tock/libtock-c.git | ||
cd libtock-c; git checkout dbee65a56d74b4bad166317f199e80b959f7c82c; cd ../ | ||
cd libtock-c; git checkout c0202f9ab78da4a6e95f136cf5250701e3778f63; cd ../ | ||
LIBTOCK_C_DIRECTORY="$(pwd)/libtock-c" ./build.sh | ||
rpi-build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: "Release" | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
release: | ||
name: Release RadioLib update | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Checkout latest tag | ||
run: git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install PlatformIO and ESP-IDF | ||
run: | | ||
pip install --upgrade platformio | ||
pip install --upgrade idf-component-manager | ||
- name: PlatformIO publish | ||
env: | ||
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} | ||
run: pio pkg publish --no-interactive | ||
|
||
- name: ESP-IDF publish | ||
env: | ||
IDF_COMPONENT_API_TOKEN: ${{ secrets.IDF_COMPONENT_API_TOKEN }} | ||
run: compote component upload --name RadioLib --namespace jgromes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: "Unit test" | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
unit-test: | ||
name: Build and run unit test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libboost-all-dev libfmt-dev | ||
- name: Run unit test | ||
run: | | ||
cd extras/test/unit | ||
./test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.