From: Kienan Stewart Date: Tue, 15 Aug 2023 18:47:10 +0000 (-0400) Subject: ansible: Install gcc-11 and gcc-12 cross compilers on Debian X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a862e3365c55c732972a8eb4f15f11cb722d19c8;p=lttng-ci.git ansible: Install gcc-11 and gcc-12 cross compilers on Debian The default packages, eg. gcc-riscv64-linux-gnu, only installed the most recent vers (eg. 12 on Bookworm). Change-Id: I632ff54f7eceeb6e373e2026fb2fb828c2953d6d --- diff --git a/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml b/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml index d08fe47..c6c613d 100644 --- a/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml +++ b/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml @@ -2,5 +2,16 @@ - name: Update apt cache. apt: update_cache=yes cache_valid_time=86400 +- name: Add snapshot soures for gcc-11-powerpc/riscv64 + when: ansible_distribution == 'Debian' + block: + - ansible.builtin.copy: + dest: /etc/apt/preferences.d/snapshot.pref + content: "Package: *\nPin: origin \"snapshot.debian.org\"\nPin-Priority: 400\n" + - ansible.builtin.apt_repository: + repo: 'deb [check-valid-until=no] https://snapshot.debian.org/archive/debian/20230109T091852Z/ bookworm main' + - ansible.builtin.apt: + update_cache: true + - name: Ensure cross-compilers packages are installed. apt: "name={{ cross_compilers_packages }} state=present" diff --git a/automation/ansible/roles/cross-compilers/vars/Debian.yml b/automation/ansible/roles/cross-compilers/vars/Debian.yml index df8257a..a4bca80 100644 --- a/automation/ansible/roles/cross-compilers/vars/Debian.yml +++ b/automation/ansible/roles/cross-compilers/vars/Debian.yml @@ -7,3 +7,19 @@ cross_compilers_packages: - gcc-powerpc-linux-gnu - gcc-riscv64-linux-gnu - gcc-s390x-linux-gnu + - gcc-12-aarch64-linux-gnu + - gcc-12-arm-linux-gnueabihf + - gcc-12-i686-linux-gnu + - gcc-12-powerpc64le-linux-gnu + - gcc-12-powerpc-linux-gnu + - gcc-12-riscv64-linux-gnu + - gcc-12-s390x-linux-gnu + - gcc-11-aarch64-linux-gnu + - gcc-11-arm-linux-gnueabihf + - gcc-11-i686-linux-gnu + - gcc-11-powerpc64le-linux-gnu + - gcc-11-s390x-linux-gnu + # Not in Debian bookworm, but in testing/unstable, so they will + # be fetched from a snapshot source instead + - gcc-11-powerpc-linux-gnu + - gcc-11-riscv64-linux-gnu