Build conda packages #8
This file contains hidden or 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: Build Conda Packages | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python: [3.9, 3.10, 3.11] | |
| steps: | |
| - uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| python-version: ${{ matrix.python }} | |
| - uses: actions/checkout@v4 | |
| - name: Create and activate build environment | |
| shell: bash | |
| run: | | |
| conda create -n build_env -c conda-forge python=${{ matrix.python }} -y | |
| conda activate build_env | |
| - name: Install dependencies (Linux-specific) | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| shell: bash | |
| run: | | |
| conda install --no-plugins -c conda-forge gxx_linux-64 sysroot_linux-64 libgcc-ng libstdcxx-ng -y | |
| conda install -c conda-forge conda-build anaconda-client conda-verify -y | |
| conda install -c conda-forge -c loop3d --file requirements.txt -y | |
| - name: Build Conda package | |
| env: | |
| ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | |
| shell: bash | |
| run: | | |
| conda activate build_env | |
| conda build -c anaconda -c conda-forge -c loop3d --output-folder conda conda --python ${{ matrix.python }} | |
| anaconda upload --label main conda/*/*.tar.bz2 | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: conda-build-${{ matrix.os }}-${{ matrix.python }} | |
| path: conda |