OpenAstronomy / github-actions-workflows

Reusable workflows for GitHub Actions
https://github-actions-workflows.openastronomy.org
MIT License
20 stars 13 forks source link

install packages on macOS in `publish.yml` #201

Closed zacharyburnett closed 6 months ago

zacharyburnett commented 6 months ago

https://github.com/spacetelescope/romanisim/pull/121#issuecomment-2098627449

When attempting to run publish.yml, the build fails due to not having requisite libraries: https://github.com/spacetelescope/romanisim/actions/runs/8973449274/job/24643649477?pr=121#step:7:1002

Could not find an installed fftw3 library named libfftw3.dylib

I can use the following in tox.yml, but it does not appear to work the same in publish.yml:

libraries: |
  brew: 
    - fftw

Is this possible with the QEMU emulator? (I'm not entirely sure how the build workflow works)

astrofrog commented 6 months ago

I think you will need to use cibuildwheel's options to achieve this - can take a look later this week if needed

zacharyburnett commented 6 months ago

ok thanks for the info; I'll take a look as well

zacharyburnett commented 6 months ago

it looks like we can set CIBW_BEFORE_BUILD to something like brew install fftw; I'll have to see if the environment has brew available

astrofrog commented 6 months ago

@zacharyburnett - yes that's the correct environment variable. You can also use a pyproject.toml setting if you prefer. I think the MacOS images should include brew since it should just use GitHub Actions (which does have brew)

zacharyburnett commented 6 months ago

thank you! I added some documentation in #202 to explain that, for anyone in my situation in the future