forked from ecmwf/magics
-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (120 loc) · 3.8 KB
/
ci.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: ci
# Controls when the workflow will run
on:
# Trigger the workflow on all pushes, except on tag creation
push:
branches:
- '**'
tags-ignore:
- '**'
# Trigger the workflow on all pull requests
pull_request: ~
# Allow workflow to be dispatched on demand
workflow_dispatch: ~
jobs:
ci:
name: ci
strategy:
matrix:
name:
# Currently disabled because of dynamic library linking issues
include:
- name: [email protected]
os: ubuntu-20.04
compiler: gnu-10
compiler_cc: gcc-10
compiler_cxx: g++-10
compiler_fc: gfortran-10
- name: [email protected]
os: ubuntu-20.04
compiler: clang-12
compiler_cc: clang-12
compiler_cxx: clang++-12
compiler_fc: gfortran-10
- name: [email protected]
os: ubuntu-18.04
compiler: gnu-10
compiler_cc: gcc-10
compiler_cxx: g++-10
compiler_fc: gfortran-10
- name: [email protected]
os: ubuntu-18.04
compiler: clang-9
compiler_cc: clang-9
compiler_cxx: clang++-9
compiler_fc: gfortran-9
# Currently disabled because of dynamic library linking issues
# - name: [email protected]
# os: macos-10.15
# compiler: gnu-10
# compiler_cc: gcc-10
# compiler_cxx: g++-10
# compiler_fc: gfortran-10
# Xcode compiler requires empty environment variables, so we pass null (~) here
- name: [email protected]
os: macos-10.15
compiler: clang-12
compiler_cc: ~
compiler_cxx: ~
compiler_fc: gfortran-10
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install System Dependencies (Ubuntu)
shell: bash -eux {0}
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get -q -y update
[[ "${{ matrix.os }}" == "ubuntu-18.04" ]] && NETCDF_PACKAGE=13 || NETCDF_PACKAGE=15
sudo apt-get -q -y install libnetcdf$NETCDF_PACKAGE libnetcdf-dev libpango1.0-dev libcurl4-openssl-dev
- name: Install System Dependencies (macOS)
shell: bash -eux {0}
if: startsWith(matrix.os, 'macos')
run: brew install netcdf imagemagick pango
- name: Build & Test
id: build-test
uses: ecmwf-actions/build-package@v2
with:
self_coverage: true
dependencies: |
ecmwf/ecbuild
ecmwf/eccodes
OSGeo/PROJ@refs/tags/8.1.1
dependency_branch: develop
- name: Codecov Upload
if: steps.build-test.outputs.coverage_file && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
uses: codecov/codecov-action@v2
with:
files: ${{ steps.build-test.outputs.coverage_file }}
dispatch:
name: dispatch
needs: ci
runs-on: ubuntu-20.04
steps:
- name: Run Regression Tests
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.GH_PAT }}
repository: ecmwf/magics-test
event-type: magics-updated
client-payload: '{"magics_ref": "${{ github.ref }}", "magics_sha": "${{ github.sha }}"}'
notify:
name: notify
runs-on: ubuntu-20.04
needs:
- ci
- dispatch
if: always() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
steps:
- name: Notify Teams
uses: ecmwf-actions/notify-teams@v1
with:
incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }}
needs_context: ${{ toJSON(needs) }}