]> git.proxmox.com Git - mirror_qemu.git/blame - .gitlab-ci.d/opensbi.yml
block/blkio: Make s->mem_region_alignment be 64 bits
[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:
37a2b952 3 rules:
6e131bf6
DB
4 # Forks don't get pipelines unless QEMU_CI=1 or QEMU_CI=2 is set
5 - if: '$QEMU_CI != "1" && $QEMU_CI != "2" && $CI_PROJECT_NAMESPACE != "qemu-project"'
6 when: never
7
8 # In forks, if QEMU_CI=1 is set, then create manual job
9 # if any files affecting the build output are touched
10 - if: '$QEMU_CI == "1" && $CI_PROJECT_NAMESPACE != "qemu-project"'
11 changes:
12 - .gitlab-ci.d/opensbi.yml
13 - .gitlab-ci.d/opensbi/Dockerfile
14 - roms/opensbi/*
15 when: manual
16
17 # In forks, if QEMU_CI=1 is set, then create manual job
18 # if the branch/tag starts with 'opensbi'
19 - if: '$QEMU_CI == "1" && $CI_PROJECT_NAMESPACE != "qemu-project" && $CI_COMMIT_REF_NAME =~ /^opensbi/'
20 when: manual
21
22 # In forks, if QEMU_CI=1 is set, then create manual job
23 # if the last commit msg contains 'OpenSBI' (case insensitive)
24 - if: '$QEMU_CI == "1" && $CI_PROJECT_NAMESPACE != "qemu-project" && $CI_COMMIT_MESSAGE =~ /opensbi/i'
25 when: manual
26
37a2b952 27 # Run if any files affecting the build output are touched
94b73187 28 - changes:
94b73187 29 - .gitlab-ci.d/opensbi.yml
94b73187 30 - .gitlab-ci.d/opensbi/Dockerfile
94b73187
DB
31 - roms/opensbi/*
32 when: on_success
37a2b952
DB
33
34 # Run if the branch/tag starts with 'opensbi'
35 - if: '$CI_COMMIT_REF_NAME =~ /^opensbi/'
94b73187 36 when: on_success
37a2b952
DB
37
38 # Run if the last commit msg contains 'OpenSBI' (case insensitive)
39 - if: '$CI_COMMIT_MESSAGE =~ /opensbi/i'
94b73187 40 when: on_success
0a9487d8
PMD
41
42docker-opensbi:
94b73187
DB
43 extends: .opensbi_job_rules
44 stage: containers
ab725227 45 image: docker:latest
94b73187 46 services:
ab725227 47 - docker:dind
94b73187
DB
48 variables:
49 GIT_DEPTH: 3
50 IMAGE_TAG: $CI_REGISTRY_IMAGE:opensbi-cross-build
94b73187
DB
51 before_script:
52 - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
b105ce60 53 - until docker info; do sleep 1; done
94b73187
DB
54 script:
55 - docker pull $IMAGE_TAG || true
56 - docker build --cache-from $IMAGE_TAG --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
57 --tag $IMAGE_TAG .gitlab-ci.d/opensbi
58 - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
59 - docker push $IMAGE_TAG
c6fc0fc1
BM
60
61build-opensbi:
94b73187
DB
62 extends: .opensbi_job_rules
63 stage: build
64 needs: ['docker-opensbi']
65 artifacts:
cef63308 66 when: on_success
94b73187
DB
67 paths: # 'artifacts.zip' will contains the following files:
68 - pc-bios/opensbi-riscv32-generic-fw_dynamic.bin
69 - pc-bios/opensbi-riscv64-generic-fw_dynamic.bin
70 - opensbi32-generic-stdout.log
71 - opensbi32-generic-stderr.log
72 - opensbi64-generic-stdout.log
73 - opensbi64-generic-stderr.log
74 image: $CI_REGISTRY_IMAGE:opensbi-cross-build
75 variables:
76 GIT_DEPTH: 3
77 script: # Clone the required submodules and build OpenSBI
78 - git submodule update --init roms/opensbi
79 - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
80 - echo "=== Using ${JOBS} simultaneous jobs ==="
81 - make -j${JOBS} -C roms/opensbi clean
82 - make -j${JOBS} -C roms opensbi32-generic 2>&1 1>opensbi32-generic-stdout.log | tee -a opensbi32-generic-stderr.log >&2
83 - make -j${JOBS} -C roms/opensbi clean
84 - make -j${JOBS} -C roms opensbi64-generic 2>&1 1>opensbi64-generic-stdout.log | tee -a opensbi64-generic-stderr.log >&2