git.delta.rocks / unique-network / refs/commits / 9581cf6201ab

difftreelog

source

.github/workflows/xcm-testnet-build.yml5.3 KiBsourcehistory
1name: xcm-testnet-build23# Controls when the action will run.4on:5 # Triggers the workflow on push or pull request events but only for the master branch6  pull_request:7    branches:8      - master9    types:10      - opened11      - reopened12      - synchronize   #commit(s) pushed to the pull request13      - ready_for_review1415  # Allows you to run this workflow manually from the Actions tab16  workflow_dispatch:1718#Define Workflow variables19env:20  REPO_URL: ${{ github.server_url }}/${{ github.repository }}2122concurrency:23  group: ${{ github.workflow }}-${{ github.head_ref }}24  cancel-in-progress: true2526# A workflow run is made up of one or more jobs that can run sequentially or in parallel27jobs: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      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it43      - uses: actions/checkout@v344        with:45          ref: ${{ github.head_ref }}  #Checking out head commit4647      - 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}56            network {quartz}, runtime {quartz}, features {quartz-runtime}57            network {unique}, runtime {unique}, features {unique-runtime}5859  xcm-build:60    needs: prepare-execution-marix61    # The type of runner that the job will run on62    runs-on: [XL]6364    timeout-minutes: 6006566    name: ${{ matrix.network }}6768    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.6970    strategy:71      matrix:72        include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}737475    steps:76      - name: Skip if pull request is in Draft77        if: github.event.pull_request.draft == true78        run: exit 17980      - name: Clean Workspace81        uses: AutoModality/action-clean@v1.1.08283      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it84      - uses: actions/checkout@v385        with:86          ref: ${{ github.head_ref }}  #Checking out head commit8788      - name: Read .env file89        uses: xom9ikk/dotenv@v1.0.29091      - name: Generate ENV related extend Dockerfile file92        uses: cuchi/jinja2-action@v1.2.093        with:94          template: .docker/Dockerfile-xcm.j295          output_file: .docker/Dockerfile-xcm.${{ matrix.network }}.yml96          variables: |97            RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}98            NETWORK=${{ matrix.network }}99            POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}100            POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}101            FEATURE=${{ matrix.features }}102            RUNTIME=${{ matrix.runtime }}103            BRANCH=${{ github.head_ref }}104            ACALA_BUILD_BRANCH=${{ env.ACALA_BUILD_BRANCH }}105            MOONBEAM_BUILD_BRANCH=${{ env.MOONBEAM_BUILD_BRANCH }}106            CUMULUS_BUILD_BRANCH=${{ env.CUMULUS_BUILD_BRANCH }}107108      - name: Show build Dockerfile109        run: cat .docker/Dockerfile-xcm.${{ matrix.network }}.yml110111      - name: Show launch-config-xcm-${{ matrix.network }} configuration112        run: cat .docker/xcm-config/launch-config-xcm-${{ matrix.network }}.json113114     - name: Run find-and-replace to remove slashes from branch name115        uses: mad9000/actions-find-and-replace-string@2116        id: branchname117        with:118          source: ${{ github.head_ref }}119          find: '/'120          replace: '-'121122      - name: Log in to Docker Hub123        uses: docker/login-action@v2.0.0124        with:125          username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}126          password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}127128      - name: Pull acala docker image129        run: docker pull uniquenetwork/builder-acala:${{ env.ACALA_BUILD_BRANCH }}130131      - name: Pull moonbeam docker image132        run: docker pull uniquenetwork/builder-moonbeam:${{ env.MOONBEAM_BUILD_BRANCH }}133134      - name: Pull cumulus docker image135        run: docker pull uniquenetwork/builder-cumulus:${{ env.CUMULUS_BUILD_BRANCH }}136137      - name: Pull polkadot docker image138        run: docker pull uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}139140      - name: Pull chainql docker image141        run: docker pull uniquenetwork/builder-chainql:latest142143      - name: Build the stack144        run: cd .docker/ && docker build --no-cache --file ./Dockerfile-xcm.${{ matrix.network }}.yml --tag uniquenetwork/xcm-${{ matrix.network }}-testnet-local:nightly-${{ steps.branchname.outputs.value }}-${{ github.sha }} --tag uniquenetwork/xcm-${{ matrix.network }}-testnet-local:latest .145146      - name: Push docker version image 147        run: docker push uniquenetwork/xcm-${{ matrix.network }}-testnet-local:nightly-${{ steps.branchname.outputs.value }}-${{ github.sha }}148149      - name: Push docker image latest150        run: docker push uniquenetwork/xcm-${{ matrix.network }}-testnet-local:latest151152      - name: Remove builder cache153        if: always()                   # run this step always154        run: |155          docker builder prune -f156          docker system prune -f157