]> git.proxmox.com Git - mirror_qemu.git/blame - .gitlab-ci.d/edk2.yml
Merge tag 'qemu-slof-20211112' of github.com:aik/qemu into ppc-next
[mirror_qemu.git] / .gitlab-ci.d / edk2.yml
CommitLineData
ac0595cf
PMD
1# All jobs needing docker-edk2 must use the same rules it uses.
2.edk2_job_rules:
3 rules: # Only run this job when ...
71920809 4 - changes:
ac0595cf 5 # this file is modified
5117ba25 6 - .gitlab-ci.d/edk2.yml
ac0595cf 7 # or the Dockerfile is modified
71920809 8 - .gitlab-ci.d/edk2/Dockerfile
ac0595cf
PMD
9 # or roms/edk2/ is modified (submodule updated)
10 - roms/edk2/*
59e8b62b 11 when: on_success
ac0595cf 12 - if: '$CI_COMMIT_REF_NAME =~ /^edk2/' # or the branch/tag starts with 'edk2'
59e8b62b 13 when: on_success
ac0595cf 14 - if: '$CI_COMMIT_MESSAGE =~ /edk2/i' # or last commit description contains 'EDK2'
59e8b62b 15 when: on_success
ac0595cf
PMD
16
17docker-edk2:
18 extends: .edk2_job_rules
19 stage: containers
71920809
PMD
20 image: docker:19.03.1
21 services:
22 - docker:19.03.1-dind
23 variables:
24 GIT_DEPTH: 3
25 IMAGE_TAG: $CI_REGISTRY_IMAGE:edk2-cross-build
26 # We don't use TLS
27 DOCKER_HOST: tcp://docker:2375
28 DOCKER_TLS_CERTDIR: ""
29 before_script:
30 - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
31 script:
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
37
38build-edk2:
ac0595cf 39 extends: .edk2_job_rules
d0caa0a8 40 stage: build
1925468d 41 needs: ['docker-edk2']
71920809
PMD
42 artifacts:
43 paths: # 'artifacts.zip' will contains the following files:
44 - pc-bios/edk2*bz2
45 - pc-bios/edk2-licenses.txt
46 - edk2-stdout.log
47 - edk2-stderr.log
48 image: $CI_REGISTRY_IMAGE:edk2-cross-build
49 variables:
50 GIT_DEPTH: 3
51 script: # Clone the required submodules and build EDK2
52 - git submodule update --init roms/edk2
bd0da3a3
PMD
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
71920809
PMD
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