-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (130 loc) · 4.48 KB
/
sfcvm-ucvm-ci.yml
File metadata and controls
138 lines (130 loc) · 4.48 KB
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
132
133
name: sfcvm-ucvm-ci
on:
push:
branches: [ main ]
## branches: [ foofoo ]
jobs:
sfcvm-build-ucvm-linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
steps:
- name: set UCVM_SRC_PATH
run: echo "UCVM_SRC_PATH=$RUNNER_WORKSPACE/sfcvm/ucvm" >> $GITHUB_ENV
- name: set UCVM_INSTALL_PATH
run: echo "UCVM_INSTALL_PATH=$RUNNER_WORKSPACE/sfcvm/target" >> $GITHUB_ENV
- name: load python pkgs
run: (python3 -m pip install scipy h5py numpy pandas pybind11)
shell: bash
### build ucvm(main) first
- name: get-ucvm
uses: actions/checkout@v2
with:
repository: 'SCECcode/UCVM'
ref: main
path: ucvm
- id: build-ucvm
name: build ucvm
uses: ./ucvm/.github/actions/build-ucvm-action
with:
initiating-repo: 'sfcvm'
target-model: 'sfcvm'
target-branch: 'main'
# - name: Start SSH debug with tmate
# uses: mxschmitt/action-tmate@v3
# with:
# limit-access-to-actor: true
# - name: sleep to keep runner alive
# run: sleep 3600
- name: move stock sfcvm away
run: (rm -rf $RUNNER_WORKSPACE/sfcvm/ucvm/work/model/sfcvm)
shell: bash
### build sfcvm from github
- name: checkout sfcvm main
uses: actions/checkout@v2
with:
path: sfcvm
- name: move it to the right location
run: (mv sfcvm $RUNNER_WORKSPACE/sfcvm/ucvm/work/model; pwd; ls)
shell: bash
- name: build sfcvm as part of ucvm
run: (cd $RUNNER_WORKSPACE/sfcvm/ucvm/work/model/sfcvm; ./.github/scripts/sfcvm-build.sh)
shell: bash
### check ucvm is still valid
- name: check on ucvm
run: (source $UCVM_INSTALL_PATH/conf/ucvm_env.sh; ucvm_query -H)
shell: bash
- name: test sfcvm with ucvm
run: (cd $RUNNER_WORKSPACE/sfcvm/ucvm/work/model/sfcvm; source $UCVM_INSTALL_PATH/conf/ucvm_env.sh; ./.github/scripts/sfcvm-test-ucvm.sh)
shell: bash
- name: test sfcvm under ucvm
run: (cd $RUNNER_WORKSPACE/sfcvm/ucvm; source $UCVM_INSTALL_PATH/conf/ucvm_env.sh; ./.github/scripts/ucvm-test.sh)
shell: bash
## Would require upgrading geomodelgrid's python code to get it to work with MacOS
sfcvm-build-ucvm-mac:
if: false ## skip this one
# if: ${{ success() }}
# needs: [sfcvm-build-ucvm-linux]
runs-on: macos-latest
strategy:
matrix:
python-version: [3.7]
steps:
- name: set UCVM_SRC_PATH
run: echo "UCVM_SRC_PATH=$RUNNER_WORKSPACE/sfcvm/ucvm" >> $GITHUB_ENV
- name: set UCVM_INSTALL_PATH
run: echo "UCVM_INSTALL_PATH=$RUNNER_WORKSPACE/sfcvm/target" >> $GITHUB_ENV
# - name: Start SSH debug with tmate
# uses: mxschmitt/action-tmate@v3
# with:
# limit-access-to-actor: true
# - name: sleep to keep runner alive
# run: sleep 3600
- name: load python pkgs
run: (pipx install --include-deps scipy h5py numpy pandas pybind11)
shell: bash
### build ucvm(main) first
- name: get-ucvm
uses: actions/checkout@v2
with:
repository: 'SCECcode/UCVM'
ref: main
path: ucvm
- id: build-ucvm
name: build ucvm
uses: ./ucvm/.github/actions/build-ucvm-action
with:
initiating-repo: 'sfcvm'
target-model: 'sfcvm'
target-branch: 'main'
# - name: Start SSH debug with tmate
# uses: mxschmitt/action-tmate@v3
# with:
# limit-access-to-actor: true
# - name: sleep to keep runner alive
# run: sleep 3600
- name: move stock sfcvm away
run: (rm -rf $RUNNER_WORKSPACE/sfcvm/ucvm/work/model/sfcvm)
shell: bash
### build sfcvm from github
- name: checkout sfcvm main
uses: actions/checkout@v2
with:
path: sfcvm
- name: move it to the right location
run: (mv sfcvm $RUNNER_WORKSPACE/sfcvm/ucvm/work/model; pwd; ls)
shell: bash
- name: build sfcvm as part of ucvm
run: (cd $RUNNER_WORKSPACE/sfcvm/ucvm/work/model/sfcvm; ./.github/scripts/sfcvm-build.sh)
shell: bash
### check ucvm is still valid
- name: check on ucvm
run: (source $UCVM_INSTALL_PATH/conf/ucvm_env.sh; ucvm_query -H)
shell: bash
- name: test sfcvm with ucvm
run: (cd $RUNNER_WORKSPACE/sfcvm/ucvm/work/model/sfcvm; source $UCVM_INSTALL_PATH/conf/ucvm_env.sh; ./.github/scripts/sfcvm-test-ucvm.sh)
shell: bash
- name: test sfcvm under ucvm
run: (cd $RUNNER_WORKSPACE/sfcvm/ucvm; source $UCVM_INSTALL_PATH/conf/ucvm_env.sh; ./.github/scripts/ucvm-test.sh)
shell: bash