Update renv.lock #270
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Download source repo | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: Install build dependencies | |
run: | | |
sudo apt update | |
sudo apt install latexmk texlive-extra-utils texlive-latex-extra texlive-plain-generic biber texlive-bibtex-extra texlive-science texlive-font-utils texlive-pictures | |
pip3 install tox==3.25.1 | |
- name: make | |
run: make | |
- name: make release | |
run: make release | |
- name: Upload installation artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: targz | |
path: PsN-*.tar.gz | |
- name: Upload documentation artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: docs | |
path: doc/*.pdf | |
get-nonmem: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Cache NONMEM | |
id: cache-nonmem | |
uses: actions/cache@v2 | |
with: | |
path: 751.zip | |
key: nonmem-751 | |
- name: Download NONMEM | |
if: steps.cache-nonmem.outputs.cache-hit != 'true' | |
run: | | |
sudo apt install lynx | |
echo 'key /' >>lynxcmds | |
echo 'key 7' >>lynxcmds | |
echo 'key 5' >>lynxcmds | |
echo 'key 1' >>lynxcmds | |
echo 'key ^J' >>lynxcmds | |
echo 'key ^J' >>lynxcmds | |
echo 'key /' >>lynxcmds | |
echo 'key z' >>lynxcmds | |
echo 'key i' >>lynxcmds | |
echo 'key p' >>lynxcmds | |
echo 'key ^J' >>lynxcmds | |
echo 'key d' >>lynxcmds | |
echo 'key ^J' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key <delete>' >>lynxcmds | |
echo 'key 7' >>lynxcmds | |
echo 'key 5' >>lynxcmds | |
echo 'key 1' >>lynxcmds | |
echo 'key .' >>lynxcmds | |
echo 'key z' >>lynxcmds | |
echo 'key i' >>lynxcmds | |
echo 'key p' >>lynxcmds | |
echo 'key ^J' >>lynxcmds | |
echo 'key Q' >>lynxcmds | |
lynx -accept-all-cookies nonmem.iconplc.com -cmd_script=lynxcmds | |
- name: Upload cache workaround | |
uses: actions/upload-artifact@v2 | |
with: | |
name: cache-workaround | |
path: 751.zip | |
test-ubuntu: | |
needs: [build, get-nonmem] | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: targz | |
- name: Cache NONMEM | |
id: cache-nonmem | |
uses: actions/cache@v2 | |
with: | |
path: 751.zip | |
key: nonmem-751 | |
- name: Unzip NONMEM | |
run: unzip -P $ZIP_KEY 751.zip | |
env: | |
ZIP_KEY: ${{secrets.ZIP_KEY}} | |
- name: Install gfortran | |
run: sudo apt install gfortran | |
- name: Install NONMEM | |
run: | | |
cd nm751CD | |
/bin/bash SETUP75 $(realpath .) $(realpath ../nm751) gfortran y ar same rec q | |
- name: NONMEM license | |
run: echo $LICENSE_KEY >nm751/license/nonmem.lic | |
env: | |
LICENSE_KEY: ${{secrets.LICENSE_KEY}} | |
- name: Extract PsN | |
run: tar -zxvf PsN-*.tar.gz | |
- name: Install Perl dependencies | |
run: | | |
sudo cpan -T Math::Random | |
sudo cpan -T MouseX::Params::Validate | |
sudo cpan -T Math::SigFigs | |
- name: Install Perl and R dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y libmath-random-free-perl libconfig-tiny-perl libstatistics-distributions-perl libfile-homedir-perl libfile-copy-recursive-perl libyaml-perl libcapture-tiny-perl libmath-matrixreal-perl libtest-exception-perl libmouse-perl libarchive-zip-perl libfile-copy-recursive-perl r-base pandoc libpq-dev libcairo2-dev libssl-dev libcurl4-openssl-dev libmariadb-dev libgmp-dev libmpfr-dev libxml2-dev libudunits2-dev libblas-dev liblapack-dev libmagick++-dev | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.11' | |
- name: Install PsN | |
run: cd PsN-Source; sudo perl setup.pl -auto | |
- name: Update psn.conf | |
run: | | |
export LIBPATH=$(find /usr/local/share/perl/ -type d -name '5.*') | |
export PSNPATH=$(find $LIBPATH -type d -name 'PsN_[0-9]*') | |
export NMPATH=$(realpath nm751) | |
sudo sed -i "/\\[nm_versions\\]/a default=$NMPATH,7.5.1" $PSNPATH/psn.conf | |
- name: Run unit tests | |
run: | | |
export LIBPATH=$(find /usr/local/share/perl/ -type d -name '5.*') | |
export TESTPATH=$(find $LIBPATH -type d -name 'PsN_test_[0-9]*') | |
cd $TESTPATH | |
prove -r -j8 unit | |
- name: Run system tests | |
run: | | |
export LIBPATH=$(find /usr/local/share/perl/ -type d -name '5.*') | |
export TESTPATH=$(find $LIBPATH -type d -name 'PsN_test_[0-9]*') | |
cd $TESTPATH | |
prove -r -j3 system | |
- name: Upload failed system test directories artifact | |
uses: actions/upload-artifact@v2 | |
if: ${{ failure() }} | |
with: | |
name: system-tests-ubuntu | |
path: /tmp/PsN-test_system* | |
test-macos: | |
needs: [build, get-nonmem] | |
runs-on: macos-11 | |
steps: | |
- name: Download installation tarball | |
uses: actions/download-artifact@v2 | |
with: | |
name: targz | |
- name: Unpack installation tarball | |
run: tar -zxvf PsN-*.tar.gz | |
- name: Install system dependencies | |
run: brew install cairo mariadb-connector-c openssl@1.1 coreutils gnu-sed r | |
- name: Setup gfortran | |
run: | | |
sudo ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran | |
sudo mkdir /usr/local/gfortran | |
sudo ln -s /usr/local/Cellar/gcc@11/11.3.0_1/lib/gcc/11 /usr/local/gfortran/lib | |
- name: Setup pandoc | |
uses: r-lib/actions/setup-pandoc@v1 | |
- name: Get NONMEM | |
id: cache-nonmem | |
uses: actions/cache@v2 | |
with: | |
path: 751.zip | |
key: nonmem-751 | |
- name: Unzip NONMEM | |
run: unzip -P $ZIP_KEY 751.zip | |
env: | |
ZIP_KEY: ${{secrets.ZIP_KEY}} | |
- name: Install NONMEM | |
run: | | |
cd nm751CD | |
/bin/bash SETUP75 $(realpath .) $(realpath ../nm751) gfortran y ar same rec q | |
- name: NONMEM license | |
run: echo $LICENSE_KEY >nm751/license/nonmem.lic | |
env: | |
LICENSE_KEY: ${{secrets.LICENSE_KEY}} | |
- name: Install Perl dependencies | |
run: | | |
sudo cpan -T Math::Random | |
sudo cpan -T Math::Random::Free | |
sudo cpan -T Math::MatrixReal | |
sudo cpan -T MouseX::Params::Validate | |
sudo cpan -T Archive::Zip | |
sudo cpan -T Test::Exception | |
sudo cpan -T Mouse | |
sudo cpan -T YAML | |
sudo cpan -T Capture::Tiny | |
sudo cpan -T File::Copy::Recursive | |
sudo cpan -T File::HomeDir | |
sudo cpan -T Config::Tiny | |
sudo cpan -T Math::SigFigs | |
sudo cpan -T Statistics::Distributions | |
- name: Install PsN | |
run: cd PsN-Source; perl setup.pl -auto | |
- name: Update psn.conf | |
run: | | |
export PSNPATH=$(find /usr/local/Cellar/perl/ -type d -name 'PsN_[0-9]*') | |
export NMPATH=$(realpath nm751) | |
sudo gsed -i "/\\[nm_versions\\]/a default=$NMPATH,7.5.1" $PSNPATH/psn.conf | |
- name: Run unit tests | |
run: | | |
export TESTPATH=$(find /usr/local/Cellar/perl/ -type d -name 'PsN_test_[0-9]*') | |
cd $TESTPATH | |
prove -r -j8 unit | |
- name: Save TMPDIR | |
run: echo "TEMPDIR=$TMPDIR" >> $GITHUB_ENV | |
- name: Run system tests | |
run: | | |
export TESTPATH=$(find /usr/local/Cellar/perl/ -type d -name 'PsN_test_[0-9]*') | |
cd $TESTPATH | |
prove -r -j4 system | |
- name: Upload failed system test directories artifact | |
uses: actions/upload-artifact@v2 | |
if: ${{ failure() }} | |
with: | |
name: system-tests-macos | |
path: ${{ env.TEMPDIR }}/PsN-test_system* | |
build-windows: | |
needs: build | |
runs-on: windows-2019 | |
steps: | |
- name: Download installation tarball | |
uses: actions/download-artifact@v2 | |
with: | |
name: targz | |
- name: Unpack installation tarball | |
run: tar -zxvf PsN-*.tar.gz | |
shell: bash | |
- name: Download Strawberry Perl | |
uses: suisei-cn/actions-download-file@v1 | |
with: | |
url: http://strawberryperl.com/download/5.22.3.1/strawberry-perl-5.22.3.1-64bit-portable.zip | |
target: downloads/ | |
- name: Download R | |
uses: suisei-cn/actions-download-file@v1 | |
with: | |
url: https://cran.r-project.org/bin/windows/base/old/4.0.3/R-4.0.3-win.exe | |
target: downloads/ | |
- name: Download Python | |
uses: suisei-cn/actions-download-file@v1 | |
with: | |
url: https://github.com/winpython/winpython/releases/download/7.0.20231126final/Winpython64-3.11.6.0dot.exe | |
target: downloads/ | |
- name: Download Pandoc | |
uses: suisei-cn/actions-download-file@v1 | |
with: | |
url: https://github.com/jgm/pandoc/releases/download/2.5/pandoc-2.5-windows-i386.zip | |
target: downloads/ | |
- name: Show downloads | |
run: dir downloads | |
shell: cmd | |
- name: Create installation directory | |
run: | | |
md -Name installer | |
md -Name installer\strawberry | |
- name: Extract winpython | |
run: | | |
copy downloads\Winpython64-3.11.6.0dot.exe installer | |
cd installer | |
Winpython64-3.11.6.0dot.exe -y | |
del Winpython64-3.11.6.0dot.exe | |
rename WPy64-31160 python | |
shell: cmd | |
- name: Install Pharmpy dependencies | |
run: | |
installer\python\python-3.11.6.amd64\python.exe -m pip install -r PsN-Source\requirements.txt | |
shell: cmd | |
- name: Install Pharmpy | |
run: installer/python/python-3.11.6.amd64/python.exe -m pip install PsN-Source/pharmpy-core*.zip | |
shell: bash | |
- name: Move phampy executables | |
run: | | |
mv installer/python/python-3.11.6.amd64/Scripts/psn-pharmpy-wrapper.exe installer/python/python-3.11.6.amd64/ | |
mv installer/python/python-3.11.6.amd64/Scripts/pharmpy.exe installer/python/python-3.11.6.amd64/ | |
shell: bash | |
- name: Extract Strawberry Perl | |
run: tar -xf downloads/strawberry-perl-5.22.3.1-64bit-portable.zip -C installer\strawberry | |
- name: Install Math::Random | |
run: | | |
set PATH=%CD%\installer\strawberry\perl\site\bin;%CD%\installer\strawberry\perl\bin;%CD%\installer\strawberry\c\bin;%PATH% | |
cpanm Math::Random --notest | |
shell: cmd | |
- name: Install Math::Random::Free | |
run: | | |
set PATH=%CD%\installer\strawberry\perl\site\bin;%CD%\installer\strawberry\perl\bin;%CD%\installer\strawberry\c\bin;%PATH% | |
cpanm Math::Random::Free --notest | |
shell: cmd | |
- name: Install Math::MatrixReal | |
run: | | |
set PATH=%CD%\installer\strawberry\perl\site\bin;%CD%\installer\strawberry\perl\bin;%CD%\installer\strawberry\c\bin;%PATH% | |
cpanm Math::MatrixReal --notest | |
shell: cmd | |
- name: Install MouseX::Params::Validate | |
run: | | |
set PATH=%CD%\installer\strawberry\perl\site\bin;%CD%\installer\strawberry\perl\bin;%CD%\installer\strawberry\c\bin;%PATH% | |
cpanm MouseX::Params::Validate --notest | |
shell: cmd | |
- name: Install Params::Validate | |
run: | | |
set PATH=%CD%\installer\strawberry\perl\site\bin;%CD%\installer\strawberry\perl\bin;%CD%\installer\strawberry\c\bin;%PATH% | |
cpanm Params::Validate --notest | |
shell: cmd | |
- name: Install YAML | |
run: | | |
set PATH=%CD%\installer\strawberry\perl\site\bin;%CD%\installer\strawberry\perl\bin;%CD%\installer\strawberry\c\bin;%PATH% | |
cpanm YAML --notest | |
shell: cmd | |
- name: Install Mouse | |
run: | | |
set PATH=%CD%\installer\strawberry\perl\site\bin;%CD%\installer\strawberry\perl\bin;%CD%\installer\strawberry\c\bin;%PATH% | |
cpanm Mouse --notest | |
shell: cmd | |
- name: Install Capture::Tiny | |
run: | | |
set PATH=%CD%\installer\strawberry\perl\site\bin;%CD%\installer\strawberry\perl\bin;%CD%\installer\strawberry\c\bin;%PATH% | |
cpanm Capture::Tiny --notest | |
shell: cmd | |
- name: Install File::Copy::Recursive | |
run: | | |
set PATH=%CD%\installer\strawberry\perl\site\bin;%CD%\installer\strawberry\perl\bin;%CD%\installer\strawberry\c\bin;%PATH% | |
cpanm File::Copy::Recursive --notest | |
shell: cmd | |
- name: Install Config::Tiny | |
run: | | |
set PATH=%CD%\installer\strawberry\perl\site\bin;%CD%\installer\strawberry\perl\bin;%CD%\installer\strawberry\c\bin;%PATH% | |
cpanm Config::Tiny --notest | |
shell: cmd | |
- name: Install File::HomeDir | |
run: | | |
set PATH=%CD%\installer\strawberry\perl\site\bin;%CD%\installer\strawberry\perl\bin;%CD%\installer\strawberry\c\bin;%PATH% | |
cpanm File::HomeDir --notest | |
shell: cmd | |
- name: Install Math::SigFigs | |
run: | | |
set PATH=%CD%\installer\strawberry\perl\site\bin;%CD%\installer\strawberry\perl\bin;%CD%\installer\strawberry\c\bin;%PATH% | |
cpanm Math::SigFigs --notest | |
shell: cmd | |
- name: Install Statistics::Distributions | |
run: | | |
set PATH=%CD%\installer\strawberry\perl\site\bin;%CD%\installer\strawberry\perl\bin;%CD%\installer\strawberry\c\bin;%PATH% | |
cpanm Statistics::Distributions --notest | |
shell: cmd | |
- name: Install PsN | |
run: | | |
set PATH=%CD%\installer\strawberry\perl\site\bin;%CD%\installer\strawberry\perl\bin;%CD%\installer\strawberry\c\bin;%PATH% | |
cd PsN-Source | |
perl setup.pl relative -auto | |
shell: cmd | |
- name: Extract pandoc | |
run: tar -xf downloads/pandoc-2.5-windows-i386.zip -C installer | |
- name: Move pandoc | |
run: mv installer/pandoc-2.5-windows-i386/pandoc.exe installer/strawberry/perl/bin | |
shell: bash | |
- name: Install Rtools40 | |
shell: pwsh | |
run: | | |
if(Test-path c:\\rtools40){ | |
echo "rtools40 is preinstalled" | |
} else { | |
choco install --confirm --no-progress --allow-downgrade rtools --version 4.0.0.20220206 | |
} | |
echo "c:\\rtools40\\usr\\bin" >> $GITHUB_PATH | |
- name: Install R | |
run: downloads\R-4.0.3-win.exe /VERYSILENT /DIR="installer\R" | |
shell: cmd | |
- name: Install renv | |
run: | | |
md installer\Rlib | |
installer\R\bin\x64\Rscript.exe -e "install.packages('renv', lib='installer/Rlib', repos='http://cran.us.r-project.org')" | |
shell: cmd | |
- name: Install R dependencies | |
run: installer\R\bin\x64\Rscript.exe -e ".libPaths('installer/Rlib'); options(renv.config.copy.method='R'); options(renv.consent=TRUE); renv::settings$use.cache(FALSE); renv::restore(library='installer/Rlib', lockfile='PsN-Source/PsNR/renv.lock'); Sys.setenv(TZ='Europe/Berlin', LC_TIME='C', LC_MONETARY='C'); remotes::install_local('PsN-Source/PsNR', lib='installer/Rlib', repos=NULL, dependencies=F, INSTALL_opts=c('--no-multiarch'))" | |
shell: cmd | |
- name: Move dlls | |
run: | | |
mv installer/strawberry/c/bin/libxml2-2__.dll installer/strawberry/perl/bin/ | |
mv installer/strawberry/c/bin/liblzma-5__.dll installer/strawberry/perl/bin/ | |
mv installer/strawberry/c/bin/libiconv-2__.dll installer/strawberry/perl/bin/ | |
mv installer/strawberry/c/bin/zlib1__.dll installer/strawberry/perl/bin/ | |
shell: bash | |
- name: Dir PsN | |
run: dir installer\strawberry\perl\site\lib | |
shell: cmd | |
- name: Update psn.conf | |
run: | | |
export PSNPATH=$(find installer/strawberry/perl/site/lib/ -type d -name 'PsN_[0-9]*') | |
echo PYTHON_PATH=../../../../../python/python-3.11.6.amd64 >tempfile | |
echo R=../../../../../R/bin/R.exe >>tempfile | |
echo R_LIB_PATH=../../../../../Rlib >>tempfile | |
cat ${PSNPATH}/psn.conf >>tempfile | |
mv tempfile ${PSNPATH}/psn.conf | |
shell: bash | |
- name: Clean R packages | |
run: | | |
echo 'import pathlib' >clean.py | |
echo 'import shutil' >>clean.py | |
echo 'import itertools' >>clean.py | |
echo 'rlib_path = pathlib.Path("installer") / "Rlib"' >>clean.py | |
echo 'rlibrary_path = pathlib.Path("installer") / "R" / "library"' >>clean.py | |
echo 'for package in itertools.chain(rlib_path.iterdir(), rlibrary_path.iterdir()):' >>clean.py | |
echo ' subdirs = ["html", "help", "doc", "libs/i386"]' >>clean.py | |
echo ' for subdir in subdirs:' >>clean.py | |
echo ' path = package / subdir' >>clean.py | |
echo ' if path.exists():' >>clean.py | |
echo ' shutil.rmtree(str(path))' >>clean.py | |
installer/python/python-3.11.6.amd64/python.exe clean.py | |
shell: bash | |
- name: Remove unnecessary files | |
run: | | |
cd installer | |
del pandoc-2.5-windows-i386\pandoc-citeproc.exe | |
del pandoc-2.5-windows-i386\*.html | |
del R\unins000.dat | |
del R\unins000.exe | |
rmdir R\tests /s /q | |
rmdir R\doc /s /q | |
rmdir R\Tcl /s /q | |
rmdir R\modules\i386 /s /q | |
rmdir R\etc\i386 /s /q | |
rmdir R\bin\i386 /s /q | |
del R\bin\config.sh | |
del strawberry\README.txt | |
del strawberry\DISTRIBUTIONS.txt | |
rmdir strawberry\win32 /s /q | |
rmdir strawberry\data /s /q | |
rmdir strawberry\cpan /s /q | |
del strawberry\c\bin\c++.exe | |
del strawberry\c\bin\c++filt.exe | |
del strawberry\c\bin\cpp.exe | |
del strawberry\c\bin\g++.exe | |
del strawberry\c\bin\x86_64-w64-mingw32-c++.exe | |
del strawberry\c\bin\x86_64-w64-mingw32-g++.exe | |
del python\*.exe | |
rmdir python\notebooks /s /q | |
rmdir python\scripts /s /q | |
rmdir python\python-3.11.6.amd64\tcl /s /q | |
rmdir python\python-3.11.6.amd64\share /s /q | |
rmdir python\python-3.11.6.amd64\Tools /s /q | |
rmdir python\python-3.11.6.amd64\Doc /s /q | |
rmdir python\python-3.11.6.amd64\Scripts /s /q | |
del python\python-3.11.6.amd64\NEWS.txt | |
rmdir python\python-3.11.6.amd64\libs /s /q | |
rmdir python\python-3.11.6.amd64\include /s /q | |
shell: cmd | |
- name: Show installer directory | |
run: dir installer | |
shell: cmd | |
- name: Create installation package | |
run: | | |
export filename=`ls PsN-*.tar.gz -1` | |
export dirname="${filename%.tar.gz}" | |
export packagename="${filename%.tar.gz}-windows-64bit.zip" | |
mv installer $dirname | |
7z a $packagename $dirname | |
echo "packagename=${packagename}" >> $GITHUB_ENV | |
shell: bash | |
- name: Upload Windows package | |
uses: actions/upload-artifact@v2 | |
with: | |
name: win-installer | |
path: ${{ env.packagename }} | |
test-windows: | |
needs: [build-windows, get-nonmem] | |
runs-on: windows-2019 | |
steps: | |
- name: Download installation tarball | |
uses: actions/download-artifact@v2 | |
with: | |
name: win-installer | |
- name: Unzip installer | |
run: 7z x *.zip | |
shell: cmd | |
- name: Get NONMEM | |
uses: actions/download-artifact@v2 | |
with: | |
name: cache-workaround | |
- name: Unzip NONMEM | |
run: 7z x 751.zip -p%ZIP_KEY% | |
env: | |
ZIP_KEY: ${{secrets.ZIP_KEY}} | |
shell: cmd | |
- name: NONMEM license | |
run: echo $LICENSE_KEY >nm751CD/nonmem.lic | |
env: | |
LICENSE_KEY: ${{secrets.LICENSE_KEY}} | |
shell: bash | |
- name: Install NONMEM | |
run: | | |
set PATH=installer\strawberry\c\bin\;%PATH% | |
set INSTALLDIR=%CD%\nm751 | |
cd nm751CD | |
SETUP75.bat %CD% %INSTALLDIR% gfortran y ar same rec q | |
shell: cmd | |
- name: Update psn.conf | |
run: | | |
export PSNPATH=$(find . -type d -name 'PsN_[0-9]*') | |
export NMPATH=$(realpath nm751) | |
export NMPATH=D:${NMPATH:2} | |
sed -i "/\\[nm_versions\\]/a default=$NMPATH,7.5.1" $PSNPATH/psn.conf | |
cat $PSNPATH/psn.conf | |
shell: bash | |
- name: Find tests | |
run: | | |
export PSNPATH=$(find $PWD -maxdepth 1 -type d -name 'PsN-*') | |
export PSNPATH=D:${PSNPATH:2} | |
export TESTPATH=$(find $PSNPATH -type d -name 'PsN_test_[0-9]*') | |
export TESTPATH=D:${TESTPATH:2} | |
export LIBPATH=$(find $PSNPATH -type d -name 'PsN_[0-9]*') | |
export LIBPATH=D:${LIBPATH:2} | |
echo PSNPATH=$PSNPATH | |
echo TESTPATH=$TESTPATH | |
echo LIBPATH=$LIBPATH | |
echo "PSNPATH=$PSNPATH" >> $GITHUB_ENV | |
echo "TESTPATH=$TESTPATH" >> $GITHUB_ENV | |
echo "LIBPATH=$LIBPATH" >> $GITHUB_ENV | |
shell: bash | |
- name: Edit test paths | |
run: | | |
cd $TESTPATH | |
echo 'found_libpath = False' >edit.py | |
echo 'found_path = False' >>edit.py | |
echo 'with open("includes.pm", "r") as sh:' >>edit.py | |
echo ' with open("tempy", "w") as dh:' >>edit.py | |
echo ' for line in sh:' >>edit.py | |
echo ' stripped = line.strip()' >>edit.py | |
echo ' if not found_libpath and stripped.startswith("my $libpath"):' >>edit.py | |
echo " path = '$LIBPATH/'" >>edit.py | |
echo " print(f\"my \$libpath = '{path}';\", file=dh)" >>edit.py | |
echo ' found_libpath = True' >>edit.py | |
echo ' elif not found_path and stripped.startswith("our $path"):' >>edit.py | |
echo " path = \"$PSNPATH/strawberry/perl/bin/\"" >>edit.py | |
echo " print(f\"our \$path = '{path}';\", file=dh)" >>edit.py | |
echo ' found_path = True' >>edit.py | |
echo ' else:' >>edit.py | |
echo ' dh.write(line)' >>edit.py | |
../../../../../python/python-3.11.6.amd64/python.exe edit.py | |
rm includes.pm | |
mv tempy includes.pm | |
cat edit.py | |
cat includes.pm | |
shell: bash | |
- name: Run unit tests | |
run: | | |
echo %PSNPATH% | |
echo %TESTPATH% | |
set PATH=%PSNPATH%\strawberry\perl\bin;%PSNPATH%\strawberry\c\bin;%PATH% | |
where prove | |
cd %TESTPATH% | |
prove -r -j8 unit | |
shell: cmd | |
- name: Save TEMP | |
run: | | |
setlocal DisableDelayedExpansion | |
echo TEMPDIR=%TEMP%>> %GITHUB_ENV% | |
endlocal | |
shell: cmd | |
- name: Run system tests | |
run: | | |
set PATH=%PSNPATH%\strawberry\perl\bin;%PSNPATH%\strawberry\c\bin;%PATH% | |
cd %TESTPATH% | |
prove -r -j3 system | |
shell: cmd | |
- name: Upload failed system test directories artifact | |
uses: actions/upload-artifact@v2 | |
if: ${{ failure() }} | |
with: | |
name: system-tests-windows | |
path: ${{ env.TEMPDIR }}\PsN-test_system* | |
release: | |
needs: [test-windows, test-macos, test-ubuntu] | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Get PsN installer | |
uses: actions/download-artifact@v2 | |
with: | |
name: targz | |
- name: Get docs | |
uses: actions/download-artifact@v2 | |
with: | |
name: docs | |
- name: Get Windows installer | |
uses: actions/download-artifact@v2 | |
with: | |
name: win-installer | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
PsN*.tar.gz | |
PsN*.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |