1 # All jobs needing docker-edk2 must use the same rules it uses.
3 rules: # Only run this job when ...
5 # this file is modified
6 - .gitlab-ci.d/edk2.yml
7 # or the Dockerfile is modified
8 - .gitlab-ci.d/edk2/Dockerfile
9 # or roms/edk2/ is modified (submodule updated)
12 - if: '$CI_COMMIT_REF_NAME =~ /^edk2/' # or the branch/tag starts with 'edk2'
14 - if: '$CI_COMMIT_MESSAGE =~ /edk2/i' # or last commit description contains 'EDK2'
18 extends: .edk2_job_rules
25 IMAGE_TAG: $CI_REGISTRY_IMAGE:edk2-cross-build
27 DOCKER_HOST: tcp://docker:2375
28 DOCKER_TLS_CERTDIR: ""
30 - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
32 - docker pull $IMAGE_TAG || true
33 - docker build --cache-from $IMAGE_TAG --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
34 --tag $IMAGE_TAG .gitlab-ci.d/edk2
35 - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
36 - docker push $IMAGE_TAG
39 extends: .edk2_job_rules
41 needs: ['docker-edk2']
43 paths: # 'artifacts.zip' will contains the following files:
45 - pc-bios/edk2-licenses.txt
48 image: $CI_REGISTRY_IMAGE:edk2-cross-build
51 script: # Clone the required submodules and build EDK2
52 - git submodule update --init roms/edk2
53 - git -C roms/edk2 submodule update --init --
54 ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3
55 BaseTools/Source/C/BrotliCompress/brotli
56 CryptoPkg/Library/OpensslLib/openssl
57 MdeModulePkg/Library/BrotliCustomDecompressLib/brotli
58 - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
59 - echo "=== Using ${JOBS} simultaneous jobs ==="
60 - make -j${JOBS} -C roms efi 2>&1 1>edk2-stdout.log | tee -a edk2-stderr.log >&2