|
26 | 26 | # than with commit hashes, prevents "reference is not a tree" errors
|
27 | 27 | version: "{{ local_branch }}"
|
28 | 28 | refspec: "+{{ collector_git_ref | replace('refs/', '') }}:{{ local_branch }}"
|
29 |
| - recursive: true |
30 | 29 | depth: 1
|
| 30 | + recursive: false |
31 | 31 | when: arch == "s390x"
|
32 | 32 |
|
33 |
| - - name: Check if remote ccache archive exists on controller |
| 33 | + - name: Clone submodules |
| 34 | + ansible.builtin.shell: | |
| 35 | + git submodule update --init --depth 1 |
| 36 | + args: |
| 37 | + chdir: "{{ collector_root }}" |
| 38 | + when: arch == "s390x" |
| 39 | + |
| 40 | + - name: Check if ccache exists |
34 | 41 | delegate_to: localhost
|
35 | 42 | ansible.builtin.stat:
|
36 | 43 | path: "{{ github_workspace }}/{{ ccache_dir }}/{{ ccache_archive }}"
|
37 | 44 | register: ccache_check
|
38 | 45 | when: arch == "s390x"
|
39 | 46 |
|
40 |
| - - name: Copy ccache from the controller to build VM |
| 47 | + - name: Create cccache directory |
| 48 | + ansible.builtin.file: |
| 49 | + path: "{{ collector_root }}/{{ ccache_dir }}" |
| 50 | + state: directory |
| 51 | + when: arch == "s390x" and ccache_check.stat.exists |
| 52 | + |
| 53 | + - name: Copy ccache |
41 | 54 | ansible.builtin.copy:
|
42 | 55 | src: "{{ github_workspace }}/{{ ccache_dir }}/{{ ccache_archive }}"
|
43 | 56 | dest: "{{ collector_root }}/"
|
44 | 57 | when: arch == "s390x" and ccache_check.stat.exists
|
45 | 58 |
|
46 |
| - - name: Extract ccache archive if found |
| 59 | + - name: Unarchive ccache |
47 | 60 | ansible.builtin.unarchive:
|
48 | 61 | src: "{{ collector_root }}/{{ ccache_archive }}"
|
49 | 62 | dest: "{{ collector_root }}/{{ ccache_dir }}"
|
|
73 | 86 | tar czf "{{ collector_root }}/{{ ccache_archive }}" .
|
74 | 87 | when: arch == "s390x"
|
75 | 88 |
|
76 |
| - - name: Copy ccache from build machine to controller |
| 89 | + - name: Fetch ccache |
77 | 90 | ansible.builtin.fetch:
|
78 | 91 | src: "{{ collector_root }}/{{ ccache_archive }}"
|
79 | 92 | dest: "{{ github_workspace }}/{{ ccache_dir }}/"
|
|
0 commit comments