---
- name: Run repair on wheels
  ansible.builtin.include_role:
    name: linaro
    tasks_from: auditwheel-repair.yml

- name: Prepare wheels for publishing
  ansible.builtin.include_role:
    name: linaro
    tasks_from: publish-wheels.yml

- name: Prepare wheels for cache upload
  when: tensorflow_version != 'git' and not prebuild_release
  block:
    - name: Copy wheels for cache upload
      ansible.builtin.copy:
        src: "{{ wheels_dir }}"
        dest: "{{ build_dir }}/cache_upload"
        owner: "buildslave"
        group: "buildslave"
        mode: 0644

    - name: Prepare wheels for cache
      ansible.builtin.include_role:
        name: linaro
        tasks_from: publish-wheels-cache.yml
      vars:
        wheels_dir: "{{ build_dir }}/cache_upload"
