CI (mamba) #937
This file contains 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 (mamba) | |
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: Create mamba environment (Darwin) | |
if: matrix.os == 'macos-latest' | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | |
uses: mamba-org/provision-with-micromamba@main | |
with: | |
micromamba-version: "latest" | |
environment-name: ncl_build | |
environment-file: .build/envs/Darwin.yml | |
- name: Create mamba environment (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | |
uses: mamba-org/provision-with-micromamba@main | |
with: | |
micromamba-version: "latest" | |
environment-name: ncl_build | |
environment-file: .build/envs/Linux.yml | |
- name: Build ncl | |
run: | | |
bash .build/mamba_build.sh | |
- name: Run tests | |
run: | | |
ncl -V | |
test "`ncl -V`" = "`cat version`" | |
git clone https://github.com/NCAR/ncl_ci_test | |
cd ncl_ci_test | |
bash run_tests.bash |