CI build Anaconda #127
Workflow file for this run
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: CI build Anaconda | |
| on: | |
| workflow_dispatch: | |
| release: | |
| types: | |
| - released | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # os: [ubuntu-latest, windows-latest, macos-15-intel, macos-latest] | |
| os: [windows-latest] | |
| name: Build Anaconda packages on ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # - name: (windows) Install rtools MinGW compilers | |
| # if: matrix.os == 'windows-latest' | |
| # run: | | |
| # choco install rtools -y --no-progress --force --version=4.0.0.20220206 | |
| # where gfortran | |
| # | |
| # - name: (windows) Add compiler path to PATH | |
| # if: matrix.os == 'windows-latest' | |
| # uses: myci-actions/export-env-var-powershell@1 | |
| # with: | |
| # name: PATH | |
| # value: c:\rtools40\ucrt64\bin;c:\rtools40\usr\bin;$env:PATH | |
| - name: (windows) Disable Visual Studio | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| del "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" | |
| - name: Setup miniforge | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| miniforge-version: latest | |
| python-version: 3.13 | |
| channels: conda-forge | |
| - name: Prepare conda environment | |
| shell: bash -el {0} | |
| run: | | |
| conda update --all -y | |
| conda install conda-build anaconda-client | |
| mkdir build_output | |
| which anaconda | |
| - name: Build packages for ${{ matrix.os }} | |
| shell: bash -el {0} | |
| run: conda build --no-anaconda-upload --output-folder ./build_output ./packaging/conda | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: build_outputs-${{ matrix.os }} | |
| path: ./build_output/*/pysces*.* | |
| - name: Upload to anaconda.org | |
| # to publish when a GitHub Release is created: | |
| if: github.event_name == 'release' && github.event.action == 'released' | |
| shell: bash -el {0} | |
| run: anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload -u pysces ./build_output/*/pysces*.* |