-
Notifications
You must be signed in to change notification settings - Fork 1
119 lines (108 loc) · 3.35 KB
/
pyodc.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
name: pyodc
# Controls when the workflow will run
on:
# Trigger the workflow on all pushes, except on tag creation
push:
branches:
- main
tags-ignore:
- "**"
# Trigger the workflow on all pull requests
pull_request: ~
# Allow workflow to be dispatched on demand
workflow_dispatch: ~
jobs:
pyodc:
name: pyodc
strategy:
fail-fast: false
matrix:
name:
- gnu-10@ubuntu-20.04
- clang-12@ubuntu-20.04
- gnu-11@ubuntu-22.04
- clang-14@ubuntu-22.04
- clang-14@macos-12
include:
- name: gnu-10@ubuntu-20.04
os: ubuntu-20.04
compiler: gnu-10
compiler_cc: gcc-10
compiler_cxx: g++-10
compiler_fc: gfortran-10
- name: clang-12@ubuntu-20.04
os: ubuntu-20.04
compiler: clang-12
compiler_cc: clang-12
compiler_cxx: clang++-12
compiler_fc: gfortran-10
- name: gnu-11@ubuntu-22.04
os: ubuntu-22.04
compiler: gnu-11
compiler_cc: gcc-11
compiler_cxx: g++-11
compiler_fc: gfortran-11
- name: clang-14@ubuntu-22.04
os: ubuntu-22.04
compiler: clang-14
compiler_cc: clang-14
compiler_cxx: clang++-14
compiler_fc: gfortran-11
# Xcode compiler requires empty environment variables, so we pass empty strings here
- name: clang-14@macos-12
os: macos-12
compiler: clang-14
compiler_cc: ""
compiler_cxx: ""
compiler_fc: gfortran-11
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Checkout pyodc Repository
uses: actions/checkout@v3
with:
repository: ecmwf/pyodc
ref: develop
path: pyodc
- name: Retrieve pyodc SHA
working-directory: ${{ github.workspace }}/pyodc
shell: bash -eux {0}
run: echo "PYODC_SHA=$(git log -1 --format='%H')" >> $GITHUB_ENV
- name: Install Dependencies
id: install-dependencies
uses: ./
with:
workspace: ${{ github.workspace }}/pyodc
repository: ecmwf/pyodc
sha: ${{ env.PYODC_SHA }}
self_build: false
dependencies: |
ecmwf/ecbuild
ecmwf/eckit
ecmwf/odc
dependency_branch: develop
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Python Dependencies
working-directory: pyodc
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov
test -f requirements.txt && python -m pip install -r requirements.txt
- name: Verify Source Distribution
working-directory: pyodc
shell: bash -eux {0}
run: |
python setup.py sdist
python -m pip install dist/*
- name: Run Tests
env:
LD_LIBRARY_PATH: ${{ steps.install-dependencies.outputs.lib_path }}
shell: bash -eux {0}
working-directory: pyodc
run: |
DYLD_LIBRARY_PATH=${{ env.LD_LIBRARY_PATH }} python -m pytest --cov=./ --cov-report=xml
python -m coverage report