-
Adam Wujek authored
Signed-off-by:
Adam Wujek <dev_public@wujek.eu>
dd3919ae
This GitLab CI configuration is valid.
Learn more
.gitlab-ci.yml 3.03 KiB
stages:
- build
- doc
########################################################################################
.job_wrs_build:
stage: build
tags:
- wrs_sw
script:
- apt update && apt upgrade -y && apt install -y git make build-essential m4 gettext bison flex texinfo libncurses-dev libncursesw5-dev bc python unzip wget cpio locales
- locale-gen en_US.UTF-8
# use the user who triggered a job to appear in binaries
- echo "[user]" > ~/.gitconfig
- echo " name = CI ${GITLAB_USER_NAME}" >> ~/.gitconfig
- cd ..
- echo "Remove leftovers from the previous build"
- rm -rf *.tar
- rm -rf *.log
- rm -rf build
- rm -rf images
- rm -rf docs
- cd wr-switch-sw
- git clean -xfd
- cd userspace/ppsi
- git clean -xfd
- git fetch -p; cd ../..; git submodule update;
- make ${wrs_config_file}_release_defconfig
- cd ..
- echo "Using `grep -c ^processor /proc/cpuinfo` parallel jobs"
- MAKEFLAGS="-j `grep -c ^processor /proc/cpuinfo`" wr-switch-sw/build/wrs_build-all > ${CI_PROJECT_DIR}/log_${CI_JOB_ID}.txt
- cp *.tar ${CI_PROJECT_DIR}
artifacts:
name: "wrs_sw_ci_${CI_JOB_ID}"
when: always
paths:
- log_${CI_JOB_ID}.txt
- ./*.tar
- .config
########################################################################################
build_wrs:
extends: .job_wrs_build
variables:
wrs_config_file: "wrs"
########################################################################################
build_wrs_safranlj:
extends: .job_wrs_build
variables:
wrs_config_file: "wrs_safranlj"
when: manual
########################################################################################
########################################################################################
job_build_docs:
stage: doc
image: ubuntu:22.04
when: manual
tags:
- wrs_sw
script:
- apt update
- DEBIAN_FRONTEND=noninteractive TZ=Europe/Zurich apt -y install tzdata
- apt upgrade -y && apt install -y git make locales texinfo texlive-latex-base texlive-latex-extra texlive-extra-utils libreoffice-common libreoffice-draw emacs graphviz
- locale-gen en_US.UTF-8
# use the user who triggered a job to appear in binaries
- echo "[user]" > ~/.gitconfig
- echo " name = CI ${GITLAB_USER_NAME}" >> ~/.gitconfig
- cd ..