Unverified Commit c28ae903 authored by Mike Henry's avatar Mike Henry Committed by GitHub
Browse files

Add M1 build testing to GHA (#3335)

* lets see what blows up!

* need to add env file, different name than normal

* lets see if setting an env will help it find the base

* try forcing the use of mamba

* this should break everything, but might make osx work

* lets see if this fixes the issue with the extension

* ci bump

* lets see if a different installer will work

* single thread build to see error better

* ci bump

* ci bump

* can't build opencl on m1

* add salt to url to prevent caching

* rename to reflect that we can just build CPU

* going to add a M1 x86_64 buld and an arm64 build

* lets see if I broke 86

* now lets see what happens with arm

* forgot to add new build files

* try older python version

* newer python?

* try mini forge

* ci bump

* unpin doxygen and remove gromacs as a dep

* double check where x86_64 libs are getting pulled in

* ci bump

* try and use conda compiler toolchain and set arch

* weird things happend with setting arch

* lets see what the arch the runner thinks it is using

* try printing arch again

* undo shell change

* remove changes to shell

* make sure I don't break other buikds

* fix syntax issue and add new label to actionlint

* ci bump

* ci bump

* lets focus on arm64 builds for now

* ci bump

* ci bump

* try setting arch to build with arch command

* split steps up so other builds don't break

* see if the cmake step is the only one we need to arch-ify

* cleaning things up

* cleaning things up

* set -j2 for make

* we can use the same build step as the otehr builds

* now lets see if it can install gromacs

* no gromacs, no problem?

* remove bit of logic stopping the build

* pin doxygen to 1.9.1

* try building openCL

* ci bump

* ci bump
parent ed9df876
...@@ -148,11 +148,33 @@ jobs: ...@@ -148,11 +148,33 @@ jobs:
-DOPENMM_BUILD_OPENCL_LIB=ON \ -DOPENMM_BUILD_OPENCL_LIB=ON \
-DOPENMM_BUILD_OPENCL_TESTS=OFF \ -DOPENMM_BUILD_OPENCL_TESTS=OFF \
- name: MacOS M1 CPU arm64 Python 3.10
python-version: "3.10"
os: M1-arm64
OPENCL: false
cuda-version: ""
compilers: conda-forge
CMAKE_FLAGS: |
-DOPENMM_BUILD_OPENCL_LIB=ON \
-DOPENMM_BUILD_OPENCL_TESTS=OFF \
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
name: "Prepare base dependencies (M1)"
if: matrix.os == 'M1-arm64'
with:
python-version: ${{ matrix.python-version }}
activate-environment: build
installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh#${{ github.run_number }}
environment-file: devtools/ci/gh-actions/conda-envs/build-${{ matrix.os }}.yml
auto-activate-base: false
- uses: conda-incubator/setup-miniconda@v2 - uses: conda-incubator/setup-miniconda@v2
name: "Prepare base dependencies" name: "Prepare base dependencies"
if: matrix.os != 'M1-arm64'
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
activate-environment: build activate-environment: build
...@@ -169,7 +191,7 @@ jobs: ...@@ -169,7 +191,7 @@ jobs:
if: matrix.OPENCL == true && startsWith(matrix.os, 'ubuntu') if: matrix.OPENCL == true && startsWith(matrix.os, 'ubuntu')
run: source devtools/ci/gh-actions/scripts/install_amd_opencl.sh run: source devtools/ci/gh-actions/scripts/install_amd_opencl.sh
- name: "Install conda-forge compilers on Ubuntu (if needed)" - name: "Install conda-forge compilers on Ubuntu or M1 (if needed)"
if: matrix.compilers == 'conda-forge' if: matrix.compilers == 'conda-forge'
shell: bash -l {0} shell: bash -l {0}
run: conda install -c conda-forge compilers run: conda install -c conda-forge compilers
...@@ -196,8 +218,23 @@ jobs: ...@@ -196,8 +218,23 @@ jobs:
restore-keys: | restore-keys: |
ccache-${{ secrets.CACHE_VERSION }}-${{ steps.prepare-ccache.outputs.key }}- ccache-${{ secrets.CACHE_VERSION }}-${{ steps.prepare-ccache.outputs.key }}-
- name: "Configure build with CMake (M1)"
shell: bash -l {0}
if: matrix.os == 'M1-arm64'
run: |
mkdir build
cd build
/usr/bin/arch -arch arm64 cmake .. \
-DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} \
-DCMAKE_PREFIX_PATH=${CONDA_PREFIX} \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
${{ matrix.CMAKE_FLAGS }}
- name: "Configure build with CMake" - name: "Configure build with CMake"
shell: bash -l {0} shell: bash -l {0}
if: matrix.os != 'M1-arm64'
run: | run: |
mkdir build mkdir build
cd build cd build
......
name: build
channels:
- conda-forge
- bioconda
dependencies:
# build
- cmake
- ccache
# host
- python
- cython
- swig
- fftw
- numpy
- doxygen 1.9.1
# test
- pytest
- pytest-xdist
- pytest-timeout
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment