-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
* .github\workflows\unittest.yml Added unittest workflow Made scrips executable and renamed travis ci yaml file Use more recent (latest supported rapidassist) version added all boards and combinations to workflow excluded some combinations Added github actions unittest workflow, which tests and uploads to a created relese
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
name: unittest | ||
on: | ||
release: | ||
types: [created, prereleased, published] | ||
workflow_dispatch: null | ||
pull_request: null | ||
jobs: | ||
unittest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: prepare env | ||
run: > | ||
echo "TRAVIS_BUILD_DIR=$PWD" >> $GITHUB_ENV | ||
echo "CMAKE_PREFIX_PATH=$TRAVIS_BUILD_DIR/tests/install" >> | ||
$GITHUB_ENV | ||
echo "GTEST_ROOT=$CMAKE_PREFIX_PATH/googletest" >> $GITHUB_ENV | ||
- name: Checkout submodules | ||
uses: textbook/git-checkout-submodule-action@master | ||
- name: Install tools | ||
run: | | ||
echo "::group::googletest" | ||
export CMAKE_PREFIX_PATH=$TRAVIS_BUILD_DIR/tests/install | ||
cd $GITHUB_WORKSPACE/tests/ci | ||
export GTEST_ROOT=$CMAKE_PREFIX_PATH/googletest | ||
./install_googletest.sh | ||
echo "::endgroup::" | ||
echo "::group::rapidassist" | ||
cd $GITHUB_WORKSPACE/tests/ci | ||
./install_rapidassist.sh | ||
echo "::endgroup::" | ||
echo "::group::win32arduino" | ||
cd $GITHUB_WORKSPACE/tests/ci | ||
./build_win32arduino.sh | ||
echo "::endgroup::" | ||
echo "::group::build signalDecoderTest" | ||
cd $GITHUB_WORKSPACE/tests/ci | ||
./build_signalDecoderTests.sh | ||
cd $GITHUB_WORKSPACE/ | ||
ls -l | ||
echo "::endgroup::" | ||
- name: run test | ||
run: | | ||
cd $GITHUB_WORKSPACE/tests/build | ||
ls -l | ||
./bin/TestProject | ||
deploy: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
BOARD: | ||
- nano328 | ||
- leonardo | ||
#- radino | ||
- minicul | ||
- promini | ||
- ESP32 | ||
RECEIVER: | ||
- cc1101 | ||
- simple | ||
exclude: | ||
- BOARD: radino | ||
RECEIVER: simple | ||
- BOARD: promini | ||
RECEIVER: cc1101 | ||
- BOARD: minicul | ||
RECEIVER: simple | ||
- BOARD: leonardo | ||
RECEIVER: simple | ||
include: | ||
- BOARD: nano328 | ||
RECEIVER: cc1101 | ||
arduino-platform: 'arduino:avr' | ||
fqbn: 'arduino:avr:nano:cpu=atmega328' | ||
compilerflag: '\"-DOTHER_BOARD_WITH_CC1101=1\"' | ||
- BOARD: nano328 | ||
RECEIVER: simple | ||
arduino-platform: 'arduino:avr' | ||
fqbn: 'arduino:avr:nano:cpu=atmega328' | ||
# - BOARD: radino | ||
# arduino-platform: 'arduino:avr In-Circuit:avr' | ||
# fqbn: 'In-Circuit:avr:radinoCC1101' | ||
# boardurl: '--additional-urls=http://library.radino.cc/Arduino_1_8/package_radino_radino32_index.json' | ||
# compilerflag: \"-DARDUINO_AVR_ICT_BOARDS_ICT_BOARDS_AVR_RADINOCC1101=1\" \"-DUSB_VID=0x2341\" \"-DUSB_PID=0x8036\" | ||
- BOARD: leonardo | ||
RECEIVER: cc1101 | ||
arduino-platform: 'arduino:avr' | ||
fqbn: 'arduino:avr:leonardo' | ||
compilerflag: \"-DARDUINO_AVR_ICT_BOARDS_ICT_BOARDS_AVR_RADINOCC1101=1\" | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
HomeAutoUser
Contributor
|
||
- BOARD: minicul | ||
RECEIVER: cc1101 | ||
arduino-platform: 'arduino:avr' | ||
fqbn: 'arduino:avr:pro:cpu=8MHzatmega328' | ||
compilerflag: \"-DARDUINO_ATMEGA328P_MINICUL=1\" | ||
- BOARD: promini | ||
RECEIVER: simple | ||
arduino-platform: 'arduino:avr' | ||
fqbn: 'arduino:avr:pro:cpu=8MHzatmega328' | ||
- BOARD: ESP32 | ||
RECEIVER: cc1101 | ||
arduino-platform: 'esp32:esp32' | ||
fqbn: 'esp32:esp32:esp32:FlashMode=qio,FlashFreq=80' | ||
compilerflag: \"-DOTHER_BOARD_WITH_CC1101=1\" | ||
boardurl: '--additional-urls=https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json' | ||
- BOARD: ESP32 | ||
RECEIVER: simple | ||
arduino-platform: 'esp32:esp32' | ||
fqbn: 'esp32:esp32:esp32:FlashMode=qio,FlashFreq=80' | ||
boardurl: '--additional-urls=https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json' | ||
- BOARD: ESP8266 | ||
RECEIVER: cc1101 | ||
arduino-platform: 'esp8266:esp8266@2.6.3' | ||
fqbn: 'esp8266:esp8266:generic:xtal=80,eesz=1M64,FlashMode=qio,FlashFreq=40,dbg=Serial,lvl=CORE' | ||
compilerflag: \"-DOTHER_BOARD_WITH_CC1101=1\" | ||
boardurl: '--additional-urls=http://arduino.esp8266.com/stable/package_esp8266com_index.json' | ||
- BOARD: ESP8266 | ||
RECEIVER: simple | ||
arduino-platform: 'esp8266:esp8266@2.6.3' | ||
fqbn: 'esp8266:esp8266:generic:xtal=80,eesz=1M64,FlashMode=qio,FlashFreq=40,dbg=Serial,lvl=CORE' | ||
boardurl: '--additional-urls=http://arduino.esp8266.com/stable/package_esp8266com_index.json' | ||
- BOARD: MAPLEMINI_F103CB | ||
RECEIVER: cc1101 | ||
arduino-platform: 'STM32:stm32' | ||
fqbn: 'STM32:stm32:GenF1:pnum=MAPLEMINI_F103CB' | ||
compilerflag: \"-DOTHER_BOARD_WITH_CC1101=1\" | ||
boardurl: '--additional-urls=https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json' | ||
- BOARD: MAPLEMINI_F103CB | ||
RECEIVER: simple | ||
arduino-platform: 'STM32:stm32' | ||
fqbn: 'STM32:stm32:GenF1:pnum=MAPLEMINI_F103CB' | ||
boardurl: '--additional-urls=https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json' | ||
runs-on: ubuntu-latest | ||
steps: | ||
# - name: info | ||
# run: echo ${{ github.event_name }} | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
- name: Checkout submodules | ||
uses: textbook/git-checkout-submodule-action@master | ||
- name: Setup Arduino CLI | ||
uses: arduino/setup-arduino-cli@v1.1.1 | ||
- name: Prepare plattform installation | ||
run: arduino-cli core update-index ${{ matrix.boardurl }} | ||
- name: Install plattform | ||
run: arduino-cli core install ${{ matrix.arduino-platform }} ${{ matrix.boardurl }} | ||
- name: install pyserial | ||
if: ${{ matrix.BOARD == 'ESP32' }} | ||
run: | | ||
pip install pyserial | ||
- name: Compile sketch | ||
id: compile_sketch | ||
run: | | ||
arduino-cli compile --fqbn ${{ matrix.fqbn }} --build-property="compiler.cpp.extra_flags=${{ matrix.compilerflag }}" ${{ matrix.boardurl }} --output-dir=$GITHUB_WORKSPACE $GITHUB_WORKSPACE/src/arduino-ide/SIGNALDuino/SIGNALDuino.ino | ||
echo "::set-output name=fileext::$(test -f $GITHUB_WORKSPACE/SIGNALDuino.ino.bin && echo "bin" || echo "hex")" | ||
# - name: rename firmwarefile | ||
# if: ${{ matrix.BOARD == 'ESP32' }} | ||
# run: | | ||
# mv .bin *.hex | ||
- name: Get release | ||
id: get_release | ||
if: ${{ github.event_name == 'release'}} | ||
uses: bruceadams/get-release@v1.2.2 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
if: ${{ github.event_name == 'release' }} | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./SIGNALDuino.ino.${{ steps.compile_sketch.outputs.fileext }} | ||
asset_name: SIGNALDuino_${{ matrix.BOARD }}${{ matrix.RECEIVER }}_${{ github.event.release.tag_name }}.hex | ||
asset_content_type: application/octet-stream |
@sidey79
dieser Eintrag ist bestimmt die Realisierung für den Radino. War das mit dem Leonardo nur ein Test und die auskommentierten RadinoOptionen kommen noch hinzu?
Das jetzige Leonardo Vorgehen entspricht dem wie in der PlatformIO Oberfläche. Dem spricht nichts dagegen vom Prinzip. Wir sollten vielleicht nur die gleichen Parameter (BOARD, CPU Geschwindigkeit) nutzen.
Ich würde es für günstiger halten, wenn wir hier https://github.com/RFD-FHEM/SIGNALDuino/releases/tag/3.5.0-dev%2B20201207 dann die
SIGNALDuino_leonardocc1101_3.5.0-dev+20201207.hex
inSIGNALDuino_radinocc1101_3.5.0-dev+20201207.hex
umbenennen oder diese zusätzlich in die Assets-Liste hinzufügen. Somit vermeiden wir Fragen, "Wieso fehlt für den Radino das HEX - File?" Das sollte ja kein Problem in deinem Script sein, oder?