Skip to content

Commit e1fad82

Browse files
author
meihuisu
committed
wip ci
1 parent 89af699 commit e1fad82

3 files changed

Lines changed: 58 additions & 12 deletions

File tree

.github/scripts/cca-test-standalone.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22

33
cd test
44

5-
env LD_LIBRARY_PATH=../src ./run_unit | tee result_unit.txt
6-
75
exit 0
86

.github/scripts/cca-test-ucvm.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
cd test
66

7-
make run_unit |& tee result_unit.txt
7+
make run_unit >& result_unit.txt
8+
cat result_unit.txt
89

910
p=`grep -c failed result_unit.txt`
1011
if [ $p != 0 ]; then

.github/workflows/cca-ucvm-ci.yml

Lines changed: 56 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,70 @@ jobs:
1616
- name: set UCVM_INSTALL_PATH
1717
run: echo "UCVM_INSTALL_PATH=$RUNNER_WORKSPACE/cca/target" >> $GITHUB_ENV
1818
### build ucvm(main) first
19-
- id: get-ucvm
19+
- name: get-ucvm
2020
uses: actions/checkout@v2
2121
with:
2222
repository: 'SCECcode/UCVM'
2323
ref: testMei
2424
path: ucvm
2525
- id: build-ucvm
26+
name: build ucvm
2627
uses: ./ucvm/.github/actions/build-ucvm-action
2728
with:
2829
initiating-repo: 'cca'
2930
target-model: 'cca'
30-
# - name: Start SSH via Ngrok
31-
# if: ${{ failure() }}
32-
# uses: luchihoratiu/debug-via-ssh@main
33-
# with:
34-
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_TOKEN }}
35-
# NGROK_TIMEOUT: 3000
36-
# SSH_PASS: ${{ secrets.NGROK_SECRET }}
37-
- id: get-result
31+
- name: get-result
32+
run: more ${{ steps.build-ucvm.outputs.build-log }}
33+
shell: bash
34+
- name: move stock cca away
35+
run: (rm -rf $RUNNER_WORKSPACE/cca/ucvm/work/model/cca)
36+
shell: bash
37+
### build cca from github
38+
- name: checkout cca main
39+
uses: actions/checkout@v2
40+
with:
41+
path: cca
42+
- name: move it to the right location
43+
run: (mv cca $RUNNER_WORKSPACE/cca/ucvm/work/model; pwd; ls)
44+
shell: bash
45+
- name: build cca as part of ucvm
46+
run: (cd $RUNNER_WORKSPACE/cca/ucvm/work/model/cca; ./.github/scripts/cca-build.sh)
47+
shell: bash
48+
### check ucvm is still valid
49+
- name: check on ucvm
50+
run: (source $UCVM_INSTALL_PATH/conf/ucvm_env.sh; ucvm_query -H)
51+
shell: bash
52+
- name: test cca with ucvm
53+
run: (cd $RUNNER_WORKSPACE/cca/ucvm/work/model/cca; source $UCVM_INSTALL_PATH/conf/ucvm_env.sh; ./.github/scripts/cca-test-ucvm.sh)
54+
shell: bash
55+
- name: test cca under ucvm
56+
run: (cd $RUNNER_WORKSPACE/cca/ucvm; source $UCVM_INSTALL_PATH/conf/ucvm_env.sh; ./.github/scripts/ucvm-test.sh)
57+
shell: bash
58+
59+
cca-build-ucvm-mac:
60+
runs-on: macos-latest
61+
strategy:
62+
matrix:
63+
python-version: [3.7]
64+
steps:
65+
- name: set UCVM_SRC_PATH
66+
run: echo "UCVM_SRC_PATH=$RUNNER_WORKSPACE/cca/ucvm" >> $GITHUB_ENV
67+
- name: set UCVM_INSTALL_PATH
68+
run: echo "UCVM_INSTALL_PATH=$RUNNER_WORKSPACE/cca/target" >> $GITHUB_ENV
69+
### build ucvm(main) first
70+
- name: get-ucvm
71+
uses: actions/checkout@v2
72+
with:
73+
repository: 'SCECcode/UCVM'
74+
ref: testMei
75+
path: ucvm
76+
- id: build-ucvm
77+
name: build ucvm
78+
uses: ./ucvm/.github/actions/build-ucvm-action
79+
with:
80+
initiating-repo: 'cca'
81+
target-model: 'cca'
82+
- name: get-result
3883
run: more ${{ steps.build-ucvm.outputs.build-log }}
3984
shell: bash
4085
- name: move stock cca away
@@ -71,3 +116,5 @@ jobs:
71116

72117

73118

119+
120+

0 commit comments

Comments
 (0)