toolbox/playbooks/unit-test.yaml
Ondřej Míchal 424691b404 playbooks: Properly separate builddir setup & build
Call "meson builddir" makes Meson create a build directory called
"builddir". It does not make it build the project. A subsequent call to
"meson compile" or "ninja" needs to be made. This subtle detail causes
a minor (purely visual) discrepancy in the CI output. Fix this for both
unit-test & system-test job definitions.
2021-03-21 23:15:15 +01:00

28 lines
620 B
YAML

---
- hosts: all
tasks:
- name: Install requirements
become: yes
package:
name:
- golang
- golang-github-cpuguy83-md2man
- ninja-build
- meson
- ShellCheck
- name: Set up build directory
command: meson builddir
args:
chdir: '{{ zuul.project.src_dir }}'
- name: Build Toolbox
command: ninja -C builddir
args:
chdir: '{{ zuul.project.src_dir }}'
creates: builddir/src/toolbox
- name: Test
command: ninja -C builddir test
args:
chdir: '{{ zuul.project.src_dir }}'