jjb: Use lttng-modules from gerrit when depends-on is set
[lttng-ci.git] / automation / ansible / roles / cross-compilers / tasks / setup-Debian.yml
index dfc2a719090108277dfa9e325dfb236ec68b83a8..95add22384109a7e115861d25d48a8f0a7d0ae07 100644 (file)
@@ -3,21 +3,25 @@
   apt: update_cache=yes cache_valid_time=86400
 
 - name: Add snapshot soures for gcc-11-powerpc/riscv64
-  when: ansible_distribution == 'Debian'
+  when: ansible_distribution == 'Debian' and ansible_distribution_major_version == '12'
   block:
     - ansible.builtin.copy:
         dest: /etc/apt/preferences.d/snapshot.pref
         content: "Package: *\nPin: origin \"snapshot.debian.org\"\nPin-Priority: 400\n"
+      when: cross_compilers_debian_bookworm_snapshot
     - ansible.builtin.apt_repository:
         repo: 'deb [check-valid-until=no] https://snapshot.debian.org/archive/debian/20230109T091852Z/ bookworm main'
+        state: "{{cross_compilers_debian_bookworm_snapshot|ternary('present', 'absent')}}"
     - ansible.builtin.apt:
         update_cache: true
 
 - name: Ensure cross-compilers packages are installed.
-  apt: "name={{ cross_compilers_packages }} state=present"
+  when: cross_compilers_install|default(true)
+  ansible.builtin.apt:
+    name: "{{ cross_compilers_packages | difference(lookup('vars', 'cross_compilers_packages_exclude_{{ansible_userspace_architecture|default(ansible_architecture)}}', default=[]))}}"
 
 - name: Install legacy cross compilers
-  when: ansible_distribution == 'Debian' and ansible_architecture == 'x86_64'
+  when: ansible_distribution == 'Debian' and ansible_architecture == 'x86_64' and compilers_legacy_install
   block:
     # This step needs to happen after the cross compiler packages are installed
     # so the libgcc cross libraries can be copied
         - powerpc-linux-gnu
         - riscv64-linux-gnu
         - s390x-linux-gnu
-    - name: Download legacy compiler binaries
+    - name: Download gcc-4.8 cross compiler binaries
       # These binaries built from files/Containerfile
       ansible.builtin.get_url:
         url: https://obj.internal.efficios.com/jenkins/gcc-4.8-x86_64-linux-gnu-cross.tgz
         dest: /root/gcc-4.8-x86_64-linux-gnu-cross.tgz
-      register: cross_download
-    - name: Extract legacy compiler binaries
-      when: cross_download.changed
+      register: cross_gcc48_download
+    - name: Extract gcc-4.8 cross compiler binaries
+      when: cross_gcc48_download.changed
       ansible.builtin.command:
         argv: ['tar', '-C', '/', '-xzf', '/root/gcc-4.8-x86_64-linux-gnu-cross.tgz']
+
+    - name: Download gcc-5.5 cross compiler binaries
+      ansible.builtin.get_url:
+        url: https://obj.internal.efficios.com/jenkins/gcc-5.5-x86_64-linux-gnu-cross.tgz
+        dest: /root/gcc-5.5-x86_64-linux-gnu-cross.tgz
+      register: cross_gcc55_download
+    - name: Extract gcc-5.5 cross compiler binaries
+      when: cross_gcc55_download.changed
+      ansible.builtin.command:
+        argv: ['tar', '-xzf', '/root/gcc-5.5-x86_64-linux-gnu-cross.tgz', '-C', '/']
This page took 0.024474 seconds and 4 git commands to generate.