]> git.ipfire.org Git - thirdparty/qemu.git/blob - .gitlab-ci-edk2.yml
Merge remote-tracking branch 'remotes/cleber/tags/python-next-pull-request' into...
[thirdparty/qemu.git] / .gitlab-ci-edk2.yml
1 docker-edk2:
2 stage: build
3 rules: # Only run this job when the Dockerfile is modified
4 - changes:
5 - .gitlab-ci-edk2.yml
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
26 build-edk2:
27 rules: # Only run this job when ...
28 - changes: # ... roms/edk2/ is modified (submodule updated)
29 - roms/edk2/*
30 when: always
31 - if: '$CI_COMMIT_REF_NAME =~ /^edk2/' # or the branch/tag starts with 'edk2'
32 when: always
33 - if: '$CI_COMMIT_MESSAGE =~ /edk2/i' # or last commit description contains 'EDK2'
34 when: always
35 artifacts:
36 paths: # 'artifacts.zip' will contains the following files:
37 - pc-bios/edk2*bz2
38 - pc-bios/edk2-licenses.txt
39 - edk2-stdout.log
40 - edk2-stderr.log
41 image: $CI_REGISTRY_IMAGE:edk2-cross-build
42 variables:
43 GIT_DEPTH: 3
44 script: # Clone the required submodules and build EDK2
45 - git submodule update --init roms/edk2
46 - git -C roms/edk2 submodule update --init
47 - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
48 - echo "=== Using ${JOBS} simultaneous jobs ==="
49 - make -j${JOBS} -C roms efi 2>&1 1>edk2-stdout.log | tee -a edk2-stderr.log >&2