xref: /openbmc/qemu/.gitlab-ci.d/cirrus/build.yml (revision b5cf7428)
1@CIRRUS_VM_INSTANCE_TYPE@:
2  @CIRRUS_VM_IMAGE_SELECTOR@: @CIRRUS_VM_IMAGE_NAME@
3  cpu: @CIRRUS_VM_CPUS@
4  memory: @CIRRUS_VM_RAM@
5
6env:
7  CIRRUS_CLONE_DEPTH: 1
8  CI_REPOSITORY_URL: "@CI_REPOSITORY_URL@"
9  CI_COMMIT_REF_NAME: "@CI_COMMIT_REF_NAME@"
10  CI_COMMIT_SHA: "@CI_COMMIT_SHA@"
11  PATH: "@PATH@"
12  PKG_CONFIG_PATH: "@PKG_CONFIG_PATH@"
13  PYTHON: "@PYTHON@"
14  MAKE: "@MAKE@"
15  CONFIGURE_ARGS: "@CONFIGURE_ARGS@"
16
17build_task:
18  install_script:
19    - @UPDATE_COMMAND@
20    - @INSTALL_COMMAND@ @PKGS@
21    - if test -n "@PYPI_PKGS@" ; then @PIP3@ install @PYPI_PKGS@ ; fi
22  clone_script:
23    - git clone --depth 100 "$CI_REPOSITORY_URL" .
24    - git fetch origin "$CI_COMMIT_REF_NAME"
25    - git reset --hard "$CI_COMMIT_SHA"
26  build_script:
27    - mkdir build
28    - cd build
29    - ../configure --enable-werror $CONFIGURE_ARGS
30      || { cat config.log meson-logs/meson-log.txt; exit 1; }
31    - $MAKE -j$(sysctl -n hw.ncpu)
32    - for TARGET in $TEST_TARGETS ;
33      do
34        $MAKE -j$(sysctl -n hw.ncpu) $TARGET V=1 ;
35      done
36