diff --git a/.circleci/config.yml b/.circleci/config.yml index 303e1121..50c8d4e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,11 +15,63 @@ commands: command: | ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime apt update - apt install -y build-essential zlib1g-dev uuid-dev libdigest-sha-perl libelf-dev bc bzip2 bison flex git gnupg gawk iasl m4 nasm patch python python2 python3 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 innoextract sudo libssl-dev device-tree-compiler u-boot-tools sharutils e2fsprogs parted curl unzip imagemagick libncurses5-dev zip + apt install -y \ + autoconf \ + automake \ + bc \ + bison \ + build-essential \ + bzip2 \ + ccache \ + cmake \ + cpio \ + curl \ + device-tree-compiler \ + doxygen \ + e2fsprogs \ + flex \ + gawk \ + git \ + gnat \ + gnupg \ + graphviz \ + iasl \ + imagemagick \ + innoextract \ + libdigest-sha-perl \ + libelf-dev \ + libncurses5-dev \ + libssl-dev \ + libtool \ + libudev-dev \ + libudev1 \ + libusb-1.0-0-dev \ + m4 \ + nasm \ + ncurses-dev \ + parted \ + patch \ + pkg-config \ + python \ + python2 \ + python3 \ + rsync \ + sharutils \ + sudo \ + texinfo \ + u-boot-tools \ + udev \ + unzip \ + uuid-dev \ + wget \ + zip \ + zlib1g-dev \ + ; - run: name: Make Board (FULL ORDERED BUILD LOGS HERE UNTIL JOB FAILED) command: | - rm -rf build/<>/<>/* build/<>/log/* && make V=1 BOARD=<> <> || touch ./tmpDir/failed_build + rm -rf build/<>/<>/* build/<>/log/* + make V=1 BOARD=<> <> || touch ./tmpDir/failed_build no_output_timeout: 3h - run: name: Output hashes @@ -32,11 +84,22 @@ commands: - run: name: Archiving build logs. command: | - tar zcvf build/<>/<>/logs.tar.gz $(find build/ -name "*.log") + tar zcvf build/<>/<>/logs.tar.gz $(find build/ -name "*.log") - run: name: Output build failing logs command: | - if [[ -f ./tmpDir/failed_build ]]; then find ./build/<>/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1;else echo "Step hasn't failed. Continuing with next step..."; fi \ + if [[ -f ./tmpDir/failed_build ]]; then + find "./build/<>/" -name "*.log" -type f -mmin -1 | + while read log; do + echo "" + echo '==>' "$log" '<==' + echo "" + cat "$log" + done + exit 1 + else + echo "Step hasn't failed. Continuing with next step..." + fi - store_artifacts: path: build/<>/<> @@ -52,65 +115,100 @@ jobs: command: | ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime apt update - apt install -y build-essential zlib1g-dev uuid-dev libdigest-sha-perl libelf-dev bc bzip2 bison flex git gnupg gawk iasl m4 nasm patch python python2 python3 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 innoextract sudo imagemagick libncurses5-dev + apt install -y \ + autoconf \ + automake \ + bc \ + bison \ + build-essential \ + bzip2 \ + ccache \ + cmake \ + cpio \ + doxygen \ + flex \ + gawk \ + git \ + gnat \ + gnupg \ + graphviz \ + iasl \ + imagemagick \ + innoextract \ + libdigest-sha-perl \ + libelf-dev \ + libncurses5-dev \ + libtool \ + libudev-dev \ + libudev1 \ + libusb-1.0-0-dev \ + m4 \ + nasm \ + ncurses-dev \ + patch \ + pkg-config \ + python \ + python2 \ + python3 \ + rsync \ + sudo \ + texinfo \ + udev \ + uuid-dev \ + wget \ + zlib1g-dev \ + ; - checkout - run: name: git reset command: | - git reset --hard "$CIRCLE_SHA1" \ - + git reset --hard "$CIRCLE_SHA1" - run: name: Make tmp dir command: | - mkdir ./tmpDir \ - + mkdir ./tmpDir - run: name: Creating all modules and patches digest (All modules cache digest) command: | - find ./Makefile ./patches/ ./modules/ -type f | sort -h |xargs sha256sum > ./tmpDir/all_modules_and_patches.sha256sums \ - + find ./Makefile ./patches/ ./modules/ -type f | sort -h |xargs sha256sum > ./tmpDir/all_modules_and_patches.sha256sums - run: name: Creating coreboot (and associated patches) and musl-cross-make modules digest (musl-cross-make and coreboot cache digest) command: | - find ./Makefile ./modules/coreboot ./modules/musl-cross* ./patches/coreboot* -type f | sort -h | xargs sha256sum > ./tmpDir/coreboot_musl-cross.sha256sums \ - + find ./Makefile ./modules/coreboot ./modules/musl-cross* ./patches/coreboot* -type f | sort -h | xargs sha256sum > ./tmpDir/coreboot_musl-cross.sha256sums - run: name: Creating musl-cross-make and musl-cross-make patches digest (musl-cross-make cache digest) command: | - find ./Makefile modules/musl-cross* -type f | sort -h | xargs sha256sum > ./tmpDir/musl-cross.sha256sums \ - + find ./Makefile modules/musl-cross* -type f | sort -h | xargs sha256sum > ./tmpDir/musl-cross.sha256sums - restore_cache: + # First matched/found key wins and following keys are not tried keys: - #Restore existing cache for matching modules digest, validated to be exactly the same as in github current commit. - #This cache was made on top of below caches, if previously existing. If no module definition changed, we reuse this one. Otherwise... + # Cache for matching modules digest, validated to be exactly the same as in github current commit. + # This cache was made on top of below caches, if previously existing. + # If no module definition changed, we reuse this one - heads-modules-and-patches-{{ checksum "./tmpDir/all_modules_and_patches.sha256sums" }}{{ .Environment.CACHE_VERSION }} - #If precedent cache not found, restore cache for coreboot module (and patches) and musl-cross-make digests (coreboot: triannual release) - #Otehrwise.... + + # Cache for coreboot module (and patches) and musl-cross-make digests (coreboot: triannual release) - heads-coreboot-musl-cross-{{ checksum "./tmpDir/coreboot_musl-cross.sha256sums" }}{{ .Environment.CACHE_VERSION }} - #If precedent cache not found. Restore cache for musl-cross-make module digest (rarely modified). - #Otherwise, we build cleanly. + + # Cache for musl-cross-make module digest (rarely modified). - heads-musl-cross-{{ checksum "./tmpDir/musl-cross.sha256sums" }}{{ .Environment.CACHE_VERSION }} - run: name: Download and neuter xx20 ME (keep generated GBE and extracted IFD in tree) command: | ./blobs/xx20/download_parse_me.sh - - run: - name: Download and neuter xx30 ME (keep generated GBE and extracted IFD in tree) # me_cleaner.py present under heads xx30 blobs dir comes from https://github.com/corna/me_cleaner/blob/43612a630c79f3bc6f2653bfe90dfe0b7b137e08/me_cleaner.py + name: Download and neuter xx30 ME (keep generated GBE and extracted IFD in tree) command: | ./blobs/xx30/download_clean_me_manually.sh -m $(readlink -f ./blobs/xx30/me_cleaner.py) - - run: name: Download and extract t530 vbios roms for dgpu boards command: | ./blobs/xx30/vbios_t530.sh - - run: name: Download and extract w530 vbios roms for dgpu boards command: | ./blobs/xx30/vbios_w530.sh - - persist_to_workspace: root: ~/ paths: @@ -162,7 +260,7 @@ jobs: at: ~/ - build_board: arch: <> - target: <> + target: <> subcommand: <> save_cache: @@ -174,40 +272,40 @@ jobs: - attach_workspace: 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 + # 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/x86/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1 - build/ppc64/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1 + - build/x86/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1 + - crossgcc - packages - 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 + # 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: - - crossgcc - - build/x86/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1 + - build/ppc64/coreboot-talos_2 - build/ppc64/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1 - - packages - build/x86/coreboot-4.11 - build/x86/coreboot-4.13 - build/x86/coreboot-4.14 - build/x86/coreboot-4.15 - build/x86/coreboot-4.17 - build/x86/coreboot-4.22.01 - - build/x86/coreboot-purism - build/x86/coreboot-nitrokey - - build/ppc64/coreboot-talos_2 + - build/x86/coreboot-purism + - build/x86/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1 + - crossgcc + - packages - 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 }} paths: - - crossgcc - build - - packages + - crossgcc - install + - packages workflows: version: 2 @@ -215,9 +313,8 @@ workflows: jobs: - prep_env -# Below, sequentially build one board for each coreboot -# version. The last board in the sequence is the dependency -# for the parallel boards built at the end, and also save_cache. + # Below, sequentially build one board for each coreboot version. + # The last board in the sequence is the dependency for the parallel boards built at the end, and also save_cache. # coreboot 4.22.01 - build_and_persist: @@ -227,7 +324,7 @@ workflows: requires: - prep_env - # coreboot-git librems + # coreboot purism - build_and_persist: name: librem_14 target: librem_14 @@ -235,18 +332,19 @@ workflows: requires: - x230-hotp-maximized - # coreboot-git Nitropads depending on x230-hotp-maximized cache - # since kernel is 6.x and coreboot is git is unshared + # coreboot nitropad + # Nitropads depending on x230-hotp-maximized cache since kernel is 6.x and coreboot is git is unshared # We use nitropad's coreboot's fork crossgcc - # No need to wait further for other board's cache. + # No need to wait further for other board's cache + # We reuse built modules from x230-hotp-maximized cache only - build_and_persist: name: nitropad-nv41 target: nitropad-nv41 subcommand: "" requires: - - prep_env + - x230-hotp-maximized - # coreboot-git Talos II (PPC) + # coreboot talos_2 - build_and_persist: name: talos-2 arch: ppc64 @@ -255,18 +353,18 @@ workflows: requires: - prep_env - #Cache one workspace per architecture. Make sure workspace caches are chainloaded and the last in chain for an arch is saved. + # Cache one workspace per architecture + # Make sure workspace caches are chainloaded and the last in chain for an arch is saved - save_cache: requires: - talos-2 - librem_14 -# -# Those onboarding new boards should add their entries below. -# -# + # + # Those onboarding new boards should add their entries below. + # -#Coreboot 4.22.01 boards + # coreboot 4.22.01 boards - build: name: x220-hotp-maximized target: x220-hotp-maximized @@ -377,7 +475,7 @@ workflows: target: t440p-maximized subcommand: "" requires: - - x230-hotp-maximized + - x230-hotp-maximized - build: name: t440p-hotp-maximized @@ -421,7 +519,8 @@ workflows: requires: - x230-hotp-maximized -#coreboot-git librem boards + # coreboot purism + # librem boards - build: name: librem_13v2 target: librem_13v2 @@ -464,7 +563,8 @@ workflows: requires: - librem_14 -#coreboot-git dasharo clevo_release + staging IASL patch + # coreboot purism + # dasharo clevo_release + staging IASL patch - build: name: nitropad-ns50 target: nitropad-ns50 @@ -499,34 +599,3 @@ workflows: # subcommand: "" # requires: # - librem_14 - -######################## -######################## -### OLD STUFF ### -######################## -######################## -# linuxboot steps need something to pass in the kernel header path -# skipping for now -# - run: -# name: UNMAINTAINED_qemu-linuxboot-edk2 -# command: | -# ./build/make-4.2.1/make \ -# CROSS=/cross/bin/x86_64-linux-musl- \ -# BOARD=UNMAINTAINED_qemu-linuxboot \ -# `/bin/pwd`/build/linuxboot-git/build/qemu/.configured \ -# # Run first to avoid too many processes -# -# - run: -# name: UNMAINTAINED_qemu-linuxboot -# command: | -# ./build/make-4.2.1/make \ -# CROSS=/cross/bin/x86_64-linux-musl- \ -# CPUS=16 \ -# V=1 \ -# BOARD=UNMAINTAINED_qemu-linuxboot \ -# -# - store-artifacts: -# path: build/UNMAINTAINED_qemu-linuxboot/linuxboot.rom -# - store-artifacts: -# path: build/UNMAINTAINED_qemu-linuxboot/hashes.txt -