12345on:6 workflow_call:789jobs: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 24 - uses: actions/checkout@v325 with:26 ref: ${{ github.head_ref }} 2728 - 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}, wasm_name {opal}, replica_from_address {${{ env.OPAL_REPLICA_FROM }}}37 network {sapphire}, wasm_name {opal}, replica_from_address {${{ env.SAPPHIRE_REPLICA_FROM }}}38 network {quartz}, wasm_name {quartz}, replica_from_address {${{ env.QUARTZ_REPLICA_FROM }}}39 network {unique}, wasm_name {unique}, replica_from_address {${{ env.UNIQUE_REPLICA_FROM }}}4041 try-runtime:42 needs: prepare-execution-marix4344 45 runs-on: [self-hosted-ci]46 continue-on-error: true 4748 name: ${{ matrix.network }}-try-runtime49 strategy:50 matrix:51 include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}52 53 steps:5455 - name: Clean Workspace56 uses: AutoModality/action-clean@v1.1.05758 59 - uses: actions/checkout@v360 with:61 ref: ${{ github.head_ref }} 6263 - name: Read .env file64 uses: xom9ikk/dotenv@v26566 - name: Generate ENV related extend file for docker-compose67 uses: cuchi/jinja2-action@v1.2.068 with:69 template: .docker/docker-compose.tmp-try-runtime.j270 output_file: .docker/docker-compose.try-runtime.${{ matrix.network }}.yml71 variables: |72 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}73 NETWORK=${{ matrix.network }}74 WASM_NAME=${{ matrix.wasm_name }}75 REPLICA_FROM=${{ matrix.replica_from_address }}7677 - name: Show build configuration78 run: cat .docker/docker-compose.try-runtime.${{ matrix.network }}.yml7980 - name: Build the stack81 run: docker-compose -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" up --build --force-recreate --timeout 300 --remove-orphans --exit-code-from try-runtime82 83 - name: Collect Docker Logs84 if: success() || failure()85 uses: jwalton/gh-docker-logs@v2.2.086 with:87 dest: './try-runtime-logs.${{ matrix.network }}'88 images: 'try-runtime' 8990 - name: Show docker logs91 run: cat './try-runtime-logs.${{ matrix.network }}/try-runtime.log'9293 - name: Stop running containers94 if: always() 95 run: docker-compose -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" down96 97 - name: Remove builder cache98 if: always() 99 run: |100 docker builder prune -f -a101 docker system prune -f102 docker image prune -f -a