Skip to content

CI: test macos (M1) arm64 #1452

CI: test macos (M1) arm64

CI: test macos (M1) arm64 #1452

Workflow file for this run

name: build
on:
release:
types: [published]
push:
branches: [master]
tags: ['**']
paths-ignore:
- 'CHANGELOG.md'
- 'CITATION.cff'
- 'LICENSE'
- 'scripts/**'
- 'NOTICE.txt'
- 'README.md'
pull_request:
branches: [master]
paths-ignore:
- 'CHANGELOG.md'
- 'CITATION.cff'
- 'LICENSE'
- 'scripts/**'
- 'NOTICE.txt'
- 'README.md'
jobs:
test:
defaults: {run: {shell: 'bash -el {0}'}}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
include:
- python-version: 3.12
numpy-version: 1.26
os: macos
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0, submodules: recursive}
- name: set requirements
run: |
case ${{ matrix.os }} in
ubuntu)
sed -ri -e '/ python /d' -e 's/(.* numpy) .*/\1=${{ matrix.numpy-version }}/' -e 's/=cuda*//' -e '/tigre/d' scripts/requirements-test.yml ;;
macos)
sed -ri '' -e '/ python /d' -e 's/(.* numpy) .*/\1=${{ matrix.numpy-version }}/' -e '/not arm64/d' -e '/linux/d' scripts/requirements-test.yml ;
echo -e " - astra-toolbox=2.2.0\n - llvm-openmp" >> scripts/requirements-test.yml ;;
esac
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
environment-file: scripts/requirements-test.yml
activate-environment: cil_dev
- name: build
run: |
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONDA_BUILD=ON -DCMAKE_INSTALL_PREFIX="$CONDA_PREFIX"
cmake --build ./build --target install
- name: test
run: python -m unittest discover -v ./Wrappers/Python/test