Skip to content

Commit 2ac4d64

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

File tree

1 file changed

+128
-1
lines changed

1 file changed

+128
-1
lines changed

.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)