cvmhstbn-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: cvmhstbn-ucvm-ci | |
| on: | |
| workflow_run: | |
| workflows: [cvmhstbn-ci] | |
| types: | |
| - completed | |
| jobs: | |
| cvmhstbn-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 " cvmhstbn-ucvm-ci:pwd =>";pwd; | |
| echo " cvmhstbn-ucvm-ci:UCVM_SRC_PATH =>"$UCVM_SRC_PATH; | |
| echo " cvmhstbn-ucvm-ci:UCVM_INSTALL_PATH =>"$UCVM_INSTALL_PATH; | |
| echo " cvmhstbn-ucvm-ci:RUNNER_WORKSPACE =>"$RUNNER_WORKSPACE; | |
| echo " cvmhstbn-ucvm-ci:github.action_path =>"${{ github.action_path }};) | |
| shell: bash | |
| - id: build-ucvm | |
| uses: ./ucvm/.github/actions/build-ucvm-action | |
| with: | |
| initiating-repo: 'cvmhstbn' | |
| target-model: 'cvmhstbn' | |
| - id: get-result | |
| run: more ${{ steps.build-ucvm.outputs.build-log }} | |
| shell: bash | |
| - name: move stock cvmhstbn away | |
| run: (rm -rf $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhstbn) | |
| 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 cvmhstbn from cvmhbn | |
| - name: build cvmhstbn main | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhbn; ./.github/scripts/cvmhbn-generate.sh cvmhstbn) | |
| shell: bash | |
| - name: build cvmhstbn as part of ucvm | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhbn; ./.github/scripts/cvmhbn-build.sh cvmhstbn) | |
| 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 cvmhstbn standalone | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhbn; ./.github/scripts/cvmhbn-test-standalone.sh cvmhstbn) | |
| shell: bash | |
| - name: test cvmhstbn 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 cvmhstbn) | |
| 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 cvmhstbn under ucvm | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm; source $UCVM_INSTALL_PATH/conf/ucvm_env.sh; ./.github/scripts/ucvm-test.sh) | |
| shell: bash | |
| cvmhstbn-build-ucvm-linux: | |
| if: ${{ success() }} | |
| needs: [cvmhstbn-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: 'cvmhstbn' | |
| target-model: 'cvmhstbn' | |
| # - 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 cvmhstbn away | |
| run: (rm -rf $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhstbn) | |
| 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 cvmhstbn from cvmhbn | |
| - name: build cvmhstbn main | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhbn; ./.github/scripts/cvmhbn-generate.sh cvmhstbn) | |
| shell: bash | |
| - name: build cvmhstbn as part of ucvm | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhbn; ./.github/scripts/cvmhbn-build.sh cvmhstbn) | |
| 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 cvmhstbn standalone | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm/work/model/cvmhbn; ./.github/scripts/cvmhbn-test-standalone.sh cvmhstbn) | |
| shell: bash | |
| - name: test cvmhstbn 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 cvmhstbn) | |
| 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 cvmhstbn under ucvm | |
| run: (cd $RUNNER_WORKSPACE/cvmhbn/ucvm; source $UCVM_INSTALL_PATH/conf/ucvm_env.sh; ./.github/scripts/ucvm-test.sh) | |
| shell: bash | |