Skip to content

Build applications #214

Build applications

Build applications #214

Workflow file for this run

name: Build applications
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
schedule:
- cron: '52 1 * * 2'
jobs:
build:
runs-on: ubuntu-22.04
strategy:
max-parallel: 7
fail-fast: false
matrix:
board:
- iotlab-m3
- nrf52840dk
- esp32-wroom-32
app:
- 05-06-evaluation/apps/requester
- 05-06-evaluation/apps/proxy
- 05-06-evaluation/RIOT/examples/gnrc_border_router
coap_cache: [0, 1]
dns_transport: [coap, coaps, dtls, oscore, udp]
dns_cache: [0, 1]
doh_like: [0, 1]
include:
- board: esp32-wroom-32
app: 05-06-evaluation/quant/riot
coap_cache: 0
dns_transport: udp
dns_cache: 0
doh_like: 0
exclude:
- app: 05-06-evaluation/RIOT/examples/gnrc_border_router
dns_transport: coap
- app: 05-06-evaluation/RIOT/examples/gnrc_border_router
dns_transport: coaps
- app: 05-06-evaluation/RIOT/examples/gnrc_border_router
dns_transport: dtls
- app: 05-06-evaluation/RIOT/examples/gnrc_border_router
dns_transport: oscore
- app: 05-06-evaluation/RIOT/examples/gnrc_border_router
board: esp32-wroom-32
- app: 05-06-evaluation/apps/proxy
dns_transport: coaps
- app: 05-06-evaluation/apps/proxy
dns_transport: dtls
- app: 05-06-evaluation/apps/proxy
dns_transport: oscore
- app: 05-06-evaluation/apps/proxy
- app: 05-06-evaluation/apps/proxy
coap_cache: 1
- app: 05-06-evaluation/apps/proxy
dns_cache: 1
- app: 05-06-evaluation/apps/proxy
doh_like: 1
- app: 05-06-evaluation/apps/proxy
board: esp32-wroom-32
- dns_transport: coaps
coap_cache: 1
- dns_transport: coaps
dns_cache: 1
- dns_transport: coaps
doh_like: 1
- dns_transport: dtls
coap_cache: 1
- dns_transport: dtls
dns_cache: 1
- dns_transport: dtls
doh_like: 1
- dns_transport: oscore
coap_cache: 1
- dns_transport: oscore
dns_cache: 1
- dns_transport: oscore
doh_like: 1
- dns_transport: udp
coap_cache: 1
- dns_transport: udp
dns_cache: 1
- dns_transport: udp
doh_like: 1
- board: esp32-wroom-32
coap_cache: 1
- board: esp32-wroom-32
dns_cache: 1
- board: esp32-wroom-32
doh_like: 1
steps:
- uses: actions/checkout@main
with:
submodules: true
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Expose some matrix configuration to environment
run: |
app_name="$(basename ${{ matrix.app }})"
echo "app_name=${app_name}" >> ${GITHUB_ENV}
echo "BOARD=${{ matrix.board }}" >> ${GITHUB_ENV}
echo "DNS_TRANSPORT=${{ matrix.dns_transport }}" >> ${GITHUB_ENV}
echo "DOH_LIKE=${{ matrix.doh_like }}" >> ${GITHUB_ENV}
echo "WITH_COAP_CACHE=${{ matrix.coap_cache }}" >> ${GITHUB_ENV}
echo "WITH_DNS_CACHE=${{ matrix.dns_cache }}" >> ${GITHUB_ENV}
- uses: actions/cache@main
id: cache-arm-toolchain
if: matrix.board != 'esp32-wroom-32'
with:
path: opt
key: ${{ runner.os }}-arm-toolchain-10.3-2021.07
- uses: actions/cache@main
id: cache-esp-toolchain
if: matrix.board == 'esp32-wroom-32'
with:
path: opt
key: ${{ runner.os }}-esp-toolchain-2021r2-patch3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential make
- name: Install ARM toolchain
if: steps.cache-arm-toolchain.outputs.cache-hit != 'true' && matrix.board != 'esp32-wroom-32'
# adopted from https://github.com/RIOT-OS/riotdocker/blob/d4e7ed0/riotbuild/Dockerfile#L113
run: >
mkdir -p opt &&
curl -sL -o opt/gcc-arm-none-eabi.tar.bz2 https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.07/gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2 &&
echo "b56ae639d9183c340f065ae114a30202 opt/gcc-arm-none-eabi.tar.bz2" | md5sum -c &&
tar -C opt -jxf opt/gcc-arm-none-eabi.tar.bz2
&& ls opt
- name: Install ESP32 toolchain
if: steps.cache-esp-toolchain.outputs.cache-hit != 'true' && matrix.board == 'esp32-wroom-32'
# adopted from https://github.com/RIOT-OS/riotdocker/blob/fef9374/riotbuild/Dockerfile#L206
run: >
mkdir -p opt &&
curl -sL -o opt/gcc-xtensa-esp32-elf.tar.gz https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch3/xtensa-esp32-elf-gcc8_4_0-esp-2021r2-patch3-linux-amd64.tar.gz &&
echo "5c4386fcbbfa3f483555827c414396f1 opt/gcc-xtensa-esp32-elf.tar.gz" | md5sum -c &&
tar -C opt -zxf opt/gcc-xtensa-esp32-elf.tar.gz &&
pip install pyserial
&& ls opt
- name: Prepare QUANT app
if: matrix.app == '05-06-evaluation/quant/riot'
run: |
QUANT_PATCHES=$(readlink -f "05-06-evaluation/quant-patches/"*.patch)
PICOTLS_PATCHES=$(readlink -f "05-06-evaluation/quant-patches/picotls/"*.patch)
WARPCORE_PATCHES=$(readlink -f "05-06-evaluation/quant-patches/warpcore/"*.patch)
git config --global user.name "Github Action"
git config --global user.email "github-action@users.noreply.github.com"
git -C "05-06-evaluation/quant" submodule update --init --recursive
git -C "05-06-evaluation/quant" am ${QUANT_PATCHES}
git -C "05-06-evaluation/quant/lib/deps/picotls" am ${PICOTLS_PATCHES}
git -C "05-06-evaluation/quant/lib/deps/warpcore" am ${WARPCORE_PATCHES}
sudo apt-get install libssl-dev libhttp-parser-dev libbsd-dev pkgconf g++
mkdir -p "05-06-evaluation/quant/Debug"
(cd "05-06-evaluation/quant/Debug"; cmake ..)
echo "WERROR=0" >> ${GITHUB_ENV}
echo "RIOTBASE=$(readlink -f '05-06-evaluation/RIOT')" >> ${GITHUB_ENV}
echo "CFLAGS=-DPTHREAD_MUTEX_INITIALIZER=MUTEX_INIT" >> ${GITHUB_ENV}
- name: Build application
run: >
PATH="${PATH}:${GITHUB_WORKSPACE}/opt/gcc-arm-none-eabi-10.3-2021.07/bin:${GITHUB_WORKSPACE}/opt/xtensa-esp32-elf/bin"
make -C "${{ matrix.app }}" -j
- uses: actions/upload-artifact@main
name: Archive ELF files
with:
name: ${{ env.app_name }}-${{ matrix.dns_transport }}-cc${{ env.WITH_COAP_CACHE }}-dc${{ env.WITH_DNS_CACHE }}-doh${{ env.DOH_LIKE }}-${{ matrix.board }}
path: ${{ matrix.app }}/bin/${{ matrix.board }}/*.elf
retention-days: 15