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