From 9e1e0251291e063d80275206962aec59175e2b73 Mon Sep 17 00:00:00 2001 From: Ian Wang <22849821+wangyinz@users.noreply.github.com> Date: Wed, 15 May 2024 17:28:24 -0500 Subject: [PATCH] Add osc-arm64 build of conda using the new osx-14 runner (#537) * 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 --- .github/workflows/conda-build.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index ac77cbf9e..2a80c3062 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -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 +