-
Notifications
You must be signed in to change notification settings - Fork 767
Move to nproc and Speed Up Ansible Lint #14328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,12 +20,12 @@ jobs: | |
| run: cmake -DSSG_PRODUCT_RHEL8=ON -DSSG_PRODUCT_RHEL9=ON -DSSG_PRODUCT_RHEL10=ON -G Ninja .. | ||
| working-directory: ./build | ||
| - name: Build | ||
| run: ninja -j2 rhel10-profile-playbooks rhel9-profile-playbooks rhel8-profile-playbooks | ||
| run: ninja -j$(nproc) rhel10-profile-playbooks rhel9-profile-playbooks rhel8-profile-playbooks | ||
| working-directory: ./build | ||
| - name: Build Ansible Roles | ||
| run: PYTHONPATH=. python3 utils/ansible_playbook_to_role.py --build-playbooks-dir ./build/ansible/ --dry-run ./build/ansible_roles | ||
| # https://github.com/actions/checkout/issues/766 | ||
| - name: Set git safe directory | ||
| run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
| - name: Lint Ansible Roles | ||
| run: ansible-lint -x 204 -x experimental -x command-instead-of-module ./build/ansible_roles/* | ||
vojtapolasek marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| run: find ./build/ansible_roles -mindepth 1 -maxdepth 1 -type d | xargs -P $(nproc) -I {} ansible-lint -x 204 -x experimental -x command-instead-of-module {} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we are using many pipes here, would adding something like set -eo pipefail make sense?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is only one pipe here and we assume the playbooks exist since the build worked so I don't think it is needed.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In context of previous discussion it seems it is really not needed.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, I would agree with @vojtapolasek here - if the Although if we (want to) rely on other steps throwing errors, that's probably fine. |
||
Uh oh!
There was an error while loading. Please reload this page.