From 6513b3a1d41e02cdad38f78415ec03a1cd0642a0 Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Sat, 25 Mar 2023 15:25:27 +0100 Subject: [PATCH 1/7] Added steps to the CI to upload compiled node binary as an artifact --- .github/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0db72704..1eba041ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: Continuous Integration on: pull_request: [] push: - branches: [Develop, main-net-runtime, redux-ci-testing] + branches: [Develop, mainnet-release] env: RUNNER_INSTANCE_TYPE: c5.4xlarge @@ -101,6 +101,16 @@ jobs: with: name: code-coverage-report path: cobertura.xml + - name: Zip compiled binaries + if: contains(github.ref, "Develop") + run: zip ./target/release/polkadex-node.zip ./target/release/polkadex-node + - name: Upload zipped binaries as an artifact + if: contains(github.ref, "Develop") + uses: actions/upload-artifact@v3 + with: + name: polkadex-node + path: ./target/release/polkadex-node.zip + if-no-files-found: error stop-runner: name: Stop self-hosted EC2 runner needs: From 7cf2fcdfe9d902f5e782e888a653f22c5ab05887 Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Sat, 25 Mar 2023 15:26:16 +0100 Subject: [PATCH 2/7] Revert after test --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1eba041ba..a2e039437 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: Continuous Integration on: pull_request: [] push: - branches: [Develop, mainnet-release] + branches: [Develop, mainnet-release, ci-node-artifact] env: RUNNER_INSTANCE_TYPE: c5.4xlarge @@ -102,10 +102,10 @@ jobs: name: code-coverage-report path: cobertura.xml - name: Zip compiled binaries - if: contains(github.ref, "Develop") + if: contains(github.ref, "ci-node-artifact") run: zip ./target/release/polkadex-node.zip ./target/release/polkadex-node - name: Upload zipped binaries as an artifact - if: contains(github.ref, "Develop") + if: contains(github.ref, "ci-node-artifact") uses: actions/upload-artifact@v3 with: name: polkadex-node From 0e58b8f2eec6162d5f1d01994c71fade00815e77 Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Sat, 25 Mar 2023 15:32:32 +0100 Subject: [PATCH 3/7] Code style fix --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2e039437..b3a451b39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,10 +102,10 @@ jobs: name: code-coverage-report path: cobertura.xml - name: Zip compiled binaries - if: contains(github.ref, "ci-node-artifact") + if: contains(github.ref, 'ci-node-artifact') run: zip ./target/release/polkadex-node.zip ./target/release/polkadex-node - name: Upload zipped binaries as an artifact - if: contains(github.ref, "ci-node-artifact") + if: contains(github.ref, 'ci-node-artifact') uses: actions/upload-artifact@v3 with: name: polkadex-node From ae321c397af22a0cec360e2eb85b67ad8437208c Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Mon, 27 Mar 2023 00:39:32 +0200 Subject: [PATCH 4/7] Installed zip dependency in the CI workflow --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3a451b39..e7844994e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: run: | cat /etc/issue apt update - apt install -y clang lldb lld gcc + apt install -y clang lldb lld gcc zip - name: Install latest nightly with wasm target uses: actions-rs/toolchain@v1 with: From 50e5cee3fe15095ff191957546659a6479e5f56d Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Mon, 27 Mar 2023 13:45:52 +0200 Subject: [PATCH 5/7] Corrected CI artifact zipping command --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7844994e..39f3089c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,7 +103,8 @@ jobs: path: cobertura.xml - name: Zip compiled binaries if: contains(github.ref, 'ci-node-artifact') - run: zip ./target/release/polkadex-node.zip ./target/release/polkadex-node + # Zipping is required since billing is based on the raw uploaded size. + run: zip -r -j polkadex-node.zip ./target/release/polkadex-node - name: Upload zipped binaries as an artifact if: contains(github.ref, 'ci-node-artifact') uses: actions/upload-artifact@v3 From 14520f0748ea050d159e9d0bb916f75229635e7a Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Mon, 27 Mar 2023 15:15:37 +0200 Subject: [PATCH 6/7] Fixed artifact path in the CI workflow --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39f3089c8..7c21d7931 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,7 +110,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: polkadex-node - path: ./target/release/polkadex-node.zip + path: ./polkadex-node.zip if-no-files-found: error stop-runner: name: Stop self-hosted EC2 runner From 0ce52a9e2c087350b63d732b439f29e4fbd3a8af Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Mon, 27 Mar 2023 21:03:20 +0200 Subject: [PATCH 7/7] Revert "Revert after test" This reverts commit 7cf2fcdfe9d902f5e782e888a653f22c5ab05887. # Conflicts: # .github/workflows/ci.yml --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c21d7931..002d254f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: Continuous Integration on: pull_request: [] push: - branches: [Develop, mainnet-release, ci-node-artifact] + branches: [Develop, mainnet-release] env: RUNNER_INSTANCE_TYPE: c5.4xlarge @@ -102,11 +102,11 @@ jobs: name: code-coverage-report path: cobertura.xml - name: Zip compiled binaries - if: contains(github.ref, 'ci-node-artifact') + if: contains(github.ref, 'Develop') # Zipping is required since billing is based on the raw uploaded size. run: zip -r -j polkadex-node.zip ./target/release/polkadex-node - name: Upload zipped binaries as an artifact - if: contains(github.ref, 'ci-node-artifact') + if: contains(github.ref, 'Develop') uses: actions/upload-artifact@v3 with: name: polkadex-node