cvmhrbn-ucvm-ci #30
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: cvmhrbn-ucvm-ci | |
| on: | |
| workflow_run: | |
| workflows: [cvmhrbn-ci] | |
| types: | |
| - completed | |
| jobs: | |
| cvmhrbn-build-ucvm-mac: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| python-version: [3.7] | |
| steps: | |
| - name: set UCVM_SRC_PATH | |
| run: echo "UCVM_SRC_PATH=$RUNNER_WORKSPACE/cvmhbn/ucvm" >> $GITHUB_ENV | |
| - name: set UCVM_INSTALL_PATH | |
| run: echo "UCVM_INSTALL_PATH=$RUNNER_WORKSPACE/cvmhbn/target" >> $GITHUB_ENV | |
| ### build ucvm(main) first | |
| - id: get-ucvm | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: 'SCECcode/UCVM' | |
| ref: main | |
| path: ucvm | |
| - id: look-around | |
| run: ( echo " cvmhrbn-ucvm-ci:pwd =>";pwd; | |
| echo " cvmhrbn-ucvm-ci:UCVM_SRC_PATH =>"$UCVM_SRC_PATH; | |
| echo " cvmhrbn-ucvm-ci:UCVM_INSTALL_PATH =>"$UCVM_INSTALL_PATH; | |
| echo " cvmhrbn-ucvm-ci:RUNNER_WORKSPACE =>"$RUNNER_WORKSPACE; | |
| echo " cvmhrbn-ucvm-ci:github.action_path =>"${{ github.action_path }};) | |
| shell: bash | |
| - id: build-ucvm | |
| uses: ./ucvm/.github/actions/build-ucvm-action | |
| with: | |
| initiating-repo: 'cvmhrbn' | |
| target-model: 'cvmhrbn' | |
| - id: get-result | |
| run: more ${{ steps.build-ucvm.outputs.build-log }} | |
| shell: bash | |
| - name: move stock cvmhrbn away | |
| run: (rm -rf $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhrbn) | |
| shell: bash | |
| ### get cvmhbn from github | |
| - name: checkout cvmhbn main | |
| uses: actions/checkout@v2 | |
| with: | |
| ref: main | |
| path: cvmhbn | |
| - name: move it to the right location | |
| run: (mv cvmhbn $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model) | |
| shell: bash | |
| ### build cvmhrbn from cvmhbn | |
| - name: build cvmhrbn main | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhbn; ./.github/scripts/cvmhbn-generate.sh cvmhrbn) | |
| shell: bash | |
| - name: build cvmhrbn as part of ucvm | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhbn; ./.github/scripts/cvmhbn-build.sh cvmhrbn) | |
| 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 cvmhrbn standalone | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhbn; ./.github/scripts/cvmhbn-test-standalone.sh cvmhrbn) | |
| shell: bash | |
| - name: test cvmhrbn with ucvm | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhbn; source $UCVM_INSTALL_PATH/conf/ucvm_env.sh; ./.github/scripts/cvmhbn-test-ucvm.sh cvmhrbn) | |
| shell: bash | |
| # - name: Start SSH via Ngrok | |
| # if: ${{ success() }} | |
| # uses: luchihoratiu/debug-via-ssh@main | |
| # with: | |
| # NGROK_AUTH_TOKEN: ${{ secrets.NGROK_TOKEN }} | |
| # NGROK_TIMEOUT: 3000 | |
| # SSH_PASS: ${{ secrets.NGROK_SECRET }} | |
| - name: test cvmhrbn under ucvm | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm; source $UCVM_INSTALL_PATH/conf/ucvm_env.sh; ./.github/scripts/ucvm-test.sh) | |
| shell: bash | |
| cvmhrbn-build-ucvm-linux: | |
| if: ${{ success() }} | |
| needs: [cvmhrbn-build-ucvm-mac] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [3.7] | |
| steps: | |
| - name: set UCVM_SRC_PATH | |
| run: echo "UCVM_SRC_PATH=$RUNNER_WORKSPACE/cvmhbn/ucvm" >> $GITHUB_ENV | |
| - name: set UCVM_INSTALL_PATH | |
| run: echo "UCVM_INSTALL_PATH=$RUNNER_WORKSPACE/cvmhbn/target" >> $GITHUB_ENV | |
| ### build ucvm(main) first | |
| - id: get-ucvm | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: 'SCECcode/UCVM' | |
| ref: main | |
| path: ucvm | |
| - id: build-ucvm | |
| uses: ./ucvm/.github/actions/build-ucvm-action | |
| with: | |
| initiating-repo: 'cvmhrbn' | |
| target-model: 'cvmhrbn' | |
| # - name: Start SSH via Ngrok when build-ucvm-action fails | |
| # if: ${{ failure() }} | |
| # uses: luchihoratiu/debug-via-ssh@main | |
| # with: | |
| # NGROK_AUTH_TOKEN: ${{ secrets.NGROK_TOKEN }} | |
| # NGROK_TIMEOUT: 6000 | |
| # SSH_PASS: ${{ secrets.NGROK_SECRET }} | |
| - id: get-result | |
| run: more ${{ steps.build-ucvm.outputs.build-log }} | |
| shell: bash | |
| - name: move stock cvmhrbn away | |
| run: (rm -rf $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhrbn) | |
| shell: bash | |
| ### get cvmhbn from github | |
| - name: checkout cvmhbn main | |
| uses: actions/checkout@v2 | |
| with: | |
| ref: main | |
| path: cvmhbn | |
| - name: move it to the right location | |
| run: (mv cvmhbn $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model) | |
| shell: bash | |
| ### build cvmhrbn from cvmhbn | |
| - name: build cvmhrbn main | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhbn; ./.github/scripts/cvmhbn-generate.sh cvmhrbn) | |
| shell: bash | |
| - name: build cvmhrbn as part of ucvm | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhbn; ./.github/scripts/cvmhbn-build.sh cvmhrbn) | |
| 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 cvmhrbn standalone | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhbn; ./.github/scripts/cvmhbn-test-standalone.sh cvmhrbn) | |
| shell: bash | |
| - name: test cvmhrbn with ucvm | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhbn; source $UCVM_INSTALL_PATH/conf/ucvm_env.sh; ./.github/scripts/cvmhbn-test-ucvm.sh cvmhrbn) | |
| shell: bash | |
| # - name: Start SSH via Ngrok | |
| # if: ${{ success() }} | |
| # uses: luchihoratiu/debug-via-ssh@main | |
| # with: | |
| # NGROK_AUTH_TOKEN: ${{ secrets.NGROK_TOKEN }} | |
| # NGROK_TIMEOUT: 3000 | |
| # SSH_PASS: ${{ secrets.NGROK_SECRET }} | |
| - name: test cvmhrbn under ucvm | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm; source $UCVM_INSTALL_PATH/conf/ucvm_env.sh; ./.github/scripts/ucvm-test.sh) | |
| shell: bash | |