Skip to content

Commit

Permalink
Be explicit about runner choices on macOS (conda#777)
Browse files Browse the repository at this point in the history
* Be explicit about runner choices on macOS

* use setup-miniconda v3

* use runner.os
  • Loading branch information
jaimergp authored Apr 25, 2024
1 parent 7e40c30 commit 911dda2
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,51 +33,51 @@ defaults:
jobs:
tests:
name: ${{ matrix.os }}, Python ${{ matrix.python-version }}, ${{ matrix.conda-standalone }}
runs-on: ${{ matrix.os }}-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# UBUNTU
- os: ubuntu
- os: ubuntu-latest
python-version: "3.8"
conda-standalone: conda-standalone
check-docs: true
- os: ubuntu
- os: ubuntu-latest
python-version: "3.9"
conda-standalone: conda-standalone
check-docs: true
- os: ubuntu
- os: ubuntu-latest
python-version: "3.10"
conda-standalone: conda-standalone-nightly
- os: ubuntu
- os: ubuntu-latest
python-version: "3.11"
conda-standalone: micromamba
# MACOS
- os: macos
- os: macos-13
python-version: "3.8"
conda-standalone: conda-standalone-nightly
# Not running for 3.9 to save some CI resources
# - os: macos
# python-version: "3.9"
# conda-standalone: conda-standalone
- os: macos
- os: macos-13
python-version: "3.10"
conda-standalone: micromamba
- os: macos
- os: macos-13
python-version: "3.11"
conda-standalone: conda-standalone
# WINDOWS
- os: windows
- os: windows-latest
python-version: "3.8"
conda-standalone: conda-standalone
- os: windows
- os: windows-latest
python-version: "3.9"
conda-standalone: conda-standalone-nightly
- os: windows
- os: windows-latest
python-version: "3.10"
conda-standalone: conda-standalone
- os: windows
- os: windows-latest
python-version: "3.11"
# conda-standalone: micromamba
conda-standalone: conda-standalone-nightly
Expand All @@ -89,24 +89,24 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: constructor-dev
environment-file: dev/environment.yml
python-version: ${{ matrix.python-version }}
- name: Supply extra dependencies and install constructor
run: |
files=(--file "tests/requirements.txt")
test -f dev/extra-requirements-${{ matrix.os }}.txt \
&& files+=(--file "dev/extra-requirements-${{ matrix.os }}.txt")
test -f dev/extra-requirements-${{ runner.os }}.txt \
&& files+=(--file "dev/extra-requirements-${{ runner.os }}.txt")
conda install ${files[@]} -y
echo "NSIS_USING_LOG_BUILD=1" >> $GITHUB_ENV
pip install -e . --no-deps --no-build-isolation
- name: Set up conda executable
run: |
if [[ "${{ matrix.conda-standalone }}" == "micromamba" ]]; then
conda create -yqp "${{ runner.temp }}/micromamba" -c conda-forge micromamba
if [[ ${{ matrix.os }} == "windows" ]]; then
if [[ "${{ runner.os }}" == "Windows" ]]; then
echo "CONSTRUCTOR_CONDA_EXE=${{ runner.temp }}/micromamba/Library/bin/micromamba.exe" >> $GITHUB_ENV
else
echo "CONSTRUCTOR_CONDA_EXE=${{ runner.temp }}/micromamba/bin/micromamba" >> $GITHUB_ENV
Expand Down Expand Up @@ -183,8 +183,10 @@ jobs:
include:
- runner: ubuntu-latest
subdir: linux-64
- runner: macos-latest
- runner: macos-13
subdir: osx-64
- runner: macos-14 # FUTURE: Use latest
subdir: osx-arm64
- runner: windows-latest
subdir: win-64
runs-on: ${{ matrix.runner }}
Expand Down

0 comments on commit 911dda2

Please sign in to comment.