update to LT_INIT #57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |