Skip to content

Commit

Permalink
Split mamba and conda files and CIs entirely
Browse files Browse the repository at this point in the history
  • Loading branch information
erogluorhan committed May 7, 2022
1 parent 3d1ec08 commit 0043f75
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 36 deletions.
3 changes: 3 additions & 0 deletions .build/envs/Darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ channels:
dependencies:
- clang_osx-64
- clangxx_osx-64
- esmf
- gfortran_osx-64
- pkg-config
- blas=1.1=openblas
Expand All @@ -14,8 +15,10 @@ dependencies:
- hdf5
- hdfeos2
- hdfeos5
- imagemagick
- jasper
- jpeg
- libgdal
- libiconv
- libnetcdf
- libpng
Expand Down
6 changes: 3 additions & 3 deletions .build/envs/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ dependencies:
- bzip2
- cairo
- curl
- esmf
- freetype
- gsl
- hdf4
- hdf5
- hdfeos2
- hdfeos5
- imagemagick
- jasper
- jpeg
- libgdal
- libiconv
- libnetcdf
- libpng
Expand All @@ -30,6 +33,3 @@ dependencies:
- xorg-libxmu
- xorg-makedepend
- xorg-imake
- imagemagick
- esmf
- libgdal
3 changes: 0 additions & 3 deletions .build/mamba_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ eval "$(micromamba shell hook --shell=bash)"
micromamba shell init --shell=bash --prefix=~/micromamba
source activate ncl_build 2>/dev/null || micromamba activate ncl_build

micromamba env list
micromamba list

export PREFIX="${CONDA_PREFIX}"
export CXXFLAGS="-fPIC $CXXFLAGS"
export LDFLAGS="-L${PREFIX}/lib $LDFLAGS"
Expand Down
80 changes: 80 additions & 0 deletions .github/workflows/ci_conda.yml_conflicts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI (conda)
on:
push:
branches:
- 'develop'
- 'master'
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Daily “At 00:00”

jobs:
test:
name: (${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}

strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "macos-latest"]

steps:
- uses: actions/checkout@v2

- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Install tcsh and byacc (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install tcsh
sudo apt-get install byacc

- name: Install dependencies (Darwin)
if: matrix.os == 'macos-latest'
run: |
brew update
brew install --cask xquartz

- name: Conda setup
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: ncl_build
python-version: 3.7
channels: conda-forge

- name: Conda install (Darwin)
if: matrix.os == 'macos-latest'
run: |
conda env update --file .build/envs/Darwin.yml --prune

- name: Conda install (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
conda env update --file .build/envs/Linux.yml --prune

- name: Conda install additional dependencies
run: |
conda install -n ncl_build -c conda-forge imagemagick esmf

- name: Conda install libgdal=2.4
run: |
conda install -n ncl_build -c conda-forge libgdal=2.4

- name: Build ncl
run: |
bash .build/conda_build.sh

- name: Run tests
run: |
test "`ncl -V`" = "`cat version`"
git clone https://github.com/NCAR/ncl_ci_test
cd ncl_ci_test
source run_tests.bash
33 changes: 3 additions & 30 deletions .github/workflows/ci.yml → .github/workflows/ci_mamba.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: CI (mamba)
on:
push:
branches:
Expand Down Expand Up @@ -63,41 +63,14 @@ jobs:
environment-name: ncl_build
environment-file: .build/envs/Linux.yml

# - name: Conda setup
# uses: conda-incubator/setup-miniconda@v2
# with:
# activate-environment: ncl_build
# python-version: 3.7
# channels: conda-forge
#
# - name: Conda install (Darwin)
# if: matrix.os == 'macos-latest'
# run: |
# conda env update --file .build/envs/Darwin.yml --prune
#
# - name: Conda install (Linux)
# if: matrix.os == 'ubuntu-latest'
# run: |
# conda env update --file .build/envs/Linux.yml --prune
#
# - name: Conda install additional dependencies
# run: |
# conda install -n ncl_build -c conda-forge imagemagick esmf
#
# - name: Conda install libgdal=2.4
# run: |
# conda install -n ncl_build -c conda-forge libgdal

- name: Build ncl
run: |
bash .build/mamba_build.sh
- name: Run tests
run: |
micromamba env list
micromamba activate ncl_build
micromamba list
ncl -V
test "`ncl -V`" = "`cat version`"
git clone https://github.com/NCAR/ncl_ci_test
cd ncl_ci_test
source run_tests.bash
bash run_tests.bash

0 comments on commit 0043f75

Please sign in to comment.