Verified Commit 056dad88 authored by Bennet Bleßmann's avatar Bennet Bleßmann

add custom sections to ci log

parent 6b68ca68
......@@ -75,11 +75,14 @@ run_make:
- if: '$BUILD_NIGHTLY == "yes"'
- if: '$TEST_RELEASE == "yes"'
before_script:
- ./ci/section_helper.sh
- start_section before_script "Preparing for Job"
- export PATH="${CI_PROJECT_DIR}/bin:${BIN_INSTALL_PATH}:${PATH}"
- echo ${PATH}
- time ./ci/before_make.sh
# prevent the build stages from disagreeing over the date by generating it once at the start
- export BUILD_DATE="$(date +%F)"
- end_section before_script
script:
- time make CI_BUILD=yes COMPILERDATE="${BUILD_DATE}"
- |
......@@ -150,15 +153,20 @@ run_test:
- job: "run_make"
artifacts: true
before_script:
- ./ci/section_helper.sh
- start_section before_script "Preparing for Job"
- export PATH="${CI_PROJECT_DIR}/bin:${BIN_INSTALL_PATH}:${PATH}"
- echo ${PATH}
- ./ci/before_make.sh
- end_section before_script
- start_section cypm "Updating cypm index and installing tools"
- ./bin/pakcs-cypm config
- |
set -ve
source ci/cypm_helper.sh
cypm_update
cypm_install_binary currycheck "${CURRY_CHECK_VERSION}"
- end_section cypm
script:
- time make CI_BUILD=yes runalltests RUNTESTPARAMS=-v
......@@ -176,16 +184,21 @@ make_manual:
artifacts: true
timeout: 4h
before_script:
- ./ci/section_helper.sh
- start_section before_script "Preparing for Job"
- export PATH="${CI_PROJECT_DIR}/bin:${BIN_INSTALL_PATH}:${PATH}"
- echo ${PATH}
- ./ci/before_make.sh
- ./bin/pakcs-cypm config
- end_section before_script # ending this here as I want a separate section for the cypm stuff and nested section appear to have problems
- start_section cypm "Updating cypm index and installing tools"
- |
set -ve
source ci/cypm_helper.sh
time cypm_update
time cypm_install_binary currydoc "${CURRY_DOC_VERSION}"
time cypm_install_binary markdown "${MARKDOWN_VERSION}"
- end_section cypm
script:
- time make CI_BUILD=yes COMPILERDATE="${BUILD_DATE}" manual
- echo "MANUAL_JOB_ID=${CI_JOB_ID}" >> manual.env
......
......@@ -20,6 +20,7 @@ CI Readme
| +-- make_download.sh -- script run to test the website download
| +-- README.md -- this Readme explaining the CI setup
| +-- release_helper.sh -- script with helper function to setup the release environment
| +-- section_helper.sh -- helper script for adding custom sections to the gitlab ci log
| +-- update_version.sh -- script to update the latest release/nightly referenced on curry-lang.org
| +-- upload_release.sh -- script to create a new generic package for releases and nightlies
```
......
......@@ -2,6 +2,8 @@
set -ve
./ci/section_helper.sh
# Generate local version of CurryCheck:
gen_currycheck() {
bin/cypm \
......@@ -28,21 +30,33 @@ build_download_pakcs() {
rm -rf "${PAKCSVERSION}"
start_section "download_${PAKCSVERSION}_${DLVERSION}" "Downloading ${PAKCSVERSION}-${DLVERSION}"
# download dirtibution
wget http://www.informatik.uni-kiel.de/~pakcs/download/${PAKCSVERSION}-${DLVERSION}.tar.gz
tar xvzf ${PAKCSVERSION}-${DLVERSION}.tar.gz
rm ${PAKCSVERSION}-${DLVERSION}.tar.gz
end_section "download_${PAKCSVERSION}_${DLVERSION}"
pushd "${PAKCSVERSION}"
start_section "build_${PAKCSVERSION}_${DLVERSION}" "Building ${PAKCSVERSION}-${DLVERSION}"
# build system
make CI_BUILD=yes
bin/curry :load AllLibraries :eval "3*13+3" :quit
end_section "build_${PAKCSVERSION}_${DLVERSION}"
start_section "test_${PAKCSVERSION}_${DLVERSION}" "Testing ${PAKCSVERSION}-${DLVERSION}"
# run unit tests
gen_currycheck
make CI_BUILD=yes runtestverbose
end_section "test_${PAKCSVERSION}_${DLVERSION}"
popd
}
......
#!/bin/bash
#
# Takes 2 Parameters a new section id and a heading/title
#
function start_section() {
id=$1
title=$2
echo -e "\e[0Ksection_start:$(date +%s):${id}[collapsed=true]\r\e[0K${title}"
}
#
# Takes 1 Parameter, the unique section id of the section that should end
#
function end_section() {
id=$1
echo -e "\e[0Ksection_end:$(date +%s):${id}\r\e[0K"
}
\ No newline at end of file
Markdown is supported
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