Skip to content

Merge pull request #678 from kaizhang/master #712

Merge pull request #678 from kaizhang/master

Merge pull request #678 from kaizhang/master #712

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: MACS3 CI non x64
on:
push:
paths-ignore:
- 'docs/**'
- '**.md'
- 'ChangeLog'
- '.github/workflows/**'
- '!.github/workflows/build-and-test-MACS3-non-x64.yml'
pull_request:
paths-ignore:
- 'docs/**'
- '**.md'
- 'ChangeLog'
- '.github/workflows/**'
- '!.github/workflows/build-and-test-MACS3-non-x64.yml'
jobs:
build_job:
runs-on: ubuntu-22.04
name: Build on ${{ matrix.arch }} with Python 3.10
strategy:
matrix:
include:
- arch: aarch64
steps:
- name: Checkout MACS
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up arch and run
uses: uraimo/run-on-arch-action@v2
id: build
with:
arch: ${{ matrix.arch }}
distro: ubuntu22.04
githubToken: ${{ github.token }}
# The shell to run commands with in the container
shell: /bin/bash
# Create an artifacts directory
setup: |
chmod a+rw ${PWD}
# Mount the current working directory (with checked-out codes) as /MACS3 in the container
dockerRunArgs: |
-v "${PWD}:/MACS3"
# Create an artifacts directory on runner
# Install some dependencies in the container. This speeds up builds if
# you are also using githubToken. Any dependencies installed here will
# be part of the container image that gets cached, so subsequent
# builds don't have to re-install them. The image layer is cached
# publicly in your project's package repository, so it is vital that
# no secrets are present in the container state or logs.
install: |
# install dependencies
apt-get update -qq -y
# We install the dependencies for compiling and installing
# the python libraries that MACS3 depends on.
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
run: |
echo `uname -a`
cd ~
# let's create virtualenv
python3 -m venv macsenv
# activate macsenv
source macsenv/bin/activate
# cd to source code directory
cd /MACS3
# pip will be upgraded
python3 -m pip install --upgrade pip
# install dependencies
if [ -f requirements.txt ]; then
python3 -m pip install -r requirements.txt;
fi
# install MACS3
python3 -m pip install .
# output versions of installed libraries
python3 -m pip freeze
# run test
pytest --runxfail && cd test && ./cmdlinetest macs3
- name: Archive cmdlinetest results
if: always()
uses: actions/upload-artifact@v4
with:
name: cmdlinetest-hmmratac-results-${{ matrix.arch }}
path: temp/macs3_run_hmmratac/