Skip to content

Commit 3ab0c77

Browse files
marcinopsMarcin Przepiorowski
andauthored
v2.4.24 - doc / runner fix (#243)
* runner fix * runner fix --------- Co-authored-by: Marcin Przepiorowski <[email protected]>
1 parent 7f758fb commit 3ab0c77

File tree

2 files changed

+236
-2
lines changed

2 files changed

+236
-2
lines changed

.github/workflows/build.yml

Lines changed: 108 additions & 1 deletion
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/[email protected]
423+
#brew install cpanminus
424+
CELL=`brew --prefix perl`
425+
$CELL/bin/perl -MCPAN -e 'install App::cpanminus'
426+
#brew install [email protected]
427+
$CELL/bin/cpanm Crypt::[email protected]
428+
$CELL/bin/cpanm Crypt::Blowfish
429+
# export OPENSSL_PREFIX=`brew --prefix [email protected]`
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::[email protected]
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/[email protected]`
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/

.github/workflows/develop.yml

Lines changed: 128 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ jobs:
351351

352352
osx:
353353
needs: [centos7]
354-
runs-on: macos-11
354+
runs-on: macos-12
355355

356356
steps:
357357
- name: checkout dxtoolkit code
@@ -476,6 +476,133 @@ jobs:
476476
name: osxbuild
477477
path: ${{ env.FILENAME }}
478478

479+
osx-m1:
480+
needs: [centos7]
481+
runs-on: macos-14
482+
483+
steps:
484+
- name: checkout dxtoolkit code
485+
uses: actions/checkout@master
486+
487+
488+
- name: Get the version
489+
id: get_version
490+
run: |
491+
if (echo ${GITHUB_REF} | grep "/tags/" > /dev/null); then
492+
SOURCE_TAG=${GITHUB_REF#refs/tags/}
493+
elif (echo ${GITHUB_REF} | grep "/heads/" > /dev/null); then
494+
SOURCE_TAG=${GITHUB_REF#refs/heads/}
495+
else
496+
exit 1
497+
fi
498+
FILENAME="dxtoolkit2-${SOURCE_TAG}-osx-m1.tar.gz"
499+
echo SOURCE_TAG=$SOURCE_TAG >> $GITHUB_ENV
500+
echo FILENAME=$FILENAME >> $GITHUB_ENV
501+
502+
- name: install perl
503+
run: |
504+
# have a static version of perl 5.30.2_1
505+
#brew uninstall --ignore-dependencies perl
506+
#brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/8ff2935985d6da4f2f463ea2666545e6017c4d54/Formula/perl.rb
507+
#brew install pioro/repo/[email protected]
508+
#brew install cpanminus
509+
#CELL=`brew --prefix pioro/repo/[email protected]`
510+
CELL=`brew --prefix perl`
511+
#export PATH=$CELL/bin:$PATH
512+
which perl
513+
ls -l $CELL/bin
514+
$CELL/bin/perl -MCPAN -e 'install App::cpanminus'
515+
ls -l $CELL/bin
516+
# cpanm --local-lib=~/perl5 local::lib
517+
# eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
518+
# echo $PERL_MB_OPT
519+
#brew uninstall --ignore-dependencies [email protected]
520+
#curl https://raw.githubusercontent.com/Homebrew/homebrew-core/ffa0f6655cbbbecaafb5334cefaae4c3eb1ffb8a/Formula/openssl%401.1.rb -o openssl\@1.1.rb
521+
#cat ./openssl\@1.1.rb
522+
#brew install --build-from-source ./openssl\@1.1.rb
523+
$CELL/bin/cpanm Crypt::[email protected]
524+
$CELL/bin/cpanm Crypt::Blowfish
525+
# export OPENSSL_PREFIX=`brew --prefix [email protected]`
526+
# echo $OPENSSL_PREFIX
527+
# export LIBS="-d=$OPENSSL_PREFIX"
528+
# $CELL/bin/cpanm --configure-args=$LIBS Filter::Crypto::Decrypt
529+
$CELL/bin/cpanm Filter::Crypto::Decrypt
530+
$CELL/bin/cpanm JSON
531+
$CELL/bin/cpanm Date::Manip
532+
# force requires after 1/1/2020 ?
533+
$CELL/bin/cpanm -f Date::Parse
534+
$CELL/bin/cpanm DateTime::Event::Cron::Quartz
535+
$CELL/bin/cpanm DateTime::Format::DateParse
536+
$CELL/bin/cpanm Text::CSV
537+
$CELL/bin/cpanm LWP::UserAgent
538+
$CELL/bin/cpanm --force Net::SSLeay
539+
$CELL/bin/cpanm Mozilla::CA@20180117
540+
$CELL/bin/cpanm -f IO::Socket::[email protected]
541+
$CELL/bin/cpanm LWP::Protocol::https
542+
$CELL/bin/cpanm Term::ReadKey
543+
$CELL/bin/cpanm -f Archive::Zip
544+
$CELL/bin/cpanm utf8
545+
$CELL/bin/cpanm PAR::Packer
546+
$CELL/bin/cpanm List::MoreUtils::PP
547+
548+
549+
- name: Check log
550+
if: failure()
551+
run: |
552+
cat /Users/runner/.cpanm/work/*/build.log
553+
554+
- name: Compile
555+
run: |
556+
#CELL=`brew --prefix pioro/repo/[email protected]`
557+
CELL=`brew --prefix perl`
558+
OPENLIB=`brew --prefix openssl@3`
559+
CDIR=`pwd`
560+
export PP=${CELL}/bin/pp
561+
export LIBS="-l ${OPENLIB}/lib/libssl.dylib -l ${OPENLIB}/lib/libcrypto.dylib"
562+
echo $LIBS
563+
mkdir dxtoolkit2
564+
cd ./lib
565+
mv dbutils.pm dbutils.orig.pm
566+
cat dbutils.orig.pm | sed -e "s/put your encryption key here/${{ secrets.ENCKEY }}/" > dbutils.pm
567+
mv Toolkit_helpers.pm Toolkit_helpers.orig.pm
568+
cat Toolkit_helpers.orig.pm | sed -r -e "s/([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.?[[:digit:]]?)/\1-dev-${GITHUB_SHA}/" > Toolkit_helpers.pm
569+
grep "version" Toolkit_helpers.pm
570+
cd ../bin
571+
$PP -u -I ../lib ${LIBS} -M Text::CSV_PP -M List::MoreUtils::PP -M Crypt::Blowfish \
572+
-F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o ../dxtoolkit2/runner `ls dx_*.pl | xargs`
573+
cd ${CDIR}/dxtoolkit2
574+
#for i in ${CDIR}/bin/dx_*.pl ; do name=`basename -s .pl $i`; ln -s runner $name; done
575+
576+
echo #!/bin/bash > install.sh
577+
echo LIST_OF_SCRIPTS=\( >> install.sh
578+
579+
for i in ${CDIR}/bin/dx_*.pl ; do
580+
name=`basename -s .pl $i`;
581+
echo $name >> install.sh
582+
done
583+
584+
echo \) >> install.sh
585+
echo >> install.sh
586+
echo >> install.sh
587+
echo for i in \"\$\{LIST_OF_SCRIPTS\[\@\]\}\" >> install.sh
588+
echo do >> install.sh
589+
echo echo \$i >> install.sh
590+
echo ln -sf runner \$i >> install.sh
591+
echo done >> install.sh
592+
593+
cp ${CDIR}/bin/dxtools.conf.example ${CDIR}/bin/dxusers.csv.example ${CDIR}/dxtoolkit2
594+
595+
596+
cd ${CDIR}
597+
ls -l ./dxtoolkit2
598+
tar czvf ${{ env.FILENAME }} dxtoolkit2/
599+
600+
- name: Upload OSX
601+
uses: actions/upload-artifact@v1
602+
with:
603+
name: osxbuild
604+
path: ${{ env.FILENAME }}
605+
479606

480607

481608
amazon2023:

0 commit comments

Comments
 (0)