diff mbox series

[v3,6/6] gitlab-ci: Add FreeBSD jobs

Message ID 20210519184549.2192728-7-f4bug@amsat.org (mailing list archive)
State New, archived
Headers show
Series gitlab-ci: Allow using FreeBSD runners | expand

Commit Message

Philippe Mathieu-Daudé May 19, 2021, 6:45 p.m. UTC
Add system/user emulation jobs on FreeBSD host.

To build these jobs, you need to add a FreeBSD runner and
add 'freebsd' to the QEMU_CUSTOM_RUNNER variable in your
GitLab project.

Reviewed by: Warner Losh <imp@bsdimp.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 .gitlab-ci.d/buildtest-freebsd.yml | 59 ++++++++++++++++++++++++++++++
 .gitlab-ci.d/qemu-project.yml      |  1 +
 2 files changed, 60 insertions(+)
 create mode 100644 .gitlab-ci.d/buildtest-freebsd.yml

Comments

Willian Rampazzo May 19, 2021, 7:43 p.m. UTC | #1
On Wed, May 19, 2021 at 3:46 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Add system/user emulation jobs on FreeBSD host.
>
> To build these jobs, you need to add a FreeBSD runner and
> add 'freebsd' to the QEMU_CUSTOM_RUNNER variable in your
> GitLab project.
>
> Reviewed by: Warner Losh <imp@bsdimp.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  .gitlab-ci.d/buildtest-freebsd.yml | 59 ++++++++++++++++++++++++++++++
>  .gitlab-ci.d/qemu-project.yml      |  1 +
>  2 files changed, 60 insertions(+)
>  create mode 100644 .gitlab-ci.d/buildtest-freebsd.yml
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>
diff mbox series

Patch

diff --git a/.gitlab-ci.d/buildtest-freebsd.yml b/.gitlab-ci.d/buildtest-freebsd.yml
new file mode 100644
index 00000000000..bfaeff89330
--- /dev/null
+++ b/.gitlab-ci.d/buildtest-freebsd.yml
@@ -0,0 +1,59 @@ 
+include:
+  - local: '/.gitlab-ci.d/buildtest-template.yml'
+
+.runner_freebsd_template:
+  rules:
+    # To enable this job template, add 'freebsd' to the QEMU_CUSTOM_RUNNER
+    # variable in your project UI via Settings -> CI/CD -> Variables
+    # https://docs.gitlab.com/ee/ci/variables/README.html#project-cicd-variables
+    - if: $QEMU_CUSTOM_RUNNER =~ /freebsd/
+      when: always
+    - when: never
+  tags:
+    - freebsd
+
+build-user-freebsd:
+  extends:
+    - .runner_freebsd_template
+    - .native_build_job_template
+  image:
+  variables:
+    MAKE_CHECK_ARGS: check-build
+    CONFIGURE_ARGS: --disable-system --python=/usr/local/bin/python3.7
+
+build-system-freebsd:
+  extends:
+    - .runner_freebsd_template
+    - .native_build_job_template
+  image:
+  variables:
+    TARGETS: aarch64-softmmu avr-softmmu hppa-softmmu ppc64-softmmu
+      riscv64-softmmu s390x-softmmu x86_64-softmmu
+    MAKE_CHECK_ARGS: check-build
+    CONFIGURE_ARGS: --enable-trace-backends=log,simple,syslog
+      --python=/usr/local/bin/python3.7
+  artifacts:
+    expire_in: 2 days
+    paths:
+      - .git-submodule-status
+      - build
+
+check-system-freebsd:
+  extends:
+    - .runner_freebsd_template
+    - .native_test_job_template
+  needs:
+    - job: build-system-freebsd
+      artifacts: true
+  variables:
+    MAKE_CHECK_ARGS: check
+
+acceptance-system-freebsd:
+  extends:
+    - .runner_freebsd_template
+    - .integration_test_job_template
+  needs:
+    - job: build-system-freebsd
+      artifacts: true
+  variables:
+    MAKE_CHECK_ARGS: check-acceptance
diff --git a/.gitlab-ci.d/qemu-project.yml b/.gitlab-ci.d/qemu-project.yml
index 64cb2ba1da5..5dcf1d34c5b 100644
--- a/.gitlab-ci.d/qemu-project.yml
+++ b/.gitlab-ci.d/qemu-project.yml
@@ -8,4 +8,5 @@  include:
   - local: '/.gitlab-ci.d/containers.yml'
   - local: '/.gitlab-ci.d/crossbuilds.yml'
   - local: '/.gitlab-ci.d/buildtest.yml'
+  - local: '/.gitlab-ci.d/buildtest-freebsd.yml'
   - local: '/.gitlab-ci.d/static_checks.yml'