1name: upgrade nodata234on:5 6 pull_request:7 branches:8 - master9 types:10 - opened11 - reopened12 - synchronize 13 - ready_for_review1415 16 workflow_dispatch:171819env:20 REPO_URL: ${{ github.server_url }}/${{ github.repository }}2122concurrency:23 group: ${{ github.workflow }}-${{ github.ref }}24 cancel-in-progress: true252627jobs:2829 prepare-execution-marix:3031 name: Prepare execution matrix3233 runs-on: XL34 outputs:35 matrix: ${{ steps.create_matrix.outputs.matrix }}3637 steps:3839 - name: Clean Workspace40 uses: AutoModality/action-clean@v1.1.04142 43 - uses: actions/checkout@v344 with:45 ref: ${{ github.head_ref }} 4647 - name: Read .env file48 uses: xom9ikk/dotenv@v1.0.24950 - name: Create Execution matrix51 uses: fabiocaccamo/create-matrix-action@v252 id: create_matrix53 with:54 matrix: |55 network {opal}, runtime {opal}, features {opal-runtime}, mainnet_branch {${{ env.QUARTZ_MAINNET_TAG }}}56 network {quartz}, runtime {quartz}, features {quartz-runtime}, mainnet_branch {${{ env.QUARTZ_MAINNET_TAG }}}57 network {unique}, runtime {unique}, features {unique-runtime}, mainnet_branch {${{ env.UNIQUE_MAINNET_TAG }}}5859 xcm-build:60 needs: prepare-execution-marix61 62 runs-on: [XL]6364 timeout-minutes: 6006566 name: ${{ matrix.network }}6768 continue-on-error: true 6970 strategy:71 matrix:72 include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}737475 steps:76 - name: Skip if pull request is in Draft77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 if: github.event.pull_request.draft == true92 run: exit 19394 - name: Clean Workspace95 uses: AutoModality/action-clean@v1.1.09697 98 - uses: actions/checkout@v399 with:100 ref: ${{ github.head_ref }} 101102 - name: Read .env file103 uses: xom9ikk/dotenv@v1.0.2104105 - name: Generate ENV related extend file for docker-compose106 uses: cuchi/jinja2-action@v1.2.0107 with:108 template: .docker/docker-compose.tmp-xcm.j2109 output_file: .docker/docker-compose-xcm.${{ matrix.network }}.yml110 variables: |111 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git112 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}113 NETWORK=${{ matrix.network }}114 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}115 POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}116 MAINNET_BRANCH=${{ matrix.mainnet_branch }}117 FEATURE=${{ matrix.features }}118 RUNTIME=${{ matrix.runtime }}119 BRANCH=${{ github.head_ref }}120 ACALA_BUILD_BRANCH=${{ env.ACALA_BUILD_BRANCH }}121 MOONBEAM_BUILD_BRANCH=${{ env.MOONBEAM_BUILD_BRANCH }}122 CUMULUS_BUILD_BRANCH=${{ env.CUMULUS_BUILD_BRANCH }}123124 - name: Show build configuration125 run: cat .docker/docker-compose-xcm.${{ matrix.network }}.yml126127 - name: Show launch-config-xcm-${{ matrix.network }} configuration128 run: cat .docker/xcm-config/launch-config-xcm-${{ matrix.network }}.json129130 - name: Build the stack131 run: docker-compose -f ".docker/docker-compose-xcm.yml" -f ".docker/docker-compose-xcm.${{ matrix.network }}.yml" up -d --build132133 - name: Collect Docker Logs134 if: success() || failure()135 uses: jwalton/gh-docker-logs@v2.2.0136 with:137 dest: './xcm-build-logs.${{ matrix.features }}'138 images: 'xcm-nodes-${{ matrix.network }}'139140 - name: Show docker logs141 if: success() || failure()142 run: cat './xcm-build-logs.${{ matrix.features }}/xcm-nodes-${{ matrix.network }}.log'143144 - name: Stop running containers145 if: always() 146 run: docker-compose -f ".docker/docker-compose-xcm.yml" -f ".docker/docker-compose-xcm.${{ matrix.network }}.yml" down147148 - name: Log in to Docker Hub149 uses: docker/login-action150 with:151 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}152 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}153154 - name: Tag docker image155 run: docker tag xcm_nodes_${{ matrix.network }} uniquenetwork/xcm-${{ matrix.network }}-testnet-local:nightly-${{ github.head_ref }}-${{ github.sha }}156157 - name: Push docker image158 run: docker push uniquenetwork/xcm-${{ matrix.network }}-testnet-local:nightly-${{ github.head_ref }}-${{ github.sha }}159160 testnet-build:161 needs: prepare-execution-marix162 163 runs-on: [XL]164165 timeout-minutes: 600166167 name: ${{ matrix.network }}168169 continue-on-error: true 170171 strategy:172 matrix:173 include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}174175 steps:176 - name: Skip if pull request is in Draft177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 if: github.event.pull_request.draft == true192 run: exit 1193194 - name: Clean Workspace195 uses: AutoModality/action-clean@v1.1.0196197 198 - uses: actions/checkout@v3199 with:200 ref: ${{ github.head_ref }} 201202 - name: Read .env file203 uses: xom9ikk/dotenv@v1.0.2204205 - name: Generate ENV related extend file for docker-compose206 uses: cuchi/jinja2-action@v1.2.0207 with:208 template: .docker/docker-compose.tmp-testnet.j2209 output_file: .docker/docker-compose-testnet.${{ matrix.network }}.yml210 variables: |211 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git212 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}213 NETWORK=${{ matrix.network }}214 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}215 POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}216 MAINNET_BRANCH=${{ matrix.mainnet_branch }}217 FEATURE=${{ matrix.features }}218 RUNTIME=${{ matrix.runtime }}219 BRANCH=${{ github.head_ref }}220221 - name: Show build configuration222 run: cat .docker/docker-compose-testnet.${{ matrix.network }}.yml223224 - name: Build the stack225 run: docker-compose -f ".docker/docker-compose-testnet.yml" -f ".docker/docker-compose-testnet.${{ matrix.network }}.yml" up -d --build226227 - name: Collect Docker Logs228 if: success() || failure()229 uses: jwalton/gh-docker-logs@v2.2.0230 with:231 dest: './testnet-build-logs.${{ matrix.features }}'232 images: 'testnet_node_${{ matrix.network }}'233234 - name: Show docker logs235 if: success() || failure()236 run: cat './testnet-build-logs.${{ matrix.features }}/testnet_node_${{ matrix.network }}.log'237238 - name: Stop running containers239 if: always() 240 run: docker-compose -f ".docker/docker-compose-testnet.yml" -f ".docker/docker-compose-testnet.${{ matrix.network }}.yml" down241242 - name: Log in to Docker Hub243 uses: docker/login-action244 with:245 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}246 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}247248 - name: Tag docker image249 run: docker tag testnet_node_${{ matrix.network }} uniquenetwork/${{ matrix.network }}-testnet-local:nightly-${{ github.head_ref }}-${{ github.sha }}250251 - name: Push docker image252 run: docker push uniquenetwork/${{ matrix.network }}-testnet-local:nightly-${{ github.head_ref }}-${{ github.sha }}253254