---
- name: Install required packages
  apt:
    name: "{{ item }}"
    update_cache: yes
    cache_valid_time: 3600
  with_items:
  become: yes

- name: Download kcov
  unarchive:
    src: "{{ kcov_download_url }}"
    dest: /tmp
    copy: no

- name: Create the build directory
  file:
    path: "{{ kcov_build_dir }}"
    state: directory

- name: Generate the kcov makedir
  command: cmake .. -DCMAKE_INSTALL_PREFIX={{ kcov_install_prefix }}
  args:
    chdir: "{{ kcov_build_dir }}"
    creates: "{{ kcov_build_dir }}/Makefile"

- name: Compile kcov
  command: make
  args:
    chdir: "{{ kcov_build_dir }}"
    creates: "{{ kcov_build_dir }}/src/kcov"

- name: Install kcov
  become: yes
  command: make install
  args:
    chdir: "{{ kcov_build_dir }}"
    creates: "{{ kcov_install_prefix }}/bin/kcov"

---
- name: Install required packages
  apt:
    name: "{{ item }}"
    update_cache: yes
    cache_valid_time: 3600
  with_items: "{{ required_packages }}"
  become: yes

- name: Download kcov
  unarchive:
    src: "{{ kcov_download_url }}"
    dest: /tmp
    copy: no

- name: Create the build directory
  file:
    path: "{{ kcov_build_dir }}"
    state: directory

- name: Generate the kcov makedir
  command: cmake .. -DCMAKE_INSTALL_PREFIX={{ kcov_install_prefix }}
  args:
    chdir: "{{ kcov_build_dir }}"
    creates: "{{ kcov_build_dir }}/Makefile"

- name: Compile kcov
  command: make
  args:
    chdir: "{{ kcov_build_dir }}"
    creates: "{{ kcov_build_dir }}/src/kcov"

- name: Install kcov
  become: yes
  command: make install
  args:
    chdir: "{{ kcov_build_dir }}"
    creates: "{{ kcov_install_prefix }}/bin/kcov"

Fix lack of packages for kcov
Fix lack of packages for kcov

[ci skip]
