Skip to content

Commit

Permalink
Merge pull request #88 from sandialabs/dev-weh
Browse files Browse the repository at this point in the history
Misc update to fix gitlab builds
  • Loading branch information
whart222 authored Jun 3, 2024
2 parents 73a70b9 + 826b419 commit 1ccc50f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 56 deletions.
64 changes: 21 additions & 43 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,23 @@ compile:
tags: ["docker"]
script:
- source /root/.profile
- mkdir build
- cd build
- mkdir _build
- cd _build
- cmake
-Dwith_asl=ON
-Dwith_pybind11=ON
-Dwith_cppad=ON
-Dwith_tests=ON
-Dwith_gurobi=ON
-DPython_EXECUTABLE=$PYTHON_DIR/python
-Dwith_compact=OFF
-Dwith_docs=OFF ..
- make install_tpls
#-DGUROBI_LIBRARY=$GUROBI_LIBRARY/libgurobi100.so
#-DGUROBI_INCLUDE_DIRS=$GUROBI_HOME/include
#-DGUROBI_CXX_LIBRARY=$GUROBI_LIBRARY/libgurobi_g++5.2.a
- make install_tpls
- cmake
-Dwith_asl=ON
-Dwith_pybind11=ON
-Dwith_cppad=ON
-Dwith_tests=ON
-Dwith_gurobi=ON
..
- make -j8
- make install
rules:
Expand All @@ -34,17 +36,19 @@ compile:
- if: $CI_PIPELINE_SOURCE == "schedule"
artifacts:
paths:
- build
- _build
expire_in: 1 hour

unit-tests:
stage: test
tags: ["docker"]
script:
- source /root/.profile
- cd build
- cd _build
- export LD_LIBRARY_PATH="`pwd`/install/lib;`pwd`/install/lib64;$LD_LIBRARY_PATH"
- echo $LD_LIBRARY_PATH
- make test
allow_failure: true
allow_failure: false
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "dev-public" && $CI_PIPELINE_SOURCE == "push"
Expand All @@ -61,52 +65,26 @@ performance-tests:
export BRANCH_NAME=$CI_COMMIT_BRANCH
fi
- source /root/.profile
- echo $CI_COMMIT_SHA
- echo $CI_COMMIT_TITLE
- cd build
- make coek_solve0
- make coek_writer
- make gurobi_solve0
- make gurobi_writer
- cd ..
- cp build/test/aml_comparisons/gurobi/gurobi_writer test/aml_comparisons/gurobi/
- cp build/test/aml_comparisons/gurobi/gurobi_solve0 test/aml_comparisons/gurobi/
- cp build/test/aml_comparisons/coek/coek_writer test/aml_comparisons/coek/
- cp build/test/aml_comparisons/coek/coek_solve0 test/aml_comparisons/coek/
- cd test/aml_comparisons/
- mkdir build
- cd build
- ../scripts/run bench_coek 3
- ../scripts/collect
- ../scripts/dog solve0
- ../scripts/dog writer
- CI_COMMIT_TITLE_MOD="${CI_COMMIT_TITLE// /_}"
- python ../scripts/to_csv.py --dirname /coek_performance_results/${BRANCH_NAME} --branch_name ${BRANCH_NAME} --ci_commit_sha ${CI_COMMIT_SHA} --ci_commit_title ${CI_COMMIT_TITLE_MOD}
- python ../scripts/compare.py --artifact_dir=/coek_performance_results --branch_name=${BRANCH_NAME}
- tar -czvf perf_archive.tgz /coek_performance_results
cache:
key: perf-cache
paths:
- /coek_performance_results/*/*/*.csv
- /coek_performance_results/*/*/*.json
- /coek_performance_results/*/*.txt
- cd _build
- ../test/aml_comparisons/scripts/bench_gurobi.sh
- tar -czf perf_archive.tgz /coek_performance_results
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "dev-public" && $CI_PIPELINE_SOURCE == "push"
- if: $CI_PIPELINE_SOURCE == "schedule"
artifacts:
expose_as: 'performance-trend'
paths:
- test/aml_comparisons/build/perf_trend.html
- test/aml_comparisons/build/perf_archive.tgz
- _build/perf_trend.html
- _build/perf_archive.tgz
expire_in: 4 weeks

pages:
stage: pages_plot
tags: ["docker"]
script:
- mkdir public
- mv test/aml_comparisons/build/perf_trend.html public/index.html
- mv _build/perf_trend.html public/index.html
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "dev-public" && $CI_PIPELINE_SOURCE == "push"
Expand Down
25 changes: 12 additions & 13 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ while [[ $# -gt 0 ]]; do
echo "build.sh [--help] [--clang] [--debug] [--python] [--python-exe <file>] [--spack-dev] [--spack-home <dir>] [--spack-reinstall] [--valgrind]"
exit
;;
--python)
with_python="ON"
shift
;;
--python-exe)
python_exe="-DPython_EXECUTABLE=$2"
shift
shift
;;
--clang)
clang=1
shift
Expand All @@ -36,12 +27,12 @@ while [[ $# -gt 0 ]]; do
debug="ON"
shift
;;
--valgrind)
with_valgrind="valgrind"
--python)
with_python="ON"
shift
;;
--spack-reinstall)
spack_reinstall=1
--python-exe)
python_exe="-DPython_EXECUTABLE=$2"
shift
;;
--spack-dev)
Expand All @@ -53,6 +44,14 @@ while [[ $# -gt 0 ]]; do
shift
shift
;;
--spack-reinstall)
spack_reinstall=1
shift
;;
--valgrind)
with_valgrind="valgrind"
shift
;;
*)
echo "unknown option: $1"
exit
Expand Down

0 comments on commit 1ccc50f

Please sign in to comment.