Skip to content
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

Handle non-existent lib directory in cleanup step #383

Open
julioest opened this issue Dec 21, 2024 · 1 comment
Open

Handle non-existent lib directory in cleanup step #383

julioest opened this issue Dec 21, 2024 · 1 comment
Assignees

Comments

@julioest
Copy link
Collaborator

The Remove Libs from build cleanup step in the CI workflow fails intermittently with find: lib: No such file or directory but succeeds after a few manual reruns, we should make the step more resilient to handle cases when the directory doesn't exist.

- name: Remove Libs from build
if: steps.build.outputs.build-libs == 'true'
shell: bash
working-directory: build
run: |
set -x
find "lib" -mindepth 1 -maxdepth 1 -type d -exec rm -r {} +

@sdarwin
Copy link
Collaborator

sdarwin commented Dec 21, 2024

The step prior to Remove Libs is Build Libs , which runs ./libdoc.sh

In ./libdoc.sh near the top, right after the initial comments, add:

set -xe

The -x displays each step.
The -e exits on error.

Check that in with commit message such as "libdoc.sh: set -e"


Edit:

There is already a set -x at a certain point in the file. For that option, it may be sufficient. So then, only add this at the top:

set -e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants