Merge pull request #400 from MilesCranmer/create-pull-request/patch #1194
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: macOS | |
on: | |
push: | |
branches: | |
- '**' | |
paths: | |
- 'test/**' | |
- 'pysr/**' | |
- '.github/workflows/CI_mac.yml' | |
- 'setup.py' | |
tags: | |
- 'v*.*.*' | |
pull_request: | |
branches: | |
- '*' | |
paths: | |
- 'test/**' | |
- 'pysr/**' | |
- '.github/workflows/CI_mac.yml' | |
- 'setup.py' | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
julia-version: ['1.9'] | |
python-version: ['3.10'] | |
os: [macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Set up Julia" | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.julia-version }} | |
- name: "Cache Julia" | |
uses: julia-actions/cache@v1 | |
with: | |
cache-name: ${{ matrix.os }}-test-${{ matrix.julia-version }}-${{ matrix.python-version }} | |
cache-packages: false | |
- name: "Set up Python" | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
- name: "Install PySR" | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
python setup.py install | |
python -m pysr install | |
- name: "Run tests" | |
run: | | |
python -m pysr.test main | |
python -m pysr.test cli | |
- name: "Install JAX" | |
run: pip install jax jaxlib # (optional import) | |
- name: "Run JAX tests" | |
run: python -m pysr.test jax | |
- name: "Install Torch" | |
run: pip install torch # (optional import) | |
- name: "Run Torch tests" | |
run: python -m pysr.test torch | |
- name: "Run custom env tests" | |
run: python -m pysr.test env |