difftreelog
create execution-matrix job for try-runtime workflows
in: master
1 file changed
.github/workflows/try-runtime.ymldiffbeforeafterboth1# Try-runtime checks2# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2587656213/Try+runtime34# Triger: only call from main workflow(re-usable workflows)5on:6 workflow_call:78# A workflow run is made up of one or more jobs that can run sequentially or in parallel9jobs:10 try-runtime:11 # The type of runner that the job will run on12 runs-on: self-hosted-ci13 14 name: ${{ matrix.network }}-try-runtime1516 continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.1718 strategy:19 matrix:20 include:21 - network: opal22 replica_from_address: wss://eu-ws-opal.unique.network:44323 - network: quartz24 replica_from_address: wss://eu-ws-quartz.unique.network:44325 - network: unique26 replica_from_address: wss://eu-ws.unique.network:4432728 steps:2930 - name: Clean Workspace31 uses: AutoModality/action-clean@v1.1.03233 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it34 - uses: actions/checkout@v335 with:36 ref: ${{ github.head_ref }} #Checking out head commit3738 - name: Read .env file39 uses: xom9ikk/dotenv@v24041 - name: Generate ENV related extend file for docker-compose42 uses: cuchi/jinja2-action@v1.2.043 with:44 template: .docker/docker-compose.tmp-try-runtime.j245 output_file: .docker/docker-compose.try-runtime.${{ matrix.network }}.yml46 variables: |47 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}48 NETWORK=${{ matrix.network }}49 REPLICA_FROM=${{ matrix.replica_from_address }}5051 - name: Show build configuration52 run: cat .docker/docker-compose.try-runtime.${{ matrix.network }}.yml5354 - name: Build the stack55 run: docker-compose -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" up --build --force-recreate --timeout 300 --remove-orphans --exit-code-from try-runtime56 57 - name: Collect Docker Logs58 if: success() || failure()59 uses: jwalton/gh-docker-logs@v2.2.060 with:61 dest: './try-runtime-logs.${{ matrix.network }}'62 images: 'try-runtime' 6364 - name: Show docker logs65 run: cat './try-runtime-logs.${{ matrix.network }}/try-runtime.log'6667 - name: Stop running containers68 if: always() # run this step always69 run: docker-compose -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" down70 71 - name: Remove builder cache72 if: always() # run this step always73 run: |74 docker builder prune -f -a75 docker system prune -f76 docker image prune -f -a1# Try-runtime checks2# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2587656213/Try+runtime34# Triger: only call from main workflow(re-usable workflows)5on:6 workflow_call:78# A workflow run is made up of one or more jobs that can run sequentially or in parallel9jobs:10 prepare-execution-marix:1112 name: Prepare execution matrix1314 runs-on: self-hosted-ci15 outputs:16 matrix: ${{ steps.create_matrix.outputs.matrix }}1718 steps:1920 - name: Clean Workspace21 uses: AutoModality/action-clean@v1.1.02223 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it24 - uses: actions/checkout@v325 with:26 ref: ${{ github.head_ref }} #Checking out head commit2728 - name: Read .env file29 uses: xom9ikk/dotenv@v23031 - name: Create Execution matrix32 uses: CertainLach/create-matrix-action@v333 id: create_matrix34 with:35 matrix: |36 network {opal}, replica_from_address {${{ env.OPAL_REPLICA_FROM }}}37 network {quartz}, replica_from_address {${{ env.QUARTZ_REPLICA_FROM }}}38 network {unique}, replica_from_address {${{ env.UNIQUE_REPLICA_FROM }}}3940 try-runtime:41 needs: prepare-execution-marix4243 # The type of runner that the job will run on44 runs-on: [self-hosted-ci]45 continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.4647 name: ${{ matrix.network }}-try-runtime48 strategy:49 matrix:50 include: ${{fromJson(needs.execution-marix.outputs.matrix)}}51 52 steps:5354 - name: Clean Workspace55 uses: AutoModality/action-clean@v1.1.05657 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it58 - uses: actions/checkout@v359 with:60 ref: ${{ github.head_ref }} #Checking out head commit6162 - name: Read .env file63 uses: xom9ikk/dotenv@v26465 - name: Generate ENV related extend file for docker-compose66 uses: cuchi/jinja2-action@v1.2.067 with:68 template: .docker/docker-compose.tmp-try-runtime.j269 output_file: .docker/docker-compose.try-runtime.${{ matrix.network }}.yml70 variables: |71 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}72 NETWORK=${{ matrix.network }}73 REPLICA_FROM=${{ matrix.replica_from_address }}7475 - name: Show build configuration76 run: cat .docker/docker-compose.try-runtime.${{ matrix.network }}.yml7778 - name: Build the stack79 run: docker-compose -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" up --build --force-recreate --timeout 300 --remove-orphans --exit-code-from try-runtime80 81 - name: Collect Docker Logs82 if: success() || failure()83 uses: jwalton/gh-docker-logs@v2.2.084 with:85 dest: './try-runtime-logs.${{ matrix.network }}'86 images: 'try-runtime' 8788 - name: Show docker logs89 run: cat './try-runtime-logs.${{ matrix.network }}/try-runtime.log'9091 - name: Stop running containers92 if: always() # run this step always93 run: docker-compose -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" down94 95 - name: Remove builder cache96 if: always() # run this step always97 run: |98 docker builder prune -f -a99 docker system prune -f100 docker image prune -f -a