From ced14739eb60e7f856374752adcc3fd056ce795c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alex=20Benn=C3=A9e?= Date: Mon, 27 Oct 2025 11:03:10 +0000 Subject: [PATCH] scripts/ci: move build-environment.yaml up a level MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We can share the setup of the build environment with multiple operating systems as we just need to check the YAML for each env is present in the directory structure. Reviewed-by: Manos Pitsidianakis Message-ID: <20251027110344.2289945-4-alex.bennee@linaro.org> Signed-off-by: Alex Bennée --- .../ci/setup/{ubuntu => }/build-environment.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) rename scripts/ci/setup/{ubuntu => }/build-environment.yml (81%) diff --git a/scripts/ci/setup/ubuntu/build-environment.yml b/scripts/ci/setup/build-environment.yml similarity index 81% rename from scripts/ci/setup/ubuntu/build-environment.yml rename to scripts/ci/setup/build-environment.yml index 1c517c74f7..66bde18875 100644 --- a/scripts/ci/setup/ubuntu/build-environment.yml +++ b/scripts/ci/setup/build-environment.yml @@ -27,18 +27,24 @@ - ansible_facts['distribution'] == 'Ubuntu' # the package lists are updated by "make lcitool-refresh" - - name: Include package lists based on OS and architecture - include_vars: - file: "ubuntu-2404-{{ ansible_facts['architecture'] }}.yaml" + - name: Define package list file path + set_fact: + package_file: "ubuntu/ubuntu-2404-{{ ansible_facts['architecture'] }}.yaml" when: - ansible_facts['distribution'] == 'Ubuntu' - ansible_facts['distribution_version'] == '24.04' + - name: Include package lists based on OS and architecture + include_vars: + file: "{{ package_file }}" + when: + - package_file is exists + - name: Install packages for QEMU on Ubuntu 24.04 package: name: "{{ packages }}" when: - - ansible_facts['distribution'] == 'Ubuntu' - - ansible_facts['distribution_version'] == '24.04' + - package_file is exists + - packages is defined -- 2.47.3