Install LLVM on MacOS #749
Workflow file for this run
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: Run unit tests | |
on: push | |
jobs: | |
docker_tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Run unit tests | |
run: docker build . --file docker/unittest.dockerfile --tag unittest | |
env: | |
ENABLE_SLOW_TESTS: True | |
aarch64_tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
pyver: [ cp37-cp37m, cp38-cp38, cp39-cp39 ] | |
fail-fast: false | |
name: Python ${{ matrix.pyver }} ubuntu-latest aarch64 tests | |
env: | |
py: /opt/python/${{ matrix.pyver }}/bin/python | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
id: qemu | |
uses: docker/setup-qemu-action@v1 | |
- name: Build and test library | |
run: | | |
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \ | |
quay.io/pypa/manylinux2014_aarch64 \ | |
bash -exc '${{ env.py }} -m venv .env && \ | |
source .env/bin/activate && \ | |
yum install -y epel-release && \ | |
yum repolist && \ | |
yum install -y hdf5-devel && \ | |
pip install --upgrade pip && \ | |
pip install poetry poetry-core && \ | |
poetry install -vvv && \ | |
poetry run pytest && \ | |
deactivate' | |
ubuntu_tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ '3.7', '3.8', '3.9' ] | |
fail-fast: false | |
name: Python ${{ matrix.python-version }} Ubuntu tests | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Setup poetry | |
uses: abatilo/actions-poetry@v2.2.0 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgomp1 | |
poetry install -vvv | |
- name: Test library | |
run: poetry run pytest | |
env: | |
ENABLE_SLOW_TESTS: True | |
windows_tests: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
python-version: [ '3.7', '3.8', '3.9' ] | |
fail-fast: false | |
name: Python ${{ matrix.python-version }} Windows tests | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Setup poetry | |
uses: abatilo/actions-poetry@v2.2.0 | |
- name: Install dependencies | |
run: poetry install -vvv | |
- name: Test library | |
run: poetry run pytest | |
env: | |
ENABLE_SLOW_TESTS: True | |
macos_tests: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
python-version: [ '3.7', '3.8', '3.9' ] | |
fail-fast: false | |
name: Python ${{ matrix.python-version }} MacOS tests | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install LLVM | |
run: brew install llvm | |
- name: Install OpenMP | |
run: brew install libomp | |
- name: Setup poetry | |
uses: abatilo/actions-poetry@v2.2.0 | |
- name: Install native lib | |
run: | | |
echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH | |
echo "C_INCLUDE_PATH=/usr/local/opt/llvm/include:$C_INCLUDE_PATH" >> $GITHUB_ENV | |
echo "CPLUS_INCLUDE_PATH=/usr/local/opt/llvm/include:$CPLUS_INCLUDE_PATH" >> $GITHUB_ENV | |
echo "LIBRARY_PATH=/usr/local/opt/llvm/lib:/usr/local/opt/libomp/lib:$LIBRARY_PATH" >> $GITHUB_ENV | |
echo "DYLD_LIBRARY_PATH=/usr/local/opt/llvm/lib:/usr/local/opt/libomp/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV | |
poetry install -vvv | |
env: | |
CC: /usr/local/opt/llvm/bin/clang | |
CXX: /usr/local/opt/llvm/bin/clang++ | |
- name: Test library | |
run: poetry run pytest | |
env: | |
ENABLE_SLOW_TESTS: True |