speedup: move when block to outside include
Instead of including a file, then running a conditional in the block which gets applied inside the task, which then results in every task running, but getting skipped (especially in scenarios where the build host is the same as the current one), we simply include if we have to. This saves around 20 seconds in every iteration of python_venv_build on metal. Change-Id: I8afb2970ee696f0fe9a9e250f19f1db465d63511
This commit is contained in:
parent
c94cd6c4b6
commit
092d874e6f
@ -19,6 +19,7 @@
|
||||
|
||||
- import_tasks: "python_venv_wheel_build.yml"
|
||||
run_once: yes
|
||||
when: venv_wheel_build_enable | bool
|
||||
tags:
|
||||
- build
|
||||
|
||||
|
@ -16,8 +16,6 @@
|
||||
- name: Build the wheels on the build host
|
||||
delegate_to: "{{ venv_build_host }}"
|
||||
become: "{{ venv_build_host == 'localhost' }}"
|
||||
when:
|
||||
- venv_wheel_build_enable | bool
|
||||
block:
|
||||
- name: Install distro packages for wheel build
|
||||
package:
|
||||
|
Loading…
x
Reference in New Issue
Block a user