Author: richter Date: Thu Sep 21 04:59:58 2023 New Revision: 1912453 URL: http://svn.apache.org/viewvc?rev=1912453&view=rev Log: Add automated tests via gitlab ci
Added: perl/embperl/trunk/.gitlab-ci.d/ perl/embperl/trunk/.gitlab-ci.d/build-container.yml perl/embperl/trunk/.gitlab-ci.yml Added: perl/embperl/trunk/.gitlab-ci.d/build-container.yml URL: http://svn.apache.org/viewvc/perl/embperl/trunk/.gitlab-ci.d/build-container.yml?rev=1912453&view=auto ============================================================================== --- perl/embperl/trunk/.gitlab-ci.d/build-container.yml (added) +++ perl/embperl/trunk/.gitlab-ci.d/build-container.yml Thu Sep 21 04:59:58 2023 @@ -0,0 +1,97 @@ +spec: + inputs: + imagename: + imagetag: +--- + + +container-$[[ inputs.imagename ]]-$[[ inputs.imagetag ]]: + stage: .pre + needs: [] + tags: + - shell + before_script: + - mkdir docker + - cd docker + - | + cat - <<EOD > install-pre.sh + if test -e /usr/bin/yum + then + yum -y install perl gcc perl-CGI libxml2-devel libxslt-devel|| exit 1 + if egrep 'almalinux|rocky' /etc/os-release + then + yum -y install epel-release || exit 1 + dnf --enablerepo=epel -y install mod_perl-devel perl-Apache-Session perl-ExtUtils-PkgConfig || exit 1 + cpan LWP::UserAgent || exit 1 + else + yum -y install mod_perl-devel perl-Apache-Session perl-ExtUtils-PkgConfig || exit 1 + fi + cpan LWP::UserAgent || exit 1 + cpan ExtUtils::XSBuilder || exit 2 + cpan -f Apache::SessionX || exit 3 + fi + if test -e /usr/bin/apt + then + apt update || exit 3 + apt -y install libextutils-xsbuilder-perl libapache2-mod-perl2-dev apache2-dev libcgi-pm-perl libapache-sessionx-perl libextutils-pkgconfig-perl libxml2-dev libxslt1-dev || exit 4 + fi + EOD + - | + cat - <<EOD > Dockerfile + from $[[ inputs.imagename ]]:$[[ inputs.imagetag ]] + copy install-pre.sh / + run bash install-pre.sh + EOD + - cat Dockerfile + - ls -l + - pwd + #- env | sort + script: + - pwd + - docker build . -t ep_$[[ inputs.imagename ]]:$[[ inputs.imagetag ]] + +build-offline-$[[ inputs.imagename ]]-$[[ inputs.imagetag ]]: + stage: build + needs: ["container-$[[ inputs.imagename ]]-$[[ inputs.imagetag ]]"] + image: + name: ep_$[[ inputs.imagename ]]:$[[ inputs.imagetag ]] + pull_policy: never + artifacts: + untracked: true + script: + - perl xsbuilder/source_scan.pl + - perl xsbuilder/xs_generate.pl + - APACHE_SRC=- perl Makefile.PL + - make + +test-offline-$[[ inputs.imagename ]]-$[[ inputs.imagetag ]]: + needs: ["build-offline-$[[ inputs.imagename ]]-$[[ inputs.imagetag ]]"] + image: + name: ep_$[[ inputs.imagename ]]:$[[ inputs.imagetag ]] + pull_policy: never + stage: test + script: + - make test + +build-apache-$[[ inputs.imagename ]]-$[[ inputs.imagetag ]]: + stage: build + needs: ["container-$[[ inputs.imagename ]]-$[[ inputs.imagetag ]]"] + image: + name: ep_$[[ inputs.imagename ]]:$[[ inputs.imagetag ]] + pull_policy: never + artifacts: + untracked: true + script: + - perl xsbuilder/source_scan.pl + - perl xsbuilder/xs_generate.pl + - perl Makefile.PL + - make + +test-apache-$[[ inputs.imagename ]]-$[[ inputs.imagetag ]]: + needs: ["build-apache-$[[ inputs.imagename ]]-$[[ inputs.imagetag ]]"] + image: + name: ep_$[[ inputs.imagename ]]:$[[ inputs.imagetag ]] + pull_policy: never + stage: test + script: + - make test \ No newline at end of file Added: perl/embperl/trunk/.gitlab-ci.yml URL: http://svn.apache.org/viewvc/perl/embperl/trunk/.gitlab-ci.yml?rev=1912453&view=auto ============================================================================== --- perl/embperl/trunk/.gitlab-ci.yml (added) +++ perl/embperl/trunk/.gitlab-ci.yml Thu Sep 21 04:59:58 2023 @@ -0,0 +1,38 @@ +include: + - local: .gitlab-ci.d/build-container.yml + inputs: + imagename: almalinux + imagetag: "9" + - local: .gitlab-ci.d/build-container.yml + inputs: + imagename: almalinux + imagetag: "8" + - local: .gitlab-ci.d/build-container.yml + inputs: + imagename: fedora + imagetag: "38" + - local: .gitlab-ci.d/build-container.yml + inputs: + imagename: fedora + imagetag: "37" + - local: .gitlab-ci.d/build-container.yml + inputs: + imagename: debian + imagetag: "12" + - local: .gitlab-ci.d/build-container.yml + inputs: + imagename: debian + imagetag: "11" + - local: .gitlab-ci.d/build-container.yml + inputs: + imagename: ubuntu + imagetag: "22.04" + - local: .gitlab-ci.d/build-container.yml + inputs: + imagename: ubuntu + imagetag: "23.04" + - local: .gitlab-ci.d/build-container.yml + inputs: + imagename: amazonlinux + imagetag: "2" + --------------------------------------------------------------------- To unsubscribe, e-mail: embperl-cvs-unsubscr...@perl.apache.org For additional commands, e-mail: embperl-cvs-h...@perl.apache.org