Skip to content

Latest commit

 

History

History
130 lines (77 loc) · 4.16 KB

setup.md

File metadata and controls

130 lines (77 loc) · 4.16 KB

setup & install

What will you need?

  • find an unused machine

  • make it reachable by ssh

  • proceed to install

install

  1. Install requirements

    $ pip install requirements.txt

  2. Change RYOT_CI_SERVER in fabfile.py and in ci-boards.mk.pre

  3. Add Authorized keys to authorized_keys, create the file if it doesn't exist.

  4. Setup machine

    $ fab setup

  5. Plug, configure and qualify as many boards as you want, follow README.md

  6. Loop over 4 & 5 as needed

Run tests, OFTEN!

Usage

  • connect to the ci:

    $ ssh $(RYOT_CI_SERVER)

  • run tests:

    $ /builds/scripts/ci_test_all.py /builds/tmp/RIOT

  • compile locally and flash/term/test on board connected to CI:

    $ RYOT_CI=1 BOARD= make -C examples/hello-world flash term

  • flash/test in docker (note):

Custom targets have been added to perform everything in a docker container #12419. Most targets should be available by prefixing the desired target with docker/, eg:

$ BOARD=<ci-connected-board> make -C examples/hello-world docker/flash docker/term

note: this is still experimental, support is not integrated into RIOT master branch, and there is no official riot image yet.

Project structure

template

  • boards: fake target to call make.

  • conf: configurations files to load pre and post RIOT makefiles.

  • [authorized_keys]: list of public authorized ssh keys

  • [known_hosts]: list of known host, avoid accepting ssh key first time fab setup is called.

  • [70-riotbooards.rules]: custom udev rules for boards connected to ci. Follow boards-udev to add new ones.

local

  • ci-boards.mk.pre: configuration to override flash and term so its done over ci.

  • makefiles.pre: configuration to use LOCAL_BOARDS custom udev rules to dry PORT and DEBUG_ADAPTER_ID

scripts

  • ci_test_all.pyt: script to lunch tests on all board connected to the ci or on a subset of them.

boards-udev

  • use udevadm info /dev/ttyACM0 to query the udev database for information on device on port /deb/ttyACM0.

    can also use udevadm info --attribute-walk --name /dev/ttyACM0 for more detailed output when first level o

  • create a udev rule with information of the device and one parent to create a matching rule in 70-riotboards.rules.

  • (*) udevrules can only match attributes from the device itself and a single parent. If more parents info is required then

  • reload rules: udevadm control --reload-rules

  • Boards PORT are symlinked to /dev/riot/tty-[board-name] if convention in 70-riotboards.rules is respected.

    (*) Only one board of each type is supported for the moment

trouble-shooting

self hosted github runners

You can setup your own runners to run compile_and_test_for_board.py in a GitHub Actions Workflow.

setup

  1. add a self hosted-runner
  2. optional: Repeat 1 if parallel builds are desired (e.g.: on a machine with 8 cores you might want to configure 8 runners)
  3. optional: Configure each individual runners as a service
  4. Adapt the following template to your own RIOT fork .github/workflows
  5. Adapt max-parallel and on.