update docs
[MACS.git] / .github / workflows / build-and-test-MACS3-non-x64.yml
blob155ad1800973aef0a47451062e3ec88405bbfa3d
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
4 name: MACS3 CI non x64
6 on: 
7   push:
8     paths-ignore:
9       - 'docs/**'
10       - '**.md'
11       - '.github/workflows/**'
12       - '!.github/workflows/build-and-test-MACS3-non-x64.yml'
13   pull_request:
14     paths-ignore:
15       - 'docs/**'
16       - '**.md'
17       - '.github/workflows/**'
18       - '!.github/workflows/build-and-test-MACS3-non-x64.yml'
20 jobs:
21   build_job:
22     runs-on: ubuntu-22.04
23     name: Build on ${{ matrix.arch }} with Python 3.10
24     strategy:
25       matrix:
26         include:
27           - arch: aarch64
29     steps:
30       - name: Checkout MACS
31         uses: actions/checkout@v4
32         with:
33           submodules: 'true'
35       - name: Set up arch and run
36         uses: uraimo/run-on-arch-action@v2
37         id: build
38         with:
39           arch: ${{ matrix.arch }}
40           distro: ubuntu22.04
42           githubToken: ${{ github.token }}
44           # The shell to run commands with in the container
45           shell: /bin/bash
47           # Create an artifacts directory
48           setup: |
49             chmod a+rw ${PWD}
50         
51           # Mount the current working directory (with checked-out codes) as /MACS3 in the container
52           dockerRunArgs: |
53             -v "${PWD}:/MACS3"
55           # Create an artifacts directory on runner
57           # Install some dependencies in the container. This speeds up builds if
58           # you are also using githubToken. Any dependencies installed here will
59           # be part of the container image that gets cached, so subsequent
60           # builds don't have to re-install them. The image layer is cached
61           # publicly in your project's package repository, so it is vital that
62           # no secrets are present in the container state or logs.
63           install: |
64             # install dependencies
65             apt-get update -qq -y
66             # We install the dependencies for compiling and installing
67             # the python libraries that MACS3 depends on.
68             apt-get install -yq apt-utils bc libblas3 liblapack3 libblas-dev liblapack-dev libopenblas-dev pkg-config python3 python3-pip python3-venv python3-wheel meson ninja-build cmake procps zlib1g zlib1g-dev gfortran
69           run: |
70             echo `uname -a`
71             cd ~
72             
73             # let's create virtualenv
74             python3 -m venv macsenv
76             # activate macsenv
77             source macsenv/bin/activate
78             
79             # cd to source code directory
80             cd /MACS3
82             # pip will be upgraded
83             python3 -m pip install --upgrade pip
85             # install dependencies
86             if [ -f requirements.txt ]; then
87                 python3 -m pip install -r requirements.txt;
88             fi
90             # install MACS3
91             python3 -m pip install .
93             # output versions of installed libraries
94             python3 -m pip freeze
96             # run test
97             pytest --runxfail && cd test && ./cmdlinetest macs3
99       - name: Archive cmdlinetest results
100         if: always()
101         uses: actions/upload-artifact@v4
102         with:
103           name: cmdlinetest-hmmratac-results-${{ matrix.arch }}
104           path: temp/macs3_run_hmmratac/