Demonstration WIP for ESNB analysis #2595
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 | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| # cancel running jobs if theres a newer push | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| condabuild: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/noaa-gfdl/fre-cli:miniconda24_gcc14_v2 | |
| steps: | |
| - name: Checkout Files | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Configure Conda | |
| run: | | |
| echo "removing conda default channels, appending open-source ones" | |
| conda config --append channels conda-forge | |
| conda config --append channels noaa-gfdl | |
| conda config --remove channels defaults | |
| echo "setting strict channel priority" | |
| conda config --set channel_priority strict | |
| echo "setting anaconda_upload to no" | |
| conda config --set anaconda_upload no | |
| echo "printing conda config just in case" | |
| conda config --show | |
| - name: Update Conda and Conda Package Indices | |
| run: | | |
| echo "updating conda and package channel indices for conda-forge, noaa-gfdl" | |
| conda update -y conda | |
| conda update -y --all --override-channels -c conda-forge | |
| conda update -y --all --override-channels -c noaa-gfdl | |
| - name: Conda install conda-build | |
| run: | | |
| echo "conda install conda-build" | |
| conda install conda-forge::conda-build | |
| - name: Build fre-cli Conda Package | |
| run: | | |
| echo "conda building fre-cli package and outputting as a tarball" | |
| mkdir -p /app/fre-cli-tarball | |
| conda build --package-format tar.bz2 --output-folder /app/fre-cli-tarball . | |
| - name: Upload fre-cli Tarball | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fre-cli-tarball | |
| path: /app/fre-cli-tarball/noarch/fre-cli-*.tar.bz2 | |
| if-no-files-found: error |