]> git.proxmox.com Git - mirror_qemu.git/blame - .gitlab-ci.d/edk2.yml
Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-docs-xen-updates...
[mirror_qemu.git] / .gitlab-ci.d / edk2.yml
CommitLineData
71920809 1docker-edk2:
d0caa0a8 2 stage: containers
71920809
PMD
3 rules: # Only run this job when the Dockerfile is modified
4 - changes:
5117ba25 5 - .gitlab-ci.d/edk2.yml
71920809
PMD
6 - .gitlab-ci.d/edk2/Dockerfile
7 when: always
8 image: docker:19.03.1
9 services:
10 - docker:19.03.1-dind
11 variables:
12 GIT_DEPTH: 3
13 IMAGE_TAG: $CI_REGISTRY_IMAGE:edk2-cross-build
14 # We don't use TLS
15 DOCKER_HOST: tcp://docker:2375
16 DOCKER_TLS_CERTDIR: ""
17 before_script:
18 - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
19 script:
20 - docker pull $IMAGE_TAG || true
21 - docker build --cache-from $IMAGE_TAG --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
22 --tag $IMAGE_TAG .gitlab-ci.d/edk2
23 - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
24 - docker push $IMAGE_TAG
25
26build-edk2:
d0caa0a8 27 stage: build
1925468d 28 needs: ['docker-edk2']
71920809
PMD
29 rules: # Only run this job when ...
30 - changes: # ... roms/edk2/ is modified (submodule updated)
31 - roms/edk2/*
32 when: always
33 - if: '$CI_COMMIT_REF_NAME =~ /^edk2/' # or the branch/tag starts with 'edk2'
34 when: always
35 - if: '$CI_COMMIT_MESSAGE =~ /edk2/i' # or last commit description contains 'EDK2'
36 when: always
37 artifacts:
38 paths: # 'artifacts.zip' will contains the following files:
39 - pc-bios/edk2*bz2
40 - pc-bios/edk2-licenses.txt
41 - edk2-stdout.log
42 - edk2-stderr.log
43 image: $CI_REGISTRY_IMAGE:edk2-cross-build
44 variables:
45 GIT_DEPTH: 3
46 script: # Clone the required submodules and build EDK2
47 - git submodule update --init roms/edk2
48 - git -C roms/edk2 submodule update --init
49 - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
50 - echo "=== Using ${JOBS} simultaneous jobs ==="
51 - make -j${JOBS} -C roms efi 2>&1 1>edk2-stdout.log | tee -a edk2-stderr.log >&2