Readd https://github.com/osresearch/heads/pull/984 without cache
Add kgpe-d16 musl-cross target prior of having kgpe-d16 depend on musl-cross target (To try to have musl-cross step successfull under 1h CircleCI new limit)
CircleCI: add a subcommand that can follow a target (to build musl-cross-make now and coreboot version specific musl-cross later)
Output of hashes is now optional
29/11/2021 CircleCI public information available states parallelization of up to 30 jobs at a time. Let's play
- We first build heads musl-cross-make and persist (passing musl-cross-make into next job)
- We then build per coreboot version board with coreboot make statement only and persist (passing musl-cross-make + coreboot's musl-cross buildstack)
- We then build per coreboot version board (reusing past build musl-cross-make and coreboot's version musl-cross buildstack)
Remove 4.11 boards for the moment to test only build time and parallelization
This commit is contained in:
Thierry Laurion 2021-11-25 10:38:15 -05:00 committed by tlaurion
parent 22f2288331
commit ee5073ebe8
3 changed files with 97 additions and 38 deletions

View File

@ -5,6 +5,8 @@ commands:
parameters: parameters:
target: target:
type: string type: string
subcommand:
type: string
steps: steps:
- run: - run:
name: Install dependencies name: Install dependencies
@ -14,7 +16,7 @@ commands:
- run: - run:
name: Make Board name: Make Board
command: | command: |
rm -rf build/<<parameters.target>>/* build/log/* && make CPUS=16 V=1 BOARD=<<parameters.target>> || touch ./tmpDir/failed_build rm -rf build/<<parameters.target>>/* build/log/* && make CPUS=32 V=1 BOARD=<<parameters.target>> <<parameters.subcommand>> || touch ./tmpDir/failed_build
no_output_timeout: 3h no_output_timeout: 3h
- run: - run:
name: Output build failing logs name: Output build failing logs
@ -23,7 +25,7 @@ commands:
- run: - run:
name: Output hashes name: Output hashes
command: | command: |
cat build/<<parameters.target>>/hashes.txt \ cat build/<<parameters.target>>/hashes.txt || echo "No hashes for this build step..."\
- run: - run:
name: Archiving build logs. name: Archiving build logs.
command: | command: |
@ -35,6 +37,7 @@ jobs:
prep_env: prep_env:
docker: docker:
- image: debian:10 - image: debian:10
resource_class: large
steps: steps:
- run: - run:
name: Install dependencies name: Install dependencies
@ -98,14 +101,18 @@ jobs:
build_and_persist: build_and_persist:
docker: docker:
- image: debian:10 - image: debian:10
resource_class: large
parameters: parameters:
target: target:
type: string type: string
subcommand:
type: string
steps: steps:
- attach_workspace: - attach_workspace:
at: ~/ at: ~/
- build_board: - build_board:
target: <<parameters.target>> target: <<parameters.target>>
subcommand: <<parameters.subcommand>>
- persist_to_workspace: - persist_to_workspace:
root: ~/ root: ~/
paths: paths:
@ -117,11 +124,14 @@ jobs:
parameters: parameters:
target: target:
type: string type: string
subcommand:
type: string
steps: steps:
- attach_workspace: - attach_workspace:
at: ~/ at: ~/
- build_board: - build_board:
target: <<parameters.target>> target: <<parameters.target>>
subcommand: <<parameters.subcommand>>
save_cache: save_cache:
docker: docker:
@ -131,17 +141,22 @@ jobs:
at: ~/ at: ~/
- save_cache: - save_cache:
#Generate cache for the same musl-cross module definition if hash is not previously existing #Generate cache for the same musl-cross module definition if hash is not previously existing
#CircleCI removed their wildcard support, so we have to list precise versions to cache in directory names
key: heads-musl-cross-{{ checksum "./tmpDir/musl-cross.sha256sums" }}{{ .Environment.CACHE_VERSION }} key: heads-musl-cross-{{ checksum "./tmpDir/musl-cross.sha256sums" }}{{ .Environment.CACHE_VERSION }}
paths: paths:
- crossgcc - crossgcc
- build/musl-cross-* - build/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1
- save_cache: - save_cache:
#Generate cache for the same coreboot mnd musl-cross-make modules definition if hash is not previously existing #Generate cache for the same coreboot mnd musl-cross-make modules definition if hash is not previously existing
#CircleCI removed their wildcard support, so we have to list precise versions to cache in directory names
key: heads-coreboot-musl-cross-{{ checksum "./tmpDir/coreboot_musl-cross.sha256sums" }}{{ .Environment.CACHE_VERSION }} key: heads-coreboot-musl-cross-{{ checksum "./tmpDir/coreboot_musl-cross.sha256sums" }}{{ .Environment.CACHE_VERSION }}
paths: paths:
- build/coreboot-* - build/coreboot-4.11
- build/coreboot-4.13
- build/coreboot-4.14
- build/coreboot-4.15
- crossgcc - crossgcc
- build/musl-cross-* - build/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1
- save_cache: - save_cache:
#Generate cache for the exact same modules definitions if hash is not previously existing #Generate cache for the exact same modules definitions if hash is not previously existing
key: heads-modules-and-patches-{{ checksum "./tmpDir/all_modules_and_patches.sha256sums" }}{{ .Environment.CACHE_VERSION }} key: heads-modules-and-patches-{{ checksum "./tmpDir/all_modules_and_patches.sha256sums" }}{{ .Environment.CACHE_VERSION }}
@ -161,20 +176,44 @@ workflows:
# version. The last board in the sequence is the dependency # version. The last board in the sequence is the dependency
# for the parallel boards built at the end, and also save_cache. # for the parallel boards built at the end, and also save_cache.
# Coreboot 4.11 # Prerequisites
- build_and_persist: - build_and_persist:
name: kgpe-d16_workstation name: heads_musl-cross
target: kgpe-d16_workstation target: x230-hotp-maximized
subcommand: musl-cross
requires: requires:
- prep_env - prep_env
# Coreboot 4.11
#- build_and_persist:
# name: coreboot_411_buildstack
# target: kgpe-d16_workstation
# subcommand: coreboot
# requires:
# - heads_musl-cross
# Coreboot 4.11
#- build_and_persist:
# name: kgpe-d16_workstation
# target: kgpe-d16_workstation
# subcommand: coreboot
# requires:
# - coreboot_411_buildstack
# Coreboot 4.13
- build_and_persist:
name: coreboot_413_buildstack
target: x230-hotp-maximized
subcommand: coreboot
requires:
- heads_musl-cross
# Coreboot 4.13 # Coreboot 4.13
- build_and_persist: - build_and_persist:
name: x230-hotp-maximized name: x230-hotp-maximized
target: x230-hotp-maximized target: x230-hotp-maximized
subcommand: ""
requires: requires:
- kgpe-d16_workstation - coreboot_413_buildstack
- save_cache: - save_cache:
requires: requires:
@ -189,110 +228,128 @@ workflows:
- build: - build:
name: x220-hotp-maximized name: x220-hotp-maximized
target: x220-hotp-maximized target: x220-hotp-maximized
subcommand: ""
requires: requires:
- x230-hotp-maximized - x230-hotp-maximized
- build: - build:
name: x220-maximized name: x220-maximized
target: x220-maximized target: x220-maximized
subcommand: ""
requires: requires:
- x230-hotp-maximized - x230-hotp-maximized
- build: - build:
name: t420-hotp-maximized name: t420-hotp-maximized
target: t420-hotp-maximized target: t420-hotp-maximized
subcommand: ""
requires: requires:
- x230-hotp-maximized - x230-hotp-maximized
- build: - build:
name: t420-maximized name: t420-maximized
target: t420-maximized target: t420-maximized
subcommand: ""
requires: requires:
- x230-hotp-maximized - x230-hotp-maximized
- build: - build:
name: x230-flash name: x230-flash
target: x230-flash target: x230-flash
subcommand: ""
requires: requires:
- x230-hotp-maximized - x230-hotp-maximized
- build: - build:
name: t430-flash name: t430-flash
target: t430-flash target: t430-flash
subcommand: ""
requires: requires:
- x230-hotp-maximized - x230-hotp-maximized
- build: - build:
name: t430 name: t430
target: t430 target: t430
subcommand: ""
requires: requires:
- x230-hotp-maximized - x230-hotp-maximized
- build: - build:
name: t430-hotp-verification name: t430-hotp-verification
target: t430-hotp-verification target: t430-hotp-verification
subcommand: ""
requires: requires:
- x230-hotp-maximized - x230-hotp-maximized
- build: - build:
name: x230 name: x230
target: x230 target: x230
subcommand: ""
requires: requires:
- x230-hotp-maximized - x230-hotp-maximized
- build: - build:
name: x230-hotp-verification name: x230-hotp-verification
target: x230-hotp-verification target: x230-hotp-verification
subcommand: ""
requires: requires:
- x230-hotp-maximized - x230-hotp-maximized
- build: - build:
name: t430-hotp-maximized name: t430-hotp-maximized
target: t430-hotp-maximized target: t430-hotp-maximized
subcommand: ""
requires: requires:
- x230-hotp-maximized - x230-hotp-maximized
- build: - build:
name: t430-maximized name: t430-maximized
target: t430-maximized target: t430-maximized
subcommand: ""
requires: requires:
- x230-hotp-maximized - x230-hotp-maximized
- build: - build:
name: qemu-coreboot name: qemu-coreboot
target: qemu-coreboot target: qemu-coreboot
subcommand: ""
requires: requires:
- x230-hotp-maximized - x230-hotp-maximized
- build: - build:
name: qemu-coreboot-fbwhiptail name: qemu-coreboot-fbwhiptail
target: qemu-coreboot-fbwhiptail target: qemu-coreboot-fbwhiptail
subcommand: ""
requires: requires:
- x230-hotp-maximized - x230-hotp-maximized
- build: #- build:
name: kgpe-d16_workstation-usb_keyboard #name: kgpe-d16_workstation-usb_keyboard
target: kgpe-d16_workstation-usb_keyboard #target: kgpe-d16_workstation-usb_keyboard
requires: #subcommand: ""
- x230-hotp-maximized #requires:
#- x230-hotp-maximized
- build: #- build:
name: kgpe-d16_server #name: kgpe-d16_server
target: kgpe-d16_server #target: kgpe-d16_server
requires: #subcommand: ""
- x230-hotp-maximized #requires:
#- x230-hotp-maximized
- build: #- build:
name: kgpe-d16_server-whiptail #name: kgpe-d16_server-whiptail
target: kgpe-d16_server-whiptail #target: kgpe-d16_server-whiptail
requires: #subcommand: ""
- x230-hotp-maximized #requires:
#- x230-hotp-maximized
- build: #- build:
name: librem_l1um #name: librem_l1um
target: librem_l1um #target: librem_l1um
requires: #subcommand: ""
- x230-hotp-maximized #requires:
#- x230-hotp-maximized
######################## ########################
######################## ########################

View File

@ -530,7 +530,7 @@ endif
$(COREBOOT_UTIL_DIR)/cbmem/cbmem \ $(COREBOOT_UTIL_DIR)/cbmem/cbmem \
$(COREBOOT_UTIL_DIR)/superiotool/superiotool \ $(COREBOOT_UTIL_DIR)/superiotool/superiotool \
$(COREBOOT_UTIL_DIR)/inteltool/inteltool \ $(COREBOOT_UTIL_DIR)/inteltool/inteltool \
: $(build)/$(coreboot_base_dir)/.canary : $(build)/$(coreboot_base_dir)/.canary musl-cross
+$(call do,MAKE,$(notdir $@),\ +$(call do,MAKE,$(notdir $@),\
$(MAKE) -C "$(dir $@)" $(CROSS_TOOLS) \ $(MAKE) -C "$(dir $@)" $(CROSS_TOOLS) \
) )

View File

@ -31,13 +31,15 @@ musl-cross_libraries := \
else else
# Force a full build of the cross compiler # Force a full build of the cross compiler for x86_64
# have to build both x86_64 and i386 versions for coreboot # (do not build i386 since coreboot uses its own compiler)
musl-cross_configure := \ musl-cross_configure := \
/bin/echo -e >> Makefile 'both:' ; \ /bin/echo -e >> Makefile 'both: musl-x86_64' ; \
/bin/echo -e >> Makefile '\t$$$$(MAKE) TARGET=x86_64-linux-musl install' ; \ /bin/echo -e >> Makefile 'musl-x86_64: extract_all' ; \
/bin/echo -e >> Makefile '\t$$$$(MAKE) TARGET=i386-linux-musl install' ; \ /bin/echo -e >> Makefile '\t$$$$''(MAKE) TARGET=x86_64-linux-musl install' ; \
/bin/echo -e >> Makefile 'musl-i386: extract_all' ; \
/bin/echo -e >> Makefile '\t$$$$''(MAKE) TARGET=i386-linux-musl install' ; \
CROSS_PATH ?= $(pwd)/crossgcc CROSS_PATH ?= $(pwd)/crossgcc