-
Notifications
You must be signed in to change notification settings - Fork 65
76 lines (66 loc) · 1.89 KB
/
ci_mamba.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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