Skip to content
Snippets Groups Projects
Commit 0e8d6ecc authored by Eleni Mathioulaki's avatar Eleni Mathioulaki
Browse files

Merge branch 'build-time-test-results' into 'master'

keep build-time test results

See merge request technical-coordination/project-internal/devops/platform/ebrains-spack-builds!420
parents b209298e 96c98e27
No related branches found
No related tags found
No related merge requests found
...@@ -203,23 +203,13 @@ build-spack-env-on-runner: ...@@ -203,23 +203,13 @@ build-spack-env-on-runner:
- cp /tmp/spack.yaml $SPACK_ENV/ - cp /tmp/spack.yaml $SPACK_ENV/
- spack install -y -j2 --fresh --test root - spack install -y -j2 --fresh --test root
after_script: after_script:
- mkdir spack_logs - mkdir -p $CI_PROJECT_DIR/spack_logs/installed $CI_PROJECT_DIR/spack_logs/not_installed
- | # for succesfully installed packages: keep the spack logs for any package modified during this CI job
# succesfully installed packages: keep the spack logs for any package modified during this CI job - cd $SPACK_DEV_PATH/opt/spack/linux-ubuntu20.04-x86_64/gcc-10.3.0
SPACK_PACKAGES_DIR=$SPACK_DEV_PATH/opt/spack/linux-ubuntu20.04-x86_64/gcc-10.3.0 - find . \( -name ".spack" -o -name ".spack_test_results" -o -name ".build" \) -exec cp -r --parents "{}" $CI_PROJECT_DIR/spack_logs/installed \;
if cp --parents $SPACK_PACKAGES_DIR/*/.spack/*.txt $SPACK_PACKAGES_DIR/*/.spack_test_results/* ./; then # for not succesfully installed packages: also keep the spack logs for any packages that failed
mv .$SPACK_PACKAGES_DIR spack_logs/installed - cd /tmp/$(whoami)/spack-stage/
else - find . -maxdepth 2 -name "*.txt" -exec cp --parents "{}" $CI_PROJECT_DIR/spack_logs/not_installed \;
echo "No packages installed, so no logs to collect"
fi
# not succesfully installed packages: also keep the spack logs for any packages that failed
if cp --parents /tmp/$(whoami)/spack-stage/*/*.txt ./; then
# also collect all bss test results
cp --parents -r /tmp/$(whoami)/spack-stage/*/spack-src/build/test_results ./ || echo ""
mv ./tmp/$(whoami)/spack-stage spack_logs/not_installed
else
echo "No packages failed to build, so no logs to collect"
fi
artifacts: artifacts:
paths: paths:
- spack_logs - spack_logs
...@@ -284,23 +274,14 @@ sync-gitlab-spack-instance: ...@@ -284,23 +274,14 @@ sync-gitlab-spack-instance:
- spack install -y -j2 --fresh --test root - spack install -y -j2 --fresh --test root
- spack reindex - spack reindex
after_script: after_script:
- mkdir spack_logs - mkdir -p $CI_PROJECT_DIR/spack_logs/installed $CI_PROJECT_DIR/spack_logs/not_installed
- | # for succesfully installed packages: keep the spack logs for any package modified during this CI job
# succesfully installed packages: keep the spack logs for any package modified during this CI job
# (we use repo.yaml, that is modified at each start of the pipeline, as a reference file) # (we use repo.yaml, that is modified at each start of the pipeline, as a reference file)
SPACK_PACKAGES_DIR=$SPACK_PATH/spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-10.3.0 - cd $SPACK_PATH/spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-10.3.0
if find $SPACK_PACKAGES_DIR/*/.spack/*.txt -newer $SPACK_REPO_PATH/repo.yaml -exec cp --parents -r "{}" ./ \;; then - find . \( -name ".spack" -o -name ".spack_test_results" -o -name ".build" \) -newer $SPACK_REPO_PATH/repo.yaml -exec cp -r --parents "{}" $CI_PROJECT_DIR/spack_logs/installed \;
cp --parents -r $SPACK_PACKAGES_DIR/*/.spack_test_results/* ./ # for not succesfully installed packages: also keep the spack logs for any packages that failed
mv .$SPACK_PACKAGES_DIR spack_logs/installed - cd /tmp/$(whoami)/spack-stage/
else - find . -maxdepth 2 -name "*.txt" -exec cp --parents "{}" $CI_PROJECT_DIR/spack_logs/not_installed \;
echo "No packages installed, so no logs to collect"
fi
# not succesfully installed packages: also keep the spack logs for any packages that failed
if cp --parents /tmp/$(whoami)/spack-stage/*/*.txt ./; then
mv ./tmp/$(whoami)/spack-stage spack_logs/not_installed
else
echo "No packages failed to build, so no logs to collect"
fi
artifacts: artifacts:
paths: paths:
- spack_logs - spack_logs
......
...@@ -182,6 +182,7 @@ class Hxtorch(WafPackage): ...@@ -182,6 +182,7 @@ class Hxtorch(WafPackage):
def build_test(self): def build_test(self):
self.waf('build', '--test-execall') self.waf('build', '--test-execall')
copy_tree('build/test_results', join_path(self.prefix, '.build'))
def install_args(self): def install_args(self):
args = ['--test-execnone'] args = ['--test-execnone']
......
...@@ -159,6 +159,7 @@ class PynnBrainscales(WafPackage): ...@@ -159,6 +159,7 @@ class PynnBrainscales(WafPackage):
def build_test(self): def build_test(self):
self.waf('build', '--test-execall') self.waf('build', '--test-execall')
copy_tree('build/test_results', join_path(self.prefix, '.build'))
def install_args(self): def install_args(self):
args = ['--test-execnone'] args = ['--test-execnone']
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment