1 # This workflow will install Python dependencies, run tests and lint with a single version of Python
2 # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
6 on: [push, pull_request]
11 name: Build on ${{ matrix.arch }}
25 uses: actions/checkout@v3
28 - name: Set up arch and run (bullseye Python 3.9)
29 uses: uraimo/run-on-arch-action@v2
32 arch: ${{ matrix.arch }}
33 distro: ${{ matrix.distro }}
35 githubToken: ${{ github.token }}
37 # The shell to run commands with in the container
40 # Mount the current working directory (with checked-out codes) as /MACS3 in the container
42 -v "${PWD}:/MACS3" -u macs3
44 # Create an artifacts directory on runner
46 # Install some dependencies in the container. This speeds up builds if
47 # you are also using githubToken. Any dependencies installed here will
48 # be part of the container image that gets cached, so subsequent
49 # builds don't have to re-install them. The image layer is cached
50 # publicly in your project's package repository, so it is vital that
51 # no secrets are present in the container state or logs.
55 chown -R macs3:macs3 /MACS3
56 # install dependencies
58 apt-get install apt-utils
59 apt-get install -yq libblas3 liblapack3 libblas-dev liblapack-dev
60 # we rely on Debian/Linux python packages for numpy/scipy/sklearn
61 apt-get install -yq python3 python3-pip python3-virtualenv python3-wheel python3-numpy python3-scipy python3-sklearn cython3
62 apt-get install -yq procps zlib1g zlib1g-dev gfortran
67 # let's create virtualenv
68 virtualenv --system-site-packages macsenv
69 source macsenv/bin/activate
71 # copy source code over
75 # let's make sure this file is gone...
76 rm -f no-global-site-packages.txt
79 pip install --progress-bar off --upgrade pip
81 # install dependencies that are not in Debian/Linux
82 pip install --upgrade-strategy only-if-needed --progress-bar off Cython
83 pip install --upgrade-strategy only-if-needed --progress-bar off hmmlearn
84 pip install --upgrade-strategy only-if-needed --progress-bar off cykhash
85 pip install --upgrade --progress-bar off pytest
88 # install MACS3; only-if-needed won't try to upgrade Debian/Linux python3 libs
89 pip install --upgrade-strategy only-if-needed --no-build-isolation --progress-bar off .
92 pytest --runxfail && cd test && ./cmdlinetest-nohmmratac macs3