Skip to content

Commit

Permalink
Add osc-arm64 build of conda using the new osx-14 runner (#537)
Browse files Browse the repository at this point in the history
* add osx build of conda

* fix wrong runner name

* Use setup-miniconda for macos support

* add anaconda-client-env

* explicit use bash shell

* add macos-13 too

* clean up to be merged
  • Loading branch information
wangyinz authored May 15, 2024
1 parent cbe2cce commit 9e1e025
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/conda-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,33 @@ jobs:
PYTHON_VERSION=${{ matrix.python-version }}
ANACONDA_API_TOKEN=${{ secrets.CONDA_TOKEN }}
conda-build-osx:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
os: ["macos-14", "macos-13"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
auto-update-conda: true
channels: conda-forge,defaults
activate-environment: anaconda-client-env
- shell: bash -el {0}
run: |
export PYTHON_VERSION=${{ matrix.python-version }}
conda install -y conda-build anaconda-client
conda config --set anaconda_upload no
export ANACONDA_API_TOKEN=${{ secrets.CONDA_TOKEN }}
PACKAGE_PATH=$(conda build . --python ${{ matrix.python-version }} --output)
conda build . --python ${{ matrix.python-version }}
if [ "${{ matrix.python-version }}" == "3.11" ]; then
anaconda -t $ANACONDA_API_TOKEN upload $PACKAGE_PATH --label main --label py3.11 --force
else
anaconda -t $ANACONDA_API_TOKEN upload $PACKAGE_PATH --label py${{ matrix.python-version }} --force
fi

0 comments on commit 9e1e025

Please sign in to comment.