Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ColossalAI
Commits
8bcad736
Unverified
Commit
8bcad736
authored
Jun 13, 2023
by
Frank Lee
Committed by
GitHub
Jun 13, 2023
Browse files
[workflow] fixed the directory check in build (#3980)
parent
2bf6547a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
.github/workflows/build_on_pr.yml
.github/workflows/build_on_pr.yml
+12
-8
No files found.
.github/workflows/build_on_pr.yml
View file @
8bcad736
...
@@ -40,8 +40,8 @@ jobs:
...
@@ -40,8 +40,8 @@ jobs:
-
name
:
Copy testmon cache
-
name
:
Copy testmon cache
run
:
|
# branch name may contain slash, we need to replace it with space
run
:
|
# branch name may contain slash, we need to replace it with space
export REF_BRANCH=$(echo ${{ github.event.ref }} | sed "s/\// /")
export REF_BRANCH=$(echo ${{ github.event.ref }} | sed "s/\// /")
if [ -d /github/home/testmon_cache/${MAIN_BRANCH} ]; then
if [ -d /github/home/testmon_cache/${MAIN_BRANCH}
] && [ ! -z "$(ls -A /github/home/testmon_cache/${MAIN_BRANCH})"
]; then
[ ! -z "$(ls -A /github/home/testmon_cache/${MAIN_BRANCH})" ] &&
cp -p -r /github/home/testmon_cache/${MAIN_BRANCH} "/github/home/testmon_cache/${REF_BRANCH}"
cp -p -r /github/home/testmon_cache/${MAIN_BRANCH} "/github/home/testmon_cache/${REF_BRANCH}"
fi
fi
env
:
env
:
MAIN_BRANCH
:
${{ github.event.master_branch }}
MAIN_BRANCH
:
${{ github.event.master_branch }}
...
@@ -67,8 +67,8 @@ jobs:
...
@@ -67,8 +67,8 @@ jobs:
-
name
:
Copy testmon cache
-
name
:
Copy testmon cache
run
:
|
# branch name may contain slash, we need to replace it with space
run
:
|
# branch name may contain slash, we need to replace it with space
export BASE=$(echo ${{ github.event.pull_request.base.ref }} | sed "s/\// /")
export BASE=$(echo ${{ github.event.pull_request.base.ref }} | sed "s/\// /")
if [ -d "/github/home/testmon_cache/${BASE}" ]; then
if [ -d "/github/home/testmon_cache/${BASE}"
] and [ ! -z "$(ls -A "/github/home/testmon_cache/${BASE}")"
]; then
[ ! -z "$(ls -A "/github/home/testmon_cache/${BASE}")" ] &&
mkdir -p /github/home/testmon_cache/_pull && cp -p -r "/github/home/testmon_cache/${BASE}" /github/home/testmon_cache/_pull/${PR_NUMBER}
mkdir -p /github/home/testmon_cache/_pull && cp -p -r "/github/home/testmon_cache/${BASE}" /github/home/testmon_cache/_pull/${PR_NUMBER}
fi
fi
env
:
env
:
PR_NUMBER
:
${{ github.event.number }}
PR_NUMBER
:
${{ github.event.number }}
...
@@ -159,7 +159,9 @@ jobs:
...
@@ -159,7 +159,9 @@ jobs:
-
name
:
Restore TensorNVMe Cache
-
name
:
Restore TensorNVMe Cache
run
:
|
run
:
|
[ ! -z "$(ls -A /github/home/tensornvme_cache/)" ] && cp -p -r /github/home/tensornvme_cache/* /__w/ColossalAI/ColossalAI/TensorNVMe
if [ -d /github/home/tensornvme_cache ] && [ ! -z "$(ls -A /github/home/tensornvme_cache/)" ]; then
cp -p -r /github/home/tensornvme_cache/* /__w/ColossalAI/ColossalAI/TensorNVMe
fi
-
name
:
Install TensorNVMe
-
name
:
Install TensorNVMe
run
:
|
run
:
|
...
@@ -182,7 +184,9 @@ jobs:
...
@@ -182,7 +184,9 @@ jobs:
if
:
needs.detect.outputs.anyExtensionFileChanged != 'true'
if
:
needs.detect.outputs.anyExtensionFileChanged != 'true'
run
:
|
run
:
|
# -p flag is required to preserve the file timestamp to avoid ninja rebuild
# -p flag is required to preserve the file timestamp to avoid ninja rebuild
[ ! -z "$(ls -A /github/home/cuda_ext_cache/)" ] && cp -p -r /github/home/cuda_ext_cache/* /__w/ColossalAI/ColossalAI/
if [ -d /github/home/cuda_ext_cache ] && [ ! -z "$(ls -A /github/home/cuda_ext_cache/)" ]; then
cp -p -r /github/home/cuda_ext_cache/* /__w/ColossalAI/ColossalAI/
fi
-
name
:
Install Colossal-AI
-
name
:
Install Colossal-AI
run
:
|
run
:
|
...
@@ -273,8 +277,8 @@ jobs:
...
@@ -273,8 +277,8 @@ jobs:
if
:
github.event.pull_request.merged ==
true
if
:
github.event.pull_request.merged ==
true
run
:
|
# branch name may contain slash, we need to replace it with space
run
:
|
# branch name may contain slash, we need to replace it with space
export BASE=$(echo ${{ github.event.pull_request.base.ref }} | sed "s/\// /")
export BASE=$(echo ${{ github.event.pull_request.base.ref }} | sed "s/\// /")
if [ -d /github/home/testmon_cache/_pull/${PR_NUMBER} ]; then
if [ -d /github/home/testmon_cache/_pull/${PR_NUMBER}
] && [ ! -z "$(ls -A /github/home/testmon_cache/_pull/${PR_NUMBER})"
]; then
[ ! -z "$(ls -A /github/home/testmon_cache/_pull/${PR_NUMBER})" ] &&
cp -p -r /github/home/testmon_cache/_pull/${PR_NUMBER}/.testmondata* "/github/home/testmon_cache/${BASE}/"
cp -p -r /github/home/testmon_cache/_pull/${PR_NUMBER}/.testmondata* "/github/home/testmon_cache/${BASE}/"
fi
fi
env
:
env
:
PR_NUMBER
:
${{ github.event.pull_request.number }}
PR_NUMBER
:
${{ github.event.pull_request.number }}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment