Skip to content

Commit

Permalink
[skip gpu] try again with success exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasGensollen committed May 30, 2024
1 parent ca40a24 commit 5dae6c9
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/test_interpret.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@ jobs:
- ubuntu
- gpu
steps:
- name: Skip or not skip
env:
COMMIT_FILTER: "[skip gpu]"
run: |
# Get last commit message
readonly local last_commit_log=$(git log -1 --pretty=format:"%s")
echo "last commit log: $last_commit_log"
readonly local filter_count=$(echo "$last_commit_log" | grep -c "$COMMIT_FILTER" )
echo "number of occurrence of '$COMMIT_FILTER' in '$last_commit_log': $filter_count"
if [[ "$filter_count" -eq 0 ]]; then
echo "all good, continue"
else
echo "the last commit log \"$last_commit_log\" contains \"$COMMIT_FILTER\", stopping"
exit 0
fi
- uses: actions/checkout@v4
- uses: snok/install-poetry@v1
with:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/test_random_search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@ jobs:
- ubuntu
- gpu
steps:
- name: Skip or not skip
env:
COMMIT_FILTER: "[skip gpu]"
run: |
# Get last commit message
readonly local last_commit_log=$(git log -1 --pretty=format:"%s")
echo "last commit log: $last_commit_log"
readonly local filter_count=$(echo "$last_commit_log" | grep -c "$COMMIT_FILTER" )
echo "number of occurrence of '$COMMIT_FILTER' in '$last_commit_log': $filter_count"
if [[ "$filter_count" -eq 0 ]]; then
echo "all good, continue"
else
echo "the last commit log \"$last_commit_log\" contains \"$COMMIT_FILTER\", stopping"
exit 0
fi
- uses: actions/checkout@v4
- uses: snok/install-poetry@v1
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test_train.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ env:

jobs:
test-train-gpu:
if: github.event.pull_request.draft == false
runs-on:
- self-hosted
- Linux
Expand All @@ -38,7 +39,7 @@ jobs:
echo "all good, continue"
else
echo "the last commit log \"$last_commit_log\" contains \"$COMMIT_FILTER\", stopping"
exit 78
exit 0
fi
- uses: actions/checkout@v4
- uses: snok/install-poetry@v1
Expand Down

0 comments on commit 5dae6c9

Please sign in to comment.