]> git.proxmox.com Git - mirror_qemu.git/blame - .gitlab-ci.d/opensbi.yml
block/copy-before-write: implement cbw-timeout option
[mirror_qemu.git] / .gitlab-ci.d / opensbi.yml
CommitLineData
0a9487d8
PMD
1# All jobs needing docker-opensbi must use the same rules it uses.
2.opensbi_job_rules:
3 rules: # Only run this job when ...
c6fc0fc1 4 - changes:
0a9487d8 5 # this file is modified
5117ba25 6 - .gitlab-ci.d/opensbi.yml
0a9487d8 7 # or the Dockerfile is modified
c6fc0fc1 8 - .gitlab-ci.d/opensbi/Dockerfile
c217fd8e 9 when: on_success
0a9487d8
PMD
10 - changes: # or roms/opensbi/ is modified (submodule updated)
11 - roms/opensbi/*
c217fd8e 12 when: on_success
0a9487d8 13 - if: '$CI_COMMIT_REF_NAME =~ /^opensbi/' # or the branch/tag starts with 'opensbi'
c217fd8e 14 when: on_success
0a9487d8 15 - if: '$CI_COMMIT_MESSAGE =~ /opensbi/i' # or last commit description contains 'OpenSBI'
c217fd8e 16 when: on_success
0a9487d8
PMD
17
18docker-opensbi:
19 extends: .opensbi_job_rules
20 stage: containers
c6fc0fc1
BM
21 image: docker:19.03.1
22 services:
23 - docker:19.03.1-dind
24 variables:
25 GIT_DEPTH: 3
26 IMAGE_TAG: $CI_REGISTRY_IMAGE:opensbi-cross-build
27 # We don't use TLS
28 DOCKER_HOST: tcp://docker:2375
29 DOCKER_TLS_CERTDIR: ""
30 before_script:
31 - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
32 script:
33 - docker pull $IMAGE_TAG || true
34 - docker build --cache-from $IMAGE_TAG --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
35 --tag $IMAGE_TAG .gitlab-ci.d/opensbi
36 - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
37 - docker push $IMAGE_TAG
38
39build-opensbi:
0a9487d8 40 extends: .opensbi_job_rules
d0caa0a8 41 stage: build
91e9c47e 42 needs: ['docker-opensbi']
c6fc0fc1
BM
43 artifacts:
44 paths: # 'artifacts.zip' will contains the following files:
a52ea3e7 45 - pc-bios/opensbi-riscv32-generic-fw_dynamic.bin
a52ea3e7 46 - pc-bios/opensbi-riscv64-generic-fw_dynamic.bin
a52ea3e7
BM
47 - opensbi32-generic-stdout.log
48 - opensbi32-generic-stderr.log
49 - opensbi64-generic-stdout.log
50 - opensbi64-generic-stderr.log
c6fc0fc1
BM
51 image: $CI_REGISTRY_IMAGE:opensbi-cross-build
52 variables:
53 GIT_DEPTH: 3
54 script: # Clone the required submodules and build OpenSBI
55 - git submodule update --init roms/opensbi
56 - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
57 - echo "=== Using ${JOBS} simultaneous jobs ==="
58 - make -j${JOBS} -C roms/opensbi clean
a52ea3e7 59 - make -j${JOBS} -C roms opensbi32-generic 2>&1 1>opensbi32-generic-stdout.log | tee -a opensbi32-generic-stderr.log >&2
c6fc0fc1 60 - make -j${JOBS} -C roms/opensbi clean
a52ea3e7 61 - make -j${JOBS} -C roms opensbi64-generic 2>&1 1>opensbi64-generic-stdout.log | tee -a opensbi64-generic-stderr.log >&2