heads/.circleci/config.yml

245 lines
9.2 KiB
YAML
Raw Normal View History

2018-09-15 09:42:42 +00:00
version: 2
jobs:
build:
docker:
- image: debian:10
2018-09-15 09:42:42 +00:00
steps:
- run:
name: Install dependencies
command: |
apt update
apt install -y build-essential zlib1g-dev uuid-dev libdigest-sha-perl libelf-dev bc bzip2 bison flex git gnupg iasl m4 nasm patch python wget gnat cpio ccache pkg-config cmake libusb-1.0-0-dev autoconf texinfo ncurses-dev doxygen graphviz udev libudev1 libudev-dev automake libtool rsync
2018-09-15 10:56:42 +00:00
- checkout
- run:
name: git reset
command: |
git reset --hard "$CIRCLE_SHA1" \
- run:
name: Creating all modules and patches digest
command: |
find ./patches/ ./modules/ -type f | sort -h |xargs sha256sum > /tmp/all_modules_and_patches.sha256sums \
- run:
name: Creating musl-cross-make and musl-cross-make patches digest
command: |
find modules/musl-cross* -type f | sort -h | xargs sha256sum > /tmp/musl-cross_module_and_patches.sha256sums \
- restore_cache:
keys:
#Restore existing cache for modules checksums validated to be exactly the same as in github current commit
- heads-modules-and-patches-{{ checksum "/tmp/all_modules_and_patches.sha256sums" }}{{ .Environment.CACHE_VERSION }}
#If precedent fails. Restore cache for musl-cross module checksum validated to be exactly the same as in github current commit
- heads-cross-musl-{{ checksum "/tmp/musl-cross_module_and_patches.sha256sums" }}{{ .Environment.CACHE_VERSION }}
# linuxboot steps need something to pass in the kernel header path
# skipping for now
# - run:
# name: qemu-linuxboot-edk2
# command: |
# ./build/make-4.2.1/make \
# CROSS=/cross/bin/x86_64-linux-musl- \
# BOARD=qemu-linuxboot \
# `/bin/pwd`/build/linuxboot-git/build/qemu/.configured \
# # Run first to avoid too many processes
#
# - run:
# name: qemu-linuxboot
# command: |
# ./build/make-4.2.1/make \
# CROSS=/cross/bin/x86_64-linux-musl- \
# CPUS=4 \
# V=1 \
# BOARD=qemu-linuxboot \
#
# - store-artifacts:
# path: build/qemu-linuxboot/linuxboot.rom
# - store-artifacts:
# path: build/qemu-linuxboot/hashes.txt
Add new board: Purism Librem Server L1UM (#858) * modules/coreboot: add option to use coreboot 4.11 Port patches from coreboot 4.8.1 to 4.11: * 0000-measure-boot -> 0001 * 0010-cross-compiler-support All other patches for coreboot 4.8.1 have either already been integrated, or are for platforms which do not need to be migrated to coreboot 4.11 (they will move to 4.12 or newer). Signed-off-by: Matt DeVillier <matt.devillier@puri.sm> * patches/coreboot-4.11: Add Broadwell-DE platform patch Add a patch for FSP Broadwell-DE to make use of Heads' measured boot. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm> * patches/coreboot-4.11: Add patch to read serial # from CBFS Will be used by multiple Librem boards. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm> * patches/coreboot-4.11: add board support for Librem Server L1UM Signed-off-by: Matt DeVillier <matt.devillier@puri.sm> * Librem Server L1UM: add new board Add board config, coreboot config, kernel config files. Add conditional purism-blobs dependency to coreboot-4.11 module. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm> * flash.sh: add special handling for librem_l1um board Add support for persisting PCIe config via PCHSTRP9 in flash descriptor. This is needed to support multiple variants of the L1UM server which use the same firmware but differ in PCIe lane configuration via the PCH straps configuration in the flash descriptor. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm> * patches/coreboot-4.11: Add 'Use PRIxPTR to print uintptr_t' patch Cherry-picked from upstream coreboot (post-4.11), fixes compilation issue. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm> * CircleCI: add target to build board librem_l1um Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
2020-10-18 18:48:25 +00:00
- run:
name: librem_l1um
command: |
rm -rf build/librem_l1um/* build/log/* && make CPUS=4 \
V=1 \
BOARD=librem_l1um || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput librem_l1um hashes
command: |
cat build/librem_l1um/hashes.txt \
- run:
name: Archiving build logs for librem_l1um
command: |
tar zcvf build/librem_l1um/logs.tar.gz build/log/*
- store-artifacts:
path: build/librem_l1um
- run:
name: librem_mini
command: |
rm -rf build/librem_mini/* build/log/* && make CPUS=4 \
V=1 \
BOARD=librem_mini || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput librem_mini hashes
command: |
cat build/librem_mini/hashes.txt \
- run:
name: Archiving build logs for librem_mini
command: |
tar zcvf build/librem_mini/logs.tar.gz build/log/*
- store-artifacts:
path: build/librem_mini
- run:
name: x230-flash
2020-08-12 19:07:54 +00:00
#We delete build/make-4.2.1/ directory until issue #799 is fixed.
command: |
rm -rf build/x230-flash/* build/log/* && make CPUS=4 \
V=1 \
BOARD=x230-flash || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput x230-flash hashes
command: |
cat build/x230-flash/hashes.txt \
- run:
name: Archiving build logs for x230-flash
command: |
tar zcvf build/x230-flash/logs.tar.gz build/log/*
- store-artifacts:
path: build/x230-flash
- run:
name: t430-flash
command: |
rm -rf build/t430-flash/* build/log/* && make CPUS=4 \
V=1 \
BOARD=t430-flash || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput t430-flash hashes
command: |
cat build/t430-flash/hashes.txt \
- run:
name: Archiving build logs for t430-flash
command: |
tar zcvf build/t430-flash/logs.tar.gz build/log/*
- store-artifacts:
path: build/t430-flash
- run:
name: t430
command: |
rm -rf build/t430/* build/log/* && make CPUS=4 \
V=1 \
BOARD=t430 || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput t430 hashes
command: |
cat build/t430/hashes.txt \
- run:
name: Archiving build logs for t430
command: |
tar zcvf build/t430/logs.tar.gz build/log/*
- store-artifacts:
path: build/t430
- run:
name: x230
command: |
rm -rf build/x230/* build/log/* && make CPUS=4 \
V=1 \
BOARD=x230 || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput x230 hashes
command: |
cat build/x230/hashes.txt \
- run:
name: Archiving build logs for x230
command: |
tar zcvf build/x230/logs.tar.gz build/log/*
- store-artifacts:
path: build/x230
- run:
name: x230-hotp-verification
command: |
rm -rf build/x230-hotp-verification/* build/log/* && make CPUS=4 \
V=1 \
BOARD=x230-hotp-verification || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput x230-hotp-verification hashes
command: |
cat build/x230-hotp-verification/hashes.txt \
- run:
name: Archiving build logs for x230-hotp-verification
command: |
tar zcvf build/x230-hotp-verification/logs.tar.gz build/log/*
- store-artifacts:
path: build/x230-hotp-verification
- run:
name: x230-nkstorecli
command: |
rm -rf build/x230-nkstorecli/* build/log/* && make CPUS=4 \
V=1 \
BOARD=x230-nkstorecli || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput x230-nkstorecli hashes
command: |
cat build/x230-nkstorecli/hashes.txt \
- run:
name: Archiving build logs for x230-nkstorecli
command: |
tar zcvf build/x230-nkstorecli/logs.tar.gz build/log/*
- store-artifacts:
path: build/x230-nkstorecli
- run:
name: qemu-coreboot
command: |
rm -rf build/qemu-coreboot/* build/log/* && make CPUS=4 \
V=1 \
BOARD=qemu-coreboot || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Output qemu-coreboot hashes
command: |
cat build/qemu-coreboot/hashes.txt \
- run:
name: Archiving build logs for qemu-coreboot
command: |
tar zcvf build/qemu-coreboot/logs.tar.gz build/log/*
- store-artifacts:
path: build/qemu-coreboot
- save_cache:
#Generate cache for the same musl-cross module definition if hash is not previously existing
key: heads-cross-musl-{{ checksum "/tmp/musl-cross_module_and_patches.sha256sums" }}{{ .Environment.CACHE_VERSION }}
paths:
- crossgcc
- build/musl-cross-*
- save_cache:
#Generate cache for the exact same modules definitions if hash is not previously existing
key: heads-modules-and-patches-{{ checksum "/tmp/all_modules_and_patches.sha256sums" }}{{ .Environment.CACHE_VERSION }}
paths:
- packages
- crossgcc
- build
2018-09-15 09:42:42 +00:00
workflows:
version: 2
build_and_test:
jobs:
- build