Skip to content

Integration

Integration #44

Workflow file for this run

name: Integration
on:
workflow_call:
workflow_dispatch:
push:
tags:
- 'v*'
schedule:
- cron: "0 0 * * 0,3"
jobs:
get-nonmem:
runs-on: ubuntu-20.04
steps:
- name: Cache NONMEM
id: cache-nonmem
uses: actions/cache@v3
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@v3
with:
name: cache-workaround
path: 751.zip
retention-days: 1
integration-ubuntu:
needs: [get-nonmem]
runs-on: ubuntu-20.04
steps:
- name: Checkout Pharmpy
uses: actions/checkout@v4
- name: Cache NONMEM
id: cache-nonmem
uses: actions/cache@v3
with:
path: 751.zip
key: nonmem-751
- name: Unzip NONMEM
run: unzip -P $ZIP_KEY 751.zip
env:
ZIP_KEY: ${{secrets.ZIP_751_KEY}}
- name: Install gfortran
run: sudo apt install gfortran
- name: Print gfortran and gcc version
run: |
gfortran --version
gcc --version
shell: bash
- name: NONMEM license
run: echo $LICENSE_KEY > nm751CD/nonmem.lic
env:
LICENSE_KEY: ${{secrets.LICENSE_KEY}}
- name: Install NONMEM
run: |
cd nm751CD
/bin/bash SETUP75 $(realpath .) $(realpath ../nm751) gfortran y ar same rec q
- name: Create pharmpy.conf
run: |
export CONFDIR=/home/runner/.config/Pharmpy
mkdir -p $CONFDIR
echo '[pharmpy.plugins.nonmem]' > $CONFDIR/pharmpy.conf
echo 'parameter_names=comment,basic' >> $CONFDIR/pharmpy.conf
echo "default_nonmem_path=$(realpath nm751)" >> $CONFDIR/pharmpy.conf
cat $CONFDIR/pharmpy.conf
ls -l /home/runner/work/pharmpy/pharmpy/nm751
- uses: ./.github/actions/setup-tox
with:
python-version: 3.11
- name: Run integration tests
run: tox -e integration
integration-macos:
needs: [get-nonmem]
runs-on: macos-12
steps:
- name: Checkout Pharmpy
uses: actions/checkout@v4
- 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: Install realpath
run: brew install coreutils
- name: Print gfortran and gcc version
run: |
gfortran --version
gcc --version
shell: bash
- name: Get NONMEM
id: cache-nonmem
uses: actions/cache@v3
with:
path: 751.zip
key: nonmem-751
- name: Unzip NONMEM
run: unzip -P $ZIP_KEY 751.zip
env:
ZIP_KEY: ${{secrets.ZIP_751_KEY}}
- name: NONMEM license
run: echo $LICENSE_KEY > nm751CD/nonmem.lic
env:
LICENSE_KEY: ${{secrets.LICENSE_KEY}}
- name: Install NONMEM
run: |
cd nm751CD
/bin/bash SETUP75 $(realpath .) $(realpath ../nm751) gfortran y ar same rec q
- name: Create pharmpy.conf
run: |
export CONFDIR=/Users/runner/Library/Application\ Support/Pharmpy
mkdir -p "$CONFDIR"
echo '[pharmpy.plugins.nonmem]' > "$CONFDIR/pharmpy.conf"
echo 'parameter_names=comment,basic' >> "$CONFDIR/pharmpy.conf"
echo "default_nonmem_path=$(realpath nm751)" >> "$CONFDIR/pharmpy.conf"
- uses: ./.github/actions/setup-tox
with:
python-version: 3.11
- name: Run integration tests
run: tox -e integration
integration-windows:
needs: [get-nonmem]
runs-on: windows-2022
steps:
- name: Checkout Pharmpy
uses: actions/checkout@v4
# https://github.com/modflowpy/install-gfortran-action/blob/dfc32754e541304f2e7b7ca001e40dce094a5cd6/action.yml#L22-L30
- name: Setup gfortran
shell: bash
run: |
FCDIR=/c/ProgramData/Chocolatey/bin
LNDIR=/c/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/bin
if [ -d "$FCDIR" ] && [ -f "$LNDIR/libgfortran-5.dll" ] && [ ! -f "$FCDIR/libgfortran-5.dll" ]; then
ln -s "$LNDIR/libgfortran-5.dll" "$FCDIR/libgfortran-5.dll"
fi
- name: Print gfortran and gcc version
run: |
gfortran --version
gcc --version
shell: bash
- name: Get NONMEM
uses: actions/download-artifact@v3
with:
name: cache-workaround
- name: Cache NONMEM
id: cache-nonmem
uses: actions/cache@v3
with:
path: 751.zip
key: nonmem-751
- name: Unzip NONMEM
run: 7z x 751.zip -p%ZIP_KEY%
env:
ZIP_KEY: ${{secrets.ZIP_751_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 INSTALLDIR=%CD%\nm751
cd nm751CD
SETUP75.bat %CD% %INSTALLDIR% gfortran y ar same rec q
shell: cmd
- name: Create pharmpy.conf
run: |
export CONFDIR=/c/Users/runneradmin/AppData/Local/Pharmpy/Pharmpy
mkdir -p $CONFDIR
echo '[pharmpy.plugins.nonmem]' > $CONFDIR/pharmpy.conf
echo 'parameter_names=comment,basic' >> $CONFDIR/pharmpy.conf
echo 'default_nonmem_path=D:\a\pharmpy\pharmpy\nm751' >> $CONFDIR/pharmpy.conf
shell: bash
- uses: ./.github/actions/setup-tox
with:
python-version: 3.11
- name: Run integration tests
run: tox -e integration