-
Notifications
You must be signed in to change notification settings - Fork 10
122 lines (105 loc) · 3.86 KB
/
bundle_with_dakota.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
name: 🏎️ Make & Test Wheels 🏎️
on: [pull_request]
env:
ERT_SHOW_BACKTRACE: 1
NO_PROJECT_RES: 1
BOOST_VERSION: 1.82.0
BOOST_VERSION_UNDERSCORES: 1_82_0
DAKOTA_VERSION: 6.18.0
INSTALL_DIR: local
jobs:
build_wheels:
name: 🛞 Build Wheels 🛞
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
python-version: ['3.10']
os: [ubuntu-latest]
ert-version: ['main']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v3
id: cache-package-check
with:
key: carolina_dist_${{ matrix.os }}_python-${{ matrix.python-version }}_boost-${{ env.BOOST_VERSION }}_dakota-${{ env.DAKOTA_VERSION }}
path: ./carolina_dist
- name: Build Linux Wheel
if: steps.cache-package-check.outputs.cache-hit != 'true'
uses: docker://quay.io/pypa/manylinux2014_x86_64
with:
entrypoint: /bin/bash
args: '-c "sh dakota_manylinux_install_files/build_wheels_gha.sh"'
- uses: actions/cache/save@v3
if: steps.cache-package-check.outputs.cache-hit != 'true'
id: cache-package-store
with:
key: carolina_dist_${{ matrix.os }}_python-${{ matrix.python-version }}_boost-${{ env.BOOST_VERSION }}_dakota-${{ env.DAKOTA_VERSION }}
path: ./carolina_dist
- name: Get Carolina wheel from cache
uses: actions/cache/restore@v3
id: restore-cached-package
with:
key: carolina_dist_${{ matrix.os }}_python-${{ matrix.python-version }}_boost-${{ env.BOOST_VERSION }}_dakota-${{ env.DAKOTA_VERSION }}
path: ./carolina_dist
# - name: Test Linux Wheel on ManyLinux docker
# uses: docker://quay.io/pypa/manylinux2014_x86_64
# env:
# DEPENDENCY_ACCESS_TOKEN: ${{ secrets.DEPENDENCY_ACCESS_TOKEN }}''
# NO_PROJECT_RES: 1
# ERT_SHOW_BACKTRACE: 1
# QT_QPA_PLATFORM: 'minimal'
# with:
# entrypoint: /bin/bash
# args: '-c "sh dakota_manylinux_install_files/test_wheels_gha.sh"'
# - name: Test Linux Wheel on Linux
# env:
# DEPENDENCY_ACCESS_TOKEN: ${{ secrets.DEPENDENCY_ACCESS_TOKEN }}
# NO_PROJECT_RES: 1
# ERT_SHOW_BACKTRACE: 1
# QT_QPA_PLATFORM: 'minimal'
# run: |
# sh dakota_manylinux_install_files/test_wheels_gha.sh
- name: Install carolina
run: |
python3.10 -m pip install ./carolina_dist/dist/carolina-1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- name: Install Everest and dependencies
run: |
pip install git+https://${{ secrets.DEPENDENCY_ACCESS_TOKEN }}@github.com/equinor/spinningjenny.git
pip install git+https://${{ secrets.DEPENDENCY_ACCESS_TOKEN }}@github.com/TNO-Everest/[email protected]
pip install .[test,docs]
- name: Install latest ert main
if: matrix.ert-version == 'main'
run: |
sudo apt-get install build-essential
pip install git+https://github.com/equinor/ert.git
- name: Run Tests
if: matrix.test_type == 'test'
run: |
pytest tests -n 4 -m "not ui_test and not integration_test" --dist loadgroup -sv
- name: Run Integration Tests
if: matrix.test_type == 'integration-test'
run: |
pytest tests -n 4 -m "integration_test" --dist loadgroup
- name: Build Documentation
if: matrix.test_type == 'doc'
run: |
mkdir tmp
sphinx-build -W -b html -d tmp/doctrees docs/source {envtmpdir}/html
- name: Run UI Tests
if: matrix.test_type == 'ui-test'
env:
QT_QPA_PLATFORM: 'minimal'
run: |
python -m pytest -m "ui_test"
- name: Upload wheel as artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }} Python ${{ matrix.python-version }} wheel
path: |
dist/*
trace/*