Created
March 13, 2024 18:46
-
-
Save leshikus/e5dc344f2a65c9359904cffc90301627 to your computer and use it in GitHub Desktop.
Debug CI problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -vx | |
set -eu | |
test -z ${1+x} && exit 1 | |
ver=$1 | |
create_branch() { | |
cd .. | |
rm -rf intel-xpu-backend-for-triton | |
git clone https://github.com/intel/intel-xpu-backend-for-triton/ | |
cd intel-xpu-backend-for-triton | |
git checkout llvm-target | |
git pull | |
git branch check-$ver | |
git checkout check-$ver | |
} | |
edit_workflow() { | |
sed -i -e ' | |
s/^\(permissions: \)/ push:\n\n\1/ | |
s/\( CACHE_NUMBER: \)/\1'$ver'-/g | |
s/\(- "3.10"\)/#\1/ | |
' .github/workflows/conda-build-test.yml | |
} | |
commit_workflow() { | |
git commit -m'Add debug run on push' .github/workflows/conda-build-test.yml | |
git push --set-upstream origin check-$ver | |
} | |
create_branch | |
edit_workflow | |
commit_workflow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment