Commit ac77d2b5 authored by Michael Hanus 's avatar Michael Hanus

Merge branch 'master' of git.ps.informatik.uni-kiel.de:curry/pakcs

parents e2bffe43 90996e38
Pipeline #1405 passed with stages
in 213 minutes and 47 seconds
......@@ -75,12 +75,16 @@ run_make:
- if: '$BUILD_NIGHTLY == "yes"'
- if: '$TEST_RELEASE == "yes"'
before_script:
- source 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:
- start_section main_script "Building PAKCS"
- time make CI_BUILD=yes COMPILERDATE="${BUILD_DATE}"
- |
BUILD_PAKCS_VERSION="$("${CI_PROJECT_DIR}"/bin/pakcs --numeric-version)"
......@@ -88,6 +92,7 @@ run_make:
echo "BUILD_PAKCS_VERSION=${BUILD_PAKCS_VERSION}
BUILD_PAKCS_ARCH=${BUILD_PAKCS_ARCH}
BUILD_DATE=${BUILD_DATE}" >> make.env
- end_section main_script
artifacts:
reports:
dotenv:
......@@ -108,20 +113,34 @@ run_make:
- src/pakcsversion.pl
- src/prologbasics.pl
# only run for the nightly download test run
run_download_make:
# template for test_download_src and test_download_amd64_linux
.test_download:
stage: test
tags:
- docker2
rules:
# only run for the nightly download test run
- if: '$TEST_DOWNLOAD == "yes"'
variables:
# may differ from default version above if download and current branch don't use the same version
CURRY_CHECK_VERSION: "2.0.0"
timeout: 3h
timeout: 2h
before_script:
- source ci/make_download.sh
script:
- build_download_pakcs "${DOWNLOAD_VERSION}" tar_version
# instance of .test_download to test src tar
test_download_src:
extends: .test_download
script:
- build_download_pakcs "${DOWNLOAD_VERSION}" src
# instance of .test_download to test amd64-Linux tar
test_download_amd64_linux:
extends: .test_download
script:
- ci/make_download.sh
- build_download_pakcs "${DOWNLOAD_VERSION}" amd64-Linux
# check that the tag version matches pakcs version
# this failing indicates an incorrect tag version or
......@@ -150,17 +169,24 @@ run_test:
- job: "run_make"
artifacts: true
before_script:
- source 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:
- start_section main_script "Running Testsuite"
- time make CI_BUILD=yes runalltests RUNTESTPARAMS=-v
- end_section main_script "Building Manual"
# run for the nightly and release runs
make_manual:
......@@ -176,19 +202,26 @@ make_manual:
artifacts: true
timeout: 4h
before_script:
- source 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:
- start_section main_script "Building Manual"
- time make CI_BUILD=yes COMPILERDATE="${BUILD_DATE}" manual
- echo "MANUAL_JOB_ID=${CI_JOB_ID}" >> manual.env
- end_section main_script
artifacts:
paths:
- docs/**.pdf
......
......@@ -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
```
......@@ -141,7 +142,8 @@ Now should see the generic package `<package>` in the version `<version>`, now y
### Schedule
#### Nightly Test
Only the job `run_download_make` is run, to test the distribution download
Only the jobs `test_download_src` and `test_download_amd64_linux` are run,
to test the distribution downloads.
The pipeline is run with Variable `TEST_DOWNLOAD` set to `yes`
#### Nightly Release Build
......@@ -186,7 +188,7 @@ make | run_make
| |
| +-------------+---------+------------+------------+
| | | | | |
test | | | | run_test check_version run_download_make
test | | | | run_test check_version test_download_src test_download_amd64_linux
| | | |
| | | +----------+-------------------+
| | v v v v
......
......@@ -2,6 +2,8 @@
set -ve
source ci/section_helper.sh
# Generate local version of CurryCheck:
gen_currycheck() {
bin/cypm \
......@@ -21,6 +23,10 @@ gen_currycheck() {
}
build_download_pakcs() {
mkdir -p download
pushd download
VERSION=$1 # version number
DLVERSION=$2 # download version (src, amd64-Linux)
......@@ -28,28 +34,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
popd
}
mkdir -p download
pushd download
build_download_pakcs "${DOWNLOAD_VERSION}" src
build_download_pakcs "${DOWNLOAD_VERSION}" amd64-Linux
end_section "test_${PAKCSVERSION}_${DLVERSION}"
popd
popd # pop "${PAKCSVERSION}"
popd # pop download
}
#!/bin/bash
# Reference: https://docs.gitlab.com/ee/ci/jobs/#custom-collapsible-sections
#
# 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\e[36;1m${title}\e[0m"
}
#
# 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