From 0579b3270600ace76a07c999cd123cd939f28765 Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Thu, 25 Nov 2021 10:38:15 -0500 Subject: [PATCH] CircleCI: add large ressource class for free tier as defined under https://support.circleci.com/hc/en-us/articles/4410707277083-Context-deadline-exceeded-after-1-hour-Build-timed-out-Free-tier-only- 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 --- .circleci/config.yml | 127 +++++++++++++++++++++++++++++++------------ Makefile | 2 +- modules/musl-cross | 12 ++-- 3 files changed, 100 insertions(+), 41 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 67db29f00..0fa84f0b7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,6 +5,8 @@ commands: parameters: target: type: string + subcommand: + type: string steps: - run: name: Install dependencies @@ -14,7 +16,7 @@ commands: - run: name: Make Board command: | - rm -rf build/<>/* build/log/* && make CPUS=16 V=1 BOARD=<> || touch ./tmpDir/failed_build + rm -rf build/<>/* build/log/* && make CPUS=32 V=1 BOARD=<> <> || touch ./tmpDir/failed_build no_output_timeout: 3h - run: name: Output build failing logs @@ -23,7 +25,7 @@ commands: - run: name: Output hashes command: | - cat build/<>/hashes.txt \ + cat build/<>/hashes.txt || echo "No hashes for this build step..."\ - run: name: Archiving build logs. command: | @@ -35,6 +37,7 @@ jobs: prep_env: docker: - image: debian:10 + resource_class: large steps: - run: name: Install dependencies @@ -98,14 +101,18 @@ jobs: build_and_persist: docker: - image: debian:10 + resource_class: large parameters: target: type: string + subcommand: + type: string steps: - attach_workspace: at: ~/ - build_board: - target: <> + target: <> + subcommand: <> - persist_to_workspace: root: ~/ paths: @@ -117,11 +124,14 @@ jobs: parameters: target: type: string + subcommand: + type: string steps: - attach_workspace: at: ~/ - build_board: - target: <> + target: <> + subcommand: <> save_cache: docker: @@ -131,17 +141,22 @@ jobs: at: ~/ - save_cache: #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 }} paths: - crossgcc - - build/musl-cross-* + - build/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1 - save_cache: #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 }} paths: - - build/coreboot-* + - build/coreboot-4.11 + - build/coreboot-4.13 + - build/coreboot-4.14 + - build/coreboot-4.15 - crossgcc - - build/musl-cross-* + - build/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1 - save_cache: #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 }} @@ -161,20 +176,44 @@ workflows: # version. The last board in the sequence is the dependency # for the parallel boards built at the end, and also save_cache. - # Coreboot 4.11 + # Prerequisites - build_and_persist: - name: kgpe-d16_workstation - target: kgpe-d16_workstation + name: heads_musl-cross + target: x230-hotp-maximized + subcommand: musl-cross requires: - 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 - build_and_persist: name: x230-hotp-maximized target: x230-hotp-maximized + subcommand: "" requires: - - kgpe-d16_workstation - + - coreboot_413_buildstack - save_cache: requires: @@ -189,110 +228,128 @@ workflows: - build: name: x220-hotp-maximized target: x220-hotp-maximized + subcommand: "" requires: - x230-hotp-maximized - build: name: x220-maximized target: x220-maximized + subcommand: "" requires: - x230-hotp-maximized - build: name: t420-hotp-maximized target: t420-hotp-maximized + subcommand: "" requires: - x230-hotp-maximized - build: name: t420-maximized target: t420-maximized + subcommand: "" requires: - x230-hotp-maximized - build: name: x230-flash target: x230-flash + subcommand: "" requires: - x230-hotp-maximized - build: name: t430-flash target: t430-flash + subcommand: "" requires: - x230-hotp-maximized - build: name: t430 target: t430 + subcommand: "" requires: - x230-hotp-maximized - build: name: t430-hotp-verification target: t430-hotp-verification + subcommand: "" requires: - x230-hotp-maximized - build: name: x230 target: x230 + subcommand: "" requires: - x230-hotp-maximized - build: name: x230-hotp-verification target: x230-hotp-verification + subcommand: "" requires: - x230-hotp-maximized - build: name: t430-hotp-maximized target: t430-hotp-maximized + subcommand: "" requires: - x230-hotp-maximized - build: name: t430-maximized target: t430-maximized + subcommand: "" requires: - x230-hotp-maximized - build: name: qemu-coreboot target: qemu-coreboot + subcommand: "" requires: - x230-hotp-maximized - build: name: qemu-coreboot-fbwhiptail target: qemu-coreboot-fbwhiptail + subcommand: "" requires: - x230-hotp-maximized - - build: - name: kgpe-d16_workstation-usb_keyboard - target: kgpe-d16_workstation-usb_keyboard - requires: - - x230-hotp-maximized - - - build: - name: kgpe-d16_server - target: kgpe-d16_server - requires: - - x230-hotp-maximized - - - build: - name: kgpe-d16_server-whiptail - target: kgpe-d16_server-whiptail - requires: - - x230-hotp-maximized - - - build: - name: librem_l1um - target: librem_l1um - requires: - - x230-hotp-maximized + #- build: + #name: kgpe-d16_workstation-usb_keyboard + #target: kgpe-d16_workstation-usb_keyboard + #subcommand: "" + #requires: + #- x230-hotp-maximized + + #- build: + #name: kgpe-d16_server + #target: kgpe-d16_server + #subcommand: "" + #requires: + #- x230-hotp-maximized + + #- build: + #name: kgpe-d16_server-whiptail + #target: kgpe-d16_server-whiptail + #subcommand: "" + #requires: + #- x230-hotp-maximized + + #- build: + #name: librem_l1um + #target: librem_l1um + #subcommand: "" + #requires: + #- x230-hotp-maximized ######################## ######################## diff --git a/Makefile b/Makefile index 4073aa162..73e36190b 100644 --- a/Makefile +++ b/Makefile @@ -530,7 +530,7 @@ endif $(COREBOOT_UTIL_DIR)/cbmem/cbmem \ $(COREBOOT_UTIL_DIR)/superiotool/superiotool \ $(COREBOOT_UTIL_DIR)/inteltool/inteltool \ -: $(build)/$(coreboot_base_dir)/.canary +: $(build)/$(coreboot_base_dir)/.canary musl-cross +$(call do,MAKE,$(notdir $@),\ $(MAKE) -C "$(dir $@)" $(CROSS_TOOLS) \ ) diff --git a/modules/musl-cross b/modules/musl-cross index 2f05c51f6..e6940dacc 100644 --- a/modules/musl-cross +++ b/modules/musl-cross @@ -31,13 +31,15 @@ musl-cross_libraries := \ else -# Force a full build of the cross compiler -# have to build both x86_64 and i386 versions for coreboot +# Force a full build of the cross compiler for x86_64 +# (do not build i386 since coreboot uses its own compiler) musl-cross_configure := \ - /bin/echo -e >> Makefile 'both:' ; \ - /bin/echo -e >> Makefile '\t$$$$(MAKE) TARGET=x86_64-linux-musl install' ; \ - /bin/echo -e >> Makefile '\t$$$$(MAKE) TARGET=i386-linux-musl install' ; \ + /bin/echo -e >> Makefile 'both: musl-x86_64' ; \ + /bin/echo -e >> Makefile 'musl-x86_64: extract_all' ; \ + /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