heads/.circleci/config.yml
tlaurion b2c49e8742
CircleCI: removing librem_mini board under CircleCI (#825)
Coreboot 4.12, on which the librem_mini depends, doesn't build under debian:10 docker image as of right now.
	It was building over debian:bullseye (where 4.8.1 boards didn't) which constructed a valid cache that
	was reused when building #806 (https://app.circleci.com/pipelines/github/tlaurion/heads/364/workflows/df9bad8d-8ff1-40da-b8d8-1b87a05be509/jobs/392)
Consequently, more troubleshooting would need to be done under local debian:10 docker image.
2020-09-03 22:02:16 -04:00

190 lines
6.6 KiB
YAML

version: 2
jobs:
build:
docker:
- image: debian:10
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
- 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 ./patches/musl-cross-* 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- \
# --load 2 \
# V=1 \
# BOARD=qemu-linuxboot \
#
# - store-artifacts:
# path: build/qemu-linuxboot/linuxboot.rom
# - store-artifacts:
# path: build/qemu-linuxboot/hashes.txt
- run:
name: x230-flash
#We delete build/make-4.2.1/ directory until issue #799 is fixed.
command: |
rm -rf build/x230-flash/* build/log/* && make --load 2 \
V=1 \
BOARD=x230-flash || (find ./build/log/ -cmin 1|xargs tail; 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 --load 2 \
V=1 \
BOARD=t430-flash || (find ./build/log/ -cmin 1|xargs tail; 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 --load 2 \
V=1 \
BOARD=t430 || (find ./build/log/ -cmin 1|xargs tail; 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 --load 2 \
V=1 \
BOARD=x230 || (find ./build/log/ -cmin 1|xargs tail; 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 --load 2 \
V=1 \
BOARD=x230-hotp-verification || (find ./build/log/ -cmin 1|xargs tail; 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: qemu-coreboot
command: |
rm -rf build/qemu-coreboot/* build/log/* && make --load 2 \
V=1 \
BOARD=qemu-coreboot || (find ./build/log/ -cmin 1|xargs tail; 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
workflows:
version: 2
build_and_test:
jobs:
- build