diff --git a/.gitignore b/.gitignore index 230a1c8d7882614a2e48a2fad8c8ce801c71d737..f056b5fa3b758f9971490e1c67c2277f75550971 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ *~ -build* -site \ No newline at end of file +./build* +./site \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d01e74c1f794f51552e4dcb7df577e2c78d9350..4042eac5d5fa1bcc9eef90394f58846d585c11f2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,17 @@ stages: - build - test +pages: + stage: build + script: + - gitlab/build-doc.sh + - mv build/html public + artifacts: + paths: + - public + only: + - master + build_a: stage: build script: gitlab/build.sh diff --git a/gitlab/build-doc.sh b/gitlab/build-doc.sh new file mode 100755 index 0000000000000000000000000000000000000000..ed006045bcd07334abe604a7cd380b2399a736c1 --- /dev/null +++ b/gitlab/build-doc.sh @@ -0,0 +1,19 @@ +#!/bin/bash +pwd +lscpu +git submodule init +git submodule update +mkdir -p build +ls -ltra build +installpath=$(pwd)/install +mkdir -p ${installpath}/bin +cd build +if [ -n "$1" ]; then + prefix="scl enable $1 -- " + export CXX=/opt/rh/$1/root/usr/bin/g++ + export CC=/opt/rh/$1/root/usr/bin/gcc +fi +shift +${prefix} cmake $* -DCMAKE_INSTALL_PREFIX:PATH=${installpath} .. +${prefix} make -j $(lscpu | awk "/^CPU\(s\):/{print int(\$NF/$(grep 'stage: build' ../.gitlab-ci.yml | wc -l))+1}") doc + diff --git a/src/regex_test.cpp b/src/regex_test.cpp index 0f5c2a5c24e86455b235d2cfbc1f9f9760b74eb4..f1ee48ecaf14d3d096612b8c33ef529f4c007d01 100644 --- a/src/regex_test.cpp +++ b/src/regex_test.cpp @@ -21,7 +21,7 @@ int main(int argc, const char *argv[]) { for (const auto& submatch : match) { std::cout << "match '" << submatch << "'\n"; } - std::cout << "suffix: '" << match.prefix() << "'\n"; + std::cout << "suffix: '" << match.suffix() << "'\n"; } else { std::cout << "no match\n"; }