Skip to content

ubuntu 22 build test #272

ubuntu 22 build test

ubuntu 22 build test #272

Workflow file for this run

name: Perl application
on:
push:
branches:
- "develop"
jobs:
centos7:
runs-on: ubuntu-latest
steps:
- name: checkout dxtoolkit code
uses: actions/checkout@master
- name: add version
run: |
mkdir dxtoolkit2
chmod 777 dxtoolkit2
cd ./lib
mv Toolkit_helpers.pm Toolkit_helpers.orig.pm
cat Toolkit_helpers.orig.pm | sed -r -e "s/([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.?[[:digit:]]?)/\1-dev-${GITHUB_SHA}/" > Toolkit_helpers.pm
grep "version" Toolkit_helpers.pm
- name: Set up a Perl container
#uses: pioro/dxtoolkit@develop
uses: docker://pioro/dxperlcent7:5.26
with:
ENCKEY: ${{ secrets.ENCKEY }}
- name: Get the version
id: get_version
run: |
if (echo ${GITHUB_REF} | grep "/tags/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/tags/}
elif (echo ${GITHUB_REF} | grep "/heads/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/heads/}
else
exit 1
fi
FILENAME="dxtoolkit2-${SOURCE_TAG}-redhat7-installer.tar.gz"
echo SOURCE_TAG=$SOURCE_TAG >> $GITHUB_ENV
echo FILENAME=$FILENAME >> $GITHUB_ENV
- name: add examples
run: |
ls -l
gzip -d dxtoolkit.tar.gz
cp bin/dxtools.conf.example dxtoolkit2/dxtools.conf.example
cp bin/dxusers.csv.example dxtoolkit2/dxusers.csv.example
tar -rvf dxtoolkit.tar dxtoolkit2/dxtools.conf.example dxtoolkit2/dxusers.csv.example
gzip dxtoolkit.tar
- name: compress toolkit
run: |
mv dxtoolkit.tar.gz ${{ env.FILENAME }}
- name: Upload centos 7
uses: actions/upload-artifact@v1
with:
name: cento7build
path: ${{ env.FILENAME }}
docker:
needs: [centos7]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: add version
run: |
mkdir dxtoolkit2
chmod 777 dxtoolkit2
cd ./lib
mv Toolkit_helpers.pm Toolkit_helpers.orig.pm
cat Toolkit_helpers.orig.pm | sed -r -e "s/([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.?[[:digit:]]?)/\1-dev-${GITHUB_SHA}/" > Toolkit_helpers.pm
grep "version" Toolkit_helpers.pm
- name: Docker meta
id: meta
uses: docker/metadata-action@master
with:
images: pioro/dxtoolkit
- name: Set up QEMU
uses: docker/setup-qemu-action@master
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@master
- name: Login to DockerHub
uses: docker/login-action@master
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@master
with:
context: docker/
push: true
tags: ${{ steps.meta.outputs.tags }}
ubuntu:
needs: [centos7]
runs-on: ubuntu-latest
steps:
- name: checkout dxtoolkit code
uses: actions/checkout@master
- name: add version
run: |
mkdir dxtoolkit2
chmod 777 dxtoolkit2
cd ./lib
mv Toolkit_helpers.pm Toolkit_helpers.orig.pm
cat Toolkit_helpers.orig.pm | sed -r -e "s/([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.?[[:digit:]]?)/\1-dev-${GITHUB_SHA}/" > Toolkit_helpers.pm
grep "version" Toolkit_helpers.pm
- name: Set up a Perl container
#uses: pioro/dxtoolkit@develop
uses: docker://pioro/dxperlubuntu18:5.26
with:
ENCKEY: ${{ secrets.ENCKEY }}
- name: Get the version
id: get_version
run: |
if (echo ${GITHUB_REF} | grep "/tags/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/tags/}
elif (echo ${GITHUB_REF} | grep "/heads/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/heads/}
else
exit 1
fi
FILENAME="dxtoolkit2-${SOURCE_TAG}-ubuntu1804-installer.tar.gz"
echo SOURCE_TAG=$SOURCE_TAG >> $GITHUB_ENV
echo FILENAME=$FILENAME >> $GITHUB_ENV
- name: add examples
run: |
gzip -d dxtoolkit.tar.gz
cp bin/dxtools.conf.example dxtoolkit2/dxtools.conf.example
cp bin/dxusers.csv.example dxtoolkit2/dxusers.csv.example
tar -rvf dxtoolkit.tar dxtoolkit2/dxtools.conf.example dxtoolkit2/dxusers.csv.example
gzip dxtoolkit.tar
- name: compress toolkit
run: |
mv dxtoolkit.tar.gz ${{ env.FILENAME }}
- name: Upload ubuntu
uses: actions/upload-artifact@v1
with:
name: ubuntubuild
path: ${{ env.FILENAME }}
ubuntu22:
needs: [centos7]
runs-on: ubuntu-latest
steps:
- name: checkout dxtoolkit code
uses: actions/checkout@master
- name: add version
run: |
mkdir dxtoolkit2
chmod 777 dxtoolkit2
cd ./lib
mv Toolkit_helpers.pm Toolkit_helpers.orig.pm
cat Toolkit_helpers.orig.pm | sed -r -e "s/([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.?[[:digit:]]?)/\1-dev-${GITHUB_SHA}/" > Toolkit_helpers.pm
grep "version" Toolkit_helpers.pm
- name: Set up a Perl container
#uses: pioro/dxtoolkit@develop
uses: docker://pioro/dxperlubuntu22:526
with:
ENCKEY: ${{ secrets.ENCKEY }}
- name: Get the version
id: get_version
run: |
if (echo ${GITHUB_REF} | grep "/tags/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/tags/}
elif (echo ${GITHUB_REF} | grep "/heads/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/heads/}
else
exit 1
fi
FILENAME="dxtoolkit2-${SOURCE_TAG}-ubuntu2204-installer.tar.gz"
echo SOURCE_TAG=$SOURCE_TAG >> $GITHUB_ENV
echo FILENAME=$FILENAME >> $GITHUB_ENV
- name: add examples
run: |
gzip -d dxtoolkit.tar.gz
cp bin/dxtools.conf.example dxtoolkit2/dxtools.conf.example
cp bin/dxusers.csv.example dxtoolkit2/dxusers.csv.example
tar -rvf dxtoolkit.tar dxtoolkit2/dxtools.conf.example dxtoolkit2/dxusers.csv.example
gzip dxtoolkit.tar
- name: compress toolkit
run: |
mv dxtoolkit.tar.gz ${{ env.FILENAME }}
- name: Upload ubuntu
uses: actions/upload-artifact@v1
with:
name: ubuntu22build
path: ${{ env.FILENAME }}
centos6:
needs: [centos7]
runs-on: ubuntu-latest
steps:
- name: checkout dxtoolkit code
uses: actions/checkout@master
- name: add version
run: |
mkdir dxtoolkit2
chmod 777 dxtoolkit2
cd ./lib
mv Toolkit_helpers.pm Toolkit_helpers.orig.pm
cat Toolkit_helpers.orig.pm | sed -r -e "s/([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.?[[:digit:]]?)/\1-dev-${GITHUB_SHA}/" > Toolkit_helpers.pm
grep "version" Toolkit_helpers.pm
- name: Set up a Perl container
#uses: pioro/dxtoolkit@develop
uses: docker://pioro/dxperlcent6:5.26
with:
ENCKEY: ${{ secrets.ENCKEY }}
- name: Get the version
id: get_version
run: |
if (echo ${GITHUB_REF} | grep "/tags/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/tags/}
elif (echo ${GITHUB_REF} | grep "/heads/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/heads/}
else
exit 1
fi
FILENAME="dxtoolkit2-${SOURCE_TAG}-redhat6-installer.tar.gz"
echo SOURCE_TAG=$SOURCE_TAG >> $GITHUB_ENV
echo FILENAME=$FILENAME >> $GITHUB_ENV
- name: add examples
run: |
gzip -d dxtoolkit.tar.gz
cp bin/dxtools.conf.example dxtoolkit2/dxtools.conf.example
cp bin/dxusers.csv.example dxtoolkit2/dxusers.csv.example
tar -rvf dxtoolkit.tar dxtoolkit2/dxtools.conf.example dxtoolkit2/dxusers.csv.example
gzip dxtoolkit.tar
- name: compress toolkit
run: |
mv dxtoolkit.tar.gz ${{ env.FILENAME }}
- name: Upload centos 6
uses: actions/upload-artifact@v1
with:
name: cento6build
path: ${{ env.FILENAME }}
oel8:
needs: [centos7]
runs-on: ubuntu-latest
steps:
- name: checkout dxtoolkit code
uses: actions/checkout@master
- name: add version
run: |
mkdir dxtoolkit2
chmod 777 dxtoolkit2
cd ./lib
mv Toolkit_helpers.pm Toolkit_helpers.orig.pm
cat Toolkit_helpers.orig.pm | sed -r -e "s/([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.?[[:digit:]]?)/\1-dev-${GITHUB_SHA}/" > Toolkit_helpers.pm
grep "version" Toolkit_helpers.pm
- name: Set up a Perl container
#uses: pioro/dxtoolkit@develop
uses: docker://pioro/dxperloel8:5.26
with:
ENCKEY: ${{ secrets.ENCKEY }}
- name: Get the version
id: get_version
run: |
if (echo ${GITHUB_REF} | grep "/tags/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/tags/}
elif (echo ${GITHUB_REF} | grep "/heads/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/heads/}
else
exit 1
fi
FILENAME="dxtoolkit2-${SOURCE_TAG}-redhat8-installer.tar.gz"
echo SOURCE_TAG=$SOURCE_TAG >> $GITHUB_ENV
echo FILENAME=$FILENAME >> $GITHUB_ENV
- name: add examples
run: |
gzip -d dxtoolkit.tar.gz
cp bin/dxtools.conf.example dxtoolkit2/dxtools.conf.example
cp bin/dxusers.csv.example dxtoolkit2/dxusers.csv.example
tar -rvf dxtoolkit.tar dxtoolkit2/dxtools.conf.example dxtoolkit2/dxusers.csv.example
gzip dxtoolkit.tar
- name: compress toolkit
run: |
mv dxtoolkit.tar.gz ${{ env.FILENAME }}
- name: Upload oel 8
uses: actions/upload-artifact@v1
with:
name: oel8build
path: ${{ env.FILENAME }}
Windows:
needs: [centos7]
runs-on: windows-latest
steps:
- name: checkout dxtoolkit code
uses: actions/checkout@master
- name: Get the version
id: get_version
run: |
if (${env:GITHUB_REF} -match "tags") {
$SOURCE_TAG = ${env:GITHUB_REF} -replace 'refs\/tags\/', ''
} elseif (${env:GITHUB_REF} -match "heads") {
$SOURCE_TAG = ${env:GITHUB_REF} -replace 'refs\/heads\/', ''
} else {
exit 1
}
$FILENAME="dxtoolkit2-" + $SOURCE_TAG + "-win64-installer.zip"
echo "SOURCE_TAG=$SOURCE_TAG" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo "FILENAME=$FILENAME" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
shell: powershell
- name: Fix encryption key
run: |
cd D:\a\dxtoolkit\dxtoolkit\lib
ls -l dbutils.pm
mv dbutils.pm dbutils.orig.pm
$raw = (Get-Content -path .\dbutils.orig.pm -Raw) -replace 'put your encryption key here','${{ secrets.ENCKEY_WINDOWS }}'
Set-Content -Path .\dbutils.pm -Value $raw
mv Toolkit_helpers.pm Toolkit_helpers.orig.pm
$raw = Get-Content -path .\Toolkit_helpers.orig.pm -Raw | % { $_ -replace "(version.*?\d+\.\d+\.\d+\.?\d?)","`$1-dev-${env:GITHUB_SHA}" }
Set-Content -Path .\Toolkit_helpers.pm -Value $raw
cd D:\a\dxtoolkit\dxtoolkit\
shell: powershell
# - name: Upload enc
# uses: actions/upload-artifact@v1
# with:
# name: windowsbuild-enc
# path: D:\a\dxtoolkit\dxtoolkit\lib\dbutils.pm
- name: download perl
run: |
mkdir d:\a\perldownload
mkdir d:\a\perl
choco install wget -y
cd d:\a\perldownload
wget.exe "http://strawberryperl.com/download/5.26.3.1/strawberry-perl-5.26.3.1-64bit-portable.zip"
dir d:\a\perldownload\
Expand-Archive "d:\a\perldownload\strawberry-perl-5.26.3.1-64bit-portable.zip" -DestinationPath "d:\a\perl"
shell: powershell
- name: build
run: build\windows_compile.cmd
shell: cmd
- name: add examples
run: |
copy D:\a\dxtoolkit\dxtoolkit\bin\dxtools.conf.example d:\a\dxtoolkit\dxtoolkit\dxtoolkit2
copy D:\a\dxtoolkit\dxtoolkit\bin\dxusers.csv.example d:\a\dxtoolkit\dxtoolkit\dxtoolkit2
- name: compress toolkit
run: |
$NAME = "d:\a\dxtoolkit\dxtoolkit\${{ env.FILENAME }}"
echo ${NAME}
Compress-Archive -Path d:\a\dxtoolkit\dxtoolkit\dxtoolkit2 -DestinationPath ${NAME}
shell: powershell
- name: Upload windows
uses: actions/upload-artifact@v1
with:
name: windowsbuild
path: ${{ env.FILENAME }}
osx:
needs: [centos7]
runs-on: macos-12
steps:
- name: checkout dxtoolkit code
uses: actions/checkout@master
- name: Get the version
id: get_version
run: |
if (echo ${GITHUB_REF} | grep "/tags/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/tags/}
elif (echo ${GITHUB_REF} | grep "/heads/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/heads/}
else
exit 1
fi
FILENAME="dxtoolkit2-${SOURCE_TAG}-osx.tar.gz"
echo SOURCE_TAG=$SOURCE_TAG >> $GITHUB_ENV
echo FILENAME=$FILENAME >> $GITHUB_ENV
- name: install perl
run: |
# have a static version of perl 5.30.2_1
#brew uninstall --ignore-dependencies perl
#brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/8ff2935985d6da4f2f463ea2666545e6017c4d54/Formula/perl.rb
#brew install pioro/repo/[email protected]
#brew install cpanminus
#CELL=`brew --prefix pioro/repo/[email protected]`
CELL=`brew --prefix perl`
#export PATH=$CELL/bin:$PATH
which perl
ls -l $CELL/bin
$CELL/bin/perl -MCPAN -e 'install App::cpanminus'
ls -l $CELL/bin
# cpanm --local-lib=~/perl5 local::lib
# eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
# echo $PERL_MB_OPT
#brew uninstall --ignore-dependencies [email protected]
#curl https://raw.githubusercontent.com/Homebrew/homebrew-core/ffa0f6655cbbbecaafb5334cefaae4c3eb1ffb8a/Formula/openssl%401.1.rb -o openssl\@1.1.rb
#cat ./openssl\@1.1.rb
#brew install --build-from-source ./openssl\@1.1.rb
$CELL/bin/cpanm Crypt::[email protected]
$CELL/bin/cpanm Crypt::Blowfish
# export OPENSSL_PREFIX=`brew --prefix [email protected]`
# echo $OPENSSL_PREFIX
# export LIBS="-d=$OPENSSL_PREFIX"
# $CELL/bin/cpanm --configure-args=$LIBS Filter::Crypto::Decrypt
$CELL/bin/cpanm Filter::Crypto::Decrypt
$CELL/bin/cpanm JSON
$CELL/bin/cpanm Date::Manip
# force requires after 1/1/2020 ?
$CELL/bin/cpanm -f Date::Parse
$CELL/bin/cpanm DateTime::Event::Cron::Quartz
$CELL/bin/cpanm DateTime::Format::DateParse
$CELL/bin/cpanm Text::CSV
$CELL/bin/cpanm LWP::UserAgent
$CELL/bin/cpanm --force Net::SSLeay
$CELL/bin/cpanm Mozilla::CA@20180117
$CELL/bin/cpanm -f IO::Socket::[email protected]
$CELL/bin/cpanm LWP::Protocol::https
$CELL/bin/cpanm Term::ReadKey
$CELL/bin/cpanm -f Archive::Zip
$CELL/bin/cpanm utf8
$CELL/bin/cpanm PAR::Packer
$CELL/bin/cpanm List::MoreUtils::PP
- name: Check log
if: failure()
run: |
cat /Users/runner/.cpanm/work/*/build.log
- name: Compile
run: |
#CELL=`brew --prefix pioro/repo/[email protected]`
CELL=`brew --prefix perl`
OPENLIB=`brew --prefix openssl@3`
CDIR=`pwd`
export PP=${CELL}/bin/pp
export LIBS="-l ${OPENLIB}/lib/libssl.dylib -l ${OPENLIB}/lib/libcrypto.dylib"
echo $LIBS
mkdir dxtoolkit2
cd ./lib
mv dbutils.pm dbutils.orig.pm
cat dbutils.orig.pm | sed -e "s/put your encryption key here/${{ secrets.ENCKEY }}/" > dbutils.pm
mv Toolkit_helpers.pm Toolkit_helpers.orig.pm
cat Toolkit_helpers.orig.pm | sed -r -e "s/([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.?[[:digit:]]?)/\1-dev-${GITHUB_SHA}/" > Toolkit_helpers.pm
grep "version" Toolkit_helpers.pm
cd ../bin
$PP -u -I ../lib ${LIBS} -M Text::CSV_PP -M List::MoreUtils::PP -M Crypt::Blowfish \
-F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o ../dxtoolkit2/runner `ls dx_*.pl | xargs`
cd ${CDIR}/dxtoolkit2
#for i in ${CDIR}/bin/dx_*.pl ; do name=`basename -s .pl $i`; ln -s runner $name; done
echo #!/bin/bash > install.sh
echo LIST_OF_SCRIPTS=\( >> install.sh
for i in ${CDIR}/bin/dx_*.pl ; do
name=`basename -s .pl $i`;
echo $name >> install.sh
done
echo \) >> install.sh
echo >> install.sh
echo >> install.sh
echo for i in \"\$\{LIST_OF_SCRIPTS\[\@\]\}\" >> install.sh
echo do >> install.sh
echo echo \$i >> install.sh
echo ln -sf runner \$i >> install.sh
echo done >> install.sh
cp ${CDIR}/bin/dxtools.conf.example ${CDIR}/bin/dxusers.csv.example ${CDIR}/dxtoolkit2
cd ${CDIR}
ls -l ./dxtoolkit2
tar czvf ${{ env.FILENAME }} dxtoolkit2/
- name: Upload OSX
uses: actions/upload-artifact@v1
with:
name: osxbuild
path: ${{ env.FILENAME }}
osx-m1:
needs: [centos7]
runs-on: macos-14
steps:
- name: checkout dxtoolkit code
uses: actions/checkout@master
- name: Get the version
id: get_version
run: |
if (echo ${GITHUB_REF} | grep "/tags/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/tags/}
elif (echo ${GITHUB_REF} | grep "/heads/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/heads/}
else
exit 1
fi
FILENAME="dxtoolkit2-${SOURCE_TAG}-osx-m1.tar.gz"
echo SOURCE_TAG=$SOURCE_TAG >> $GITHUB_ENV
echo FILENAME=$FILENAME >> $GITHUB_ENV
- name: install perl
run: |
# have a static version of perl 5.30.2_1
#brew uninstall --ignore-dependencies perl
#brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/8ff2935985d6da4f2f463ea2666545e6017c4d54/Formula/perl.rb
#brew install pioro/repo/[email protected]
#brew install cpanminus
#CELL=`brew --prefix pioro/repo/[email protected]`
CELL=`brew --prefix perl`
#export PATH=$CELL/bin:$PATH
which perl
ls -l $CELL/bin
$CELL/bin/perl -MCPAN -e 'install App::cpanminus'
ls -l $CELL/bin
# cpanm --local-lib=~/perl5 local::lib
# eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
# echo $PERL_MB_OPT
#brew uninstall --ignore-dependencies [email protected]
#curl https://raw.githubusercontent.com/Homebrew/homebrew-core/ffa0f6655cbbbecaafb5334cefaae4c3eb1ffb8a/Formula/openssl%401.1.rb -o openssl\@1.1.rb
#cat ./openssl\@1.1.rb
#brew install --build-from-source ./openssl\@1.1.rb
$CELL/bin/cpanm Crypt::[email protected]
$CELL/bin/cpanm Crypt::Blowfish
# export OPENSSL_PREFIX=`brew --prefix [email protected]`
# echo $OPENSSL_PREFIX
# export LIBS="-d=$OPENSSL_PREFIX"
# $CELL/bin/cpanm --configure-args=$LIBS Filter::Crypto::Decrypt
$CELL/bin/cpanm Filter::Crypto::Decrypt
$CELL/bin/cpanm JSON
$CELL/bin/cpanm Date::Manip
# force requires after 1/1/2020 ?
$CELL/bin/cpanm -f Date::Parse
$CELL/bin/cpanm DateTime::Event::Cron::Quartz
$CELL/bin/cpanm DateTime::Format::DateParse
$CELL/bin/cpanm Text::CSV
$CELL/bin/cpanm LWP::UserAgent
$CELL/bin/cpanm --force Net::SSLeay
$CELL/bin/cpanm Mozilla::CA@20180117
$CELL/bin/cpanm -f IO::Socket::[email protected]
$CELL/bin/cpanm LWP::Protocol::https
$CELL/bin/cpanm Term::ReadKey
$CELL/bin/cpanm -f Archive::Zip
$CELL/bin/cpanm utf8
$CELL/bin/cpanm PAR::Packer
$CELL/bin/cpanm List::MoreUtils::PP
- name: Check log
if: failure()
run: |
cat /Users/runner/.cpanm/work/*/build.log
- name: Compile
run: |
#CELL=`brew --prefix pioro/repo/[email protected]`
CELL=`brew --prefix perl`
OPENLIB=`brew --prefix openssl@3`
CDIR=`pwd`
export PP=${CELL}/bin/pp
export LIBS="-l ${OPENLIB}/lib/libssl.dylib -l ${OPENLIB}/lib/libcrypto.dylib"
echo $LIBS
mkdir dxtoolkit2
cd ./lib
mv dbutils.pm dbutils.orig.pm
cat dbutils.orig.pm | sed -e "s/put your encryption key here/${{ secrets.ENCKEY }}/" > dbutils.pm
mv Toolkit_helpers.pm Toolkit_helpers.orig.pm
cat Toolkit_helpers.orig.pm | sed -r -e "s/([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.?[[:digit:]]?)/\1-dev-${GITHUB_SHA}/" > Toolkit_helpers.pm
grep "version" Toolkit_helpers.pm
cd ../bin
$PP -u -I ../lib ${LIBS} -M Text::CSV_PP -M List::MoreUtils::PP -M Crypt::Blowfish \
-F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o ../dxtoolkit2/runner `ls dx_*.pl | xargs`
cd ${CDIR}/dxtoolkit2
#for i in ${CDIR}/bin/dx_*.pl ; do name=`basename -s .pl $i`; ln -s runner $name; done
echo #!/bin/bash > install.sh
echo LIST_OF_SCRIPTS=\( >> install.sh
for i in ${CDIR}/bin/dx_*.pl ; do
name=`basename -s .pl $i`;
echo $name >> install.sh
done
echo \) >> install.sh
echo >> install.sh
echo >> install.sh
echo for i in \"\$\{LIST_OF_SCRIPTS\[\@\]\}\" >> install.sh
echo do >> install.sh
echo echo \$i >> install.sh
echo ln -sf runner \$i >> install.sh
echo done >> install.sh
cp ${CDIR}/bin/dxtools.conf.example ${CDIR}/bin/dxusers.csv.example ${CDIR}/dxtoolkit2
cd ${CDIR}
ls -l ./dxtoolkit2
tar czvf ${{ env.FILENAME }} dxtoolkit2/
- name: Upload OSX
uses: actions/upload-artifact@v1
with:
name: osxbuild
path: ${{ env.FILENAME }}
amazon2023:
needs: [centos7]
runs-on: ubuntu-latest
steps:
- name: checkout dxtoolkit code
uses: actions/checkout@master
- name: add version
run: |
mkdir dxtoolkit2
chmod 777 dxtoolkit2
cd ./lib
mv Toolkit_helpers.pm Toolkit_helpers.orig.pm
cat Toolkit_helpers.orig.pm | sed -r -e "s/([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.?[[:digit:]]?)/\1-dev-${GITHUB_SHA}/" > Toolkit_helpers.pm
grep "version" Toolkit_helpers.pm
- name: Set up a Perl container
#uses: pioro/dxtoolkit@develop
uses: docker://pioro/pioroamazon:2023
with:
ENCKEY: ${{ secrets.ENCKEY }}
- name: Get the version
id: get_version
run: |
if (echo ${GITHUB_REF} | grep "/tags/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/tags/}
elif (echo ${GITHUB_REF} | grep "/heads/" > /dev/null); then
SOURCE_TAG=${GITHUB_REF#refs/heads/}
else
exit 1
fi
FILENAME="dxtoolkit2-${SOURCE_TAG}-amazon2023-installer.tar.gz"
echo SOURCE_TAG=$SOURCE_TAG >> $GITHUB_ENV
echo FILENAME=$FILENAME >> $GITHUB_ENV
- name: add examples
run: |
ls -l
gzip -d dxtoolkit.tar.gz
cp bin/dxtools.conf.example dxtoolkit2/dxtools.conf.example
cp bin/dxusers.csv.example dxtoolkit2/dxusers.csv.example
tar -rvf dxtoolkit.tar dxtoolkit2/dxtools.conf.example dxtoolkit2/dxusers.csv.example
gzip dxtoolkit.tar
- name: compress toolkit
run: |
mv dxtoolkit.tar.gz ${{ env.FILENAME }}
- name: Upload amazon 2023
uses: actions/upload-artifact@v1
with:
name: amazon2023
path: ${{ env.FILENAME }}