fiatlux/.build.yml

95 lines
2.5 KiB
YAML

kind: pipeline
type: docker
name: default
image:
tasks:
-
steps:
- name: submodules
image: alpine/git
commands:
- git submodule update --init --recursive
- name: patch
image: alpine/git
depends_on: [ submodules ]
commands:
- |-
sed -i 's/GNU bash, version (3\\\.\[1-9\]|4)/GNU bash, version (3.[1-9]|4|5)/g' modules/sdk/crosstool-NG/configure.ac
- mkdir -p modules/sdk/crosstool-NG/.build/tarballs
- wget https://github.com/libexpat/libexpat/releases/download/R_2_1_0/expat-2.1.0.tar.gz -O modules/sdk/crosstool-NG/.build/tarballs/expat-2.1.0.tar.gz
- name: toolchain
image: debian:sid
depends_on: [ patch ]
commands:
- apt update
- apt install -y make bash gawk g++ gcc libc6-dev flex bison automake autoconf gperf texinfo wget git bzip2 help2man libtool libtool-bin unrar-free unzip ncurses-dev libexpat-dev python-dev python3
- cd modules/sdk
- export CT_EXPERIMENTAL=y
- export CT_ALLOW_BUILD_AS_ROOT=y
- export CT_ALLOW_BUILD_AS_ROOT_SURE=y
- make standalone=y -j$(nproc)
- wget -N https://raw.githubusercontent.com/espressif/esptool/master/esptool.py -O xtensa-lx106-elf/bin/esptool.py
- name: firmware
image: docker-repo.service.intern.lab.or.it:5000/fiatlux-build-env
depends_on: [ submodules ]
commands:
- export PATH=$(pwd)/modules/sdk/xtensa-lx106-elf/bin:$PATH
- make firmware -j$(nproc)
- name: pcb
image: setsoft/kicad_auto
commands:
- apt update
- apt install -y make zip
- cd pcb
- kibot -d gen -c fiatlux.kiplot.yaml -s update_xml,run_drc -i
- kibot -d gen -c fiatlux.kiplot.yaml -s update_xml,run_erc -i
- kibot -d gen -c fiatlux.kiplot.yaml -s run_drc,run_erc print_sch
- kibot -d gen -c fiatlux.kiplot.yaml -s all print_front gerbers
- ls -lA
- cd -
- make pcb -j$(nproc)
- name: case
image: debian:sid
commands:
- apt update
- apt install -y make
- make case -j$(nproc)
- name: unittest
image: debian:sid
depends_on: [ firmware ]
commands:
- apt update
- apt install -y make
- make -C firmware unittest
- name: systest
image: debian:sid
depends_on: [ firmware ]
commands:
- apt update
- apt install -y make
- make -C firmware systest
- name: gitea_release
image: plugins/gitea-release
depends_on: [ firmware, pcb, case, unittest, systest ]
settings:
api_key:
from_secret: j3d1_droneio_key
base_url: https://git.neulandlabor.de/
files:
- firmware/firmware/fiatlux.bin
checksum:
- sha512
- md5
title: buildtest
when:
event: tag