From 2deee0cf10e51f97b93c7ca586266c2a6ab25ee8 Mon Sep 17 00:00:00 2001 From: Dmitri <4452412+demisx@users.noreply.github.com> Date: Tue, 13 Sep 2022 13:24:07 -0700 Subject: [PATCH] activate main v2 workflow for testing --- .../{main-v2.yml.xxx => main-v2.yml} | 28 ++++++++++++++----- docker-compose.yml | 8 ++++-- 2 files changed, 26 insertions(+), 10 deletions(-) rename .github/workflows/{main-v2.yml.xxx => main-v2.yml} (76%) diff --git a/.github/workflows/main-v2.yml.xxx b/.github/workflows/main-v2.yml similarity index 76% rename from .github/workflows/main-v2.yml.xxx rename to .github/workflows/main-v2.yml index 35dbd007e8..208c398f7f 100644 --- a/.github/workflows/main-v2.yml.xxx +++ b/.github/workflows/main-v2.yml @@ -7,7 +7,7 @@ name: Build Main jobs: build_prep: name: build-prep - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" outputs: matrix: ${{ steps.set-build-param.outputs.matrix }} steps: @@ -16,9 +16,9 @@ jobs: - id: set-build-param uses: JoshuaTheMiller/conditional-build-matrix@b9af2b1b137d7bd7818c1233ef830b326809a7cc with: - inputFile: '.github/workflows/build-params.json' + inputFile: ".github/workflows/build-params.json" # we run build-node on every workflow but build-runtime only on pushes to branches - filter: '[?run_on_event==`any` || run_on_event==`${{ github.event_name }}`]' + filter: "[?run_on_event==`any` || run_on_event==`${{ github.event_name }}`]" build: needs: build_prep strategy: @@ -47,8 +47,8 @@ jobs: - if: matrix.target == 'build-runtime' || matrix.target == 'build-runtime-rococo' uses: Swatinem/rust-cache@v1 with: # cache the runtime target instead of root target for build-runtime - working-directory: './runtime' - target-dir: './target/frequency' + working-directory: "./runtime" + target-dir: "./target/frequency" - if: matrix.target == 'build-node' uses: Swatinem/rust-cache@v1 - name: ${{ matrix.target }} @@ -76,7 +76,21 @@ jobs: date_tag=$(date +'%Y%m%d-%H%M') echo ${date_tag} echo "TAG=${date_tag}" >> $GITHUB_ENV - - name: Build and push Frequency image in instant seal mode + - name: Build Frequency related specs and wasm 📝 + if: matrix.target == 'build-node' + run: ./scripts/generate_specs.sh 2000 rococo-2000 + - name: Build and push Frequency local collator image + if: matrix.target == 'build-node' + id: docker_build_frequency + uses: docker/build-push-action@v3 + with: + context: . + push: true + file: docker/collator-node-local.dockerfile + tags: | + frequencychain/frequency:${{ env.TAG }} + frequencychain/frequency:latest + - name: Build and push Frequency local parachain image in instant seal mode if: matrix.target == 'build-node' id: docker_build_instant_seal_node uses: docker/build-push-action@v3 @@ -87,7 +101,7 @@ jobs: tags: | frequencychain/instant-seal-node:${{env.TAG}} frequencychain/instant-seal-node:latest - - name: Build and push Frequency image for Rococo testnet and Mainnet + - name: Build and push Frequency parachain image for Rococo testnet and Mainnet if: matrix.target == 'build-node' id: docker_build_frequency uses: docker/build-push-action@v3 diff --git a/docker-compose.yml b/docker-compose.yml index 4c8f000d62..d3a228d9da 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -62,9 +62,11 @@ services: collator_frequency: container_name: frequency - build: - context: . - dockerfile: docker/collator-node-local.dockerfile + image: frequencychain/frequency + # Replace image with build if you want to build locally instead of pulling + # build: + # context: . + # dockerfile: docker/collator-node-local.dockerfile environment: - HOST_ALICE=relay_alice - HOST_BOB=relay_bob