Skip to content

Commit 2582275

Browse files
author
Marcin Przepiorowski
committed
runner fix
1 parent 2ac4d64 commit 2582275

File tree

1 file changed

+108
-1
lines changed

1 file changed

+108
-1
lines changed

.github/workflows/build.yml

+108-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ jobs:
286286

287287
osx:
288288
needs: [centos7]
289-
runs-on: macos-11
289+
runs-on: macos-12
290290

291291
steps:
292292
- name: checkout dxtoolkit code
@@ -381,6 +381,113 @@ jobs:
381381
cp ${CDIR}/bin/dxtools.conf.example ${CDIR}/bin/dxusers.csv.example ${CDIR}/dxtoolkit2
382382
383383
384+
cd ${CDIR}
385+
ls -l ./dxtoolkit2
386+
tar czvf ${{ env.FILENAME }} dxtoolkit2/
387+
388+
- name: Upload OSX
389+
uses: actions/upload-artifact@v1
390+
with:
391+
name: osxbuild
392+
path: ${{ env.FILENAME }}
393+
394+
osx-m1:
395+
needs: [centos7]
396+
runs-on: macos-14
397+
398+
steps:
399+
- name: checkout dxtoolkit code
400+
uses: actions/checkout@master
401+
402+
403+
- name: Get the version
404+
id: get_version
405+
run: |
406+
if (echo ${GITHUB_REF} | grep "/tags/" > /dev/null); then
407+
SOURCE_TAG=${GITHUB_REF#refs/tags/}
408+
elif (echo ${GITHUB_REF} | grep "/heads/" > /dev/null); then
409+
SOURCE_TAG=${GITHUB_REF#refs/heads/}
410+
else
411+
exit 1
412+
fi
413+
FILENAME="dxtoolkit2-${SOURCE_TAG}-osx-m1.tar.gz"
414+
echo SOURCE_TAG=$SOURCE_TAG >> $GITHUB_ENV
415+
echo FILENAME=$FILENAME >> $GITHUB_ENV
416+
417+
- name: install perl
418+
run: |
419+
# have a static version of perl 5.30.2_1
420+
#brew uninstall --ignore-dependencies perl
421+
#brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/8ff2935985d6da4f2f463ea2666545e6017c4d54/Formula/perl.rb
422+
#brew install pioro/repo/perl@5.30
423+
#brew install cpanminus
424+
CELL=`brew --prefix perl`
425+
$CELL/bin/perl -MCPAN -e 'install App::cpanminus'
426+
#brew install openssl@1.1
427+
$CELL/bin/cpanm Crypt::CBC@2.33
428+
$CELL/bin/cpanm Crypt::Blowfish
429+
# export OPENSSL_PREFIX=`brew --prefix openssl@1.1`
430+
# echo $OPENSSL_PREFIX
431+
# export LIBS="-d=$OPENSSL_PREFIX"
432+
# $CELL/bin/cpanm --configure-args=$LIBS Filter::Crypto::Decrypt
433+
$CELL/bin/cpanm Filter::Crypto::Decrypt
434+
$CELL/bin/cpanm JSON
435+
$CELL/bin/cpanm Date::Manip
436+
# force requires after 1/1/2020 ?
437+
$CELL/bin/cpanm -f Date::Parse
438+
$CELL/bin/cpanm DateTime::Event::Cron::Quartz
439+
$CELL/bin/cpanm DateTime::Format::DateParse
440+
$CELL/bin/cpanm Text::CSV
441+
$CELL/bin/cpanm LWP::UserAgent
442+
$CELL/bin/cpanm --force Net::SSLeay
443+
$CELL/bin/cpanm Mozilla::CA@20180117
444+
$CELL/bin/cpanm -f IO::Socket::SSL@2.068
445+
$CELL/bin/cpanm LWP::Protocol::https
446+
$CELL/bin/cpanm Term::ReadKey
447+
$CELL/bin/cpanm -f Archive::Zip
448+
$CELL/bin/cpanm utf8
449+
$CELL/bin/cpanm PAR::Packer
450+
$CELL/bin/cpanm List::MoreUtils::PP
451+
452+
- name: Compile
453+
run: |
454+
#CELL=`brew --prefix pioro/repo/perl@5.30`
455+
CELL=`brew --prefix perl`
456+
OPENLIB=`brew --prefix openssl@3`
457+
CDIR=`pwd`
458+
export PP=${CELL}/bin/pp
459+
export LIBS="-l ${OPENLIB}/lib/libssl.dylib -l ${OPENLIB}/lib/libcrypto.dylib"
460+
echo $LIBS
461+
mkdir dxtoolkit2
462+
cd ./lib
463+
mv dbutils.pm dbutils.orig.pm
464+
cat dbutils.orig.pm | sed -e "s/put your encryption key here/${{ secrets.ENCKEY }}/" > dbutils.pm
465+
cd ../bin
466+
$PP -u -I ../lib ${LIBS} -M Text::CSV_PP -M List::MoreUtils::PP -M Crypt::Blowfish \
467+
-F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o ../dxtoolkit2/runner `ls dx_*.pl | xargs`
468+
cd ${CDIR}/dxtoolkit2
469+
#for i in ${CDIR}/bin/dx_*.pl ; do name=`basename -s .pl $i`; ln -s runner $name; done
470+
471+
echo #!/bin/bash > install.sh
472+
echo LIST_OF_SCRIPTS=\( >> install.sh
473+
474+
for i in ${CDIR}/bin/dx_*.pl ; do
475+
name=`basename -s .pl $i`;
476+
echo $name >> install.sh
477+
done
478+
479+
echo \) >> install.sh
480+
echo >> install.sh
481+
echo >> install.sh
482+
echo for i in \"\$\{LIST_OF_SCRIPTS\[\@\]\}\" >> install.sh
483+
echo do >> install.sh
484+
echo echo \$i >> install.sh
485+
echo ln -sf runner \$i >> install.sh
486+
echo done >> install.sh
487+
488+
cp ${CDIR}/bin/dxtools.conf.example ${CDIR}/bin/dxusers.csv.example ${CDIR}/dxtoolkit2
489+
490+
384491
cd ${CDIR}
385492
ls -l ./dxtoolkit2
386493
tar czvf ${{ env.FILENAME }} dxtoolkit2/

0 commit comments

Comments
 (0)