From fff87fa80f8915742569cea1e09aa2ee6b29973b Mon Sep 17 00:00:00 2001 From: kalanamithm Date: Tue, 9 May 2023 18:11:09 +1200 Subject: [PATCH 1/6] Initial commit --- .github/workflows/ci.yml | 71 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..9b198cad --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,71 @@ +name: CI +on: + push: + branches: + - '*' + pull_request: + branches: + - '*' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + inputs: + CLEAN_BUILD: + description: "Clean build" + required: true + type: boolean + +jobs: + build-image: + # The type of runner that the job will run on + runs-on: ubuntu-21.04 + + # cancel concurrent builds on the same branch + concurrency: + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2022-04-24 + components: rustfmt, llvm-tools-preview + target: wasm32-unknown-unknown + default: true + + - name: Cache restore + uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Clean + if: ${{ github.event.inputs.CLEAN_BUILD == 'true' }} + run: cargo clean + + - name: Check format + run: cargo fmt --all -- --check + + - name: Check release + run: cargo check --release + + - name: Build + run: cargo build --release + + - name: Test + run: cargo test --release + + - name: Benchmarking + run: > + pushd node && + cargo check --features=runtime-benchmarks --release From b9aa7b93a803585b9896d9cae3044b37f80803f7 Mon Sep 17 00:00:00 2001 From: kalanamithm Date: Tue, 9 May 2023 18:18:44 +1200 Subject: [PATCH 2/6] enabled concurrent builds --- .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 9b198cad..993b383a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: # cancel concurrent builds on the same branch concurrency: group: ${{ github.head_ref || github.run_id }} - cancel-in-progress: true + cancel-in-progress: false steps: - name: Checkout code From 9a4aa4a2cd13feed845f46b113bc95b20c7d6ee5 Mon Sep 17 00:00:00 2001 From: kalanamithm Date: Tue, 9 May 2023 18:25:04 +1200 Subject: [PATCH 3/6] enabled concurrent builds --- .github/workflows/ci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 993b383a..ddb9ca97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,15 +6,6 @@ on: pull_request: branches: - '*' - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - inputs: - CLEAN_BUILD: - description: "Clean build" - required: true - type: boolean - jobs: build-image: # The type of runner that the job will run on From dd267ae163696927df32e39069a20962b9fb4ed1 Mon Sep 17 00:00:00 2001 From: kalanamithm Date: Tue, 9 May 2023 18:35:59 +1200 Subject: [PATCH 4/6] enabled concurrent builds --- .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 ddb9ca97..d50d940b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: jobs: build-image: # The type of runner that the job will run on - runs-on: ubuntu-21.04 + runs-on: ubuntu-latest # cancel concurrent builds on the same branch concurrency: From 339b4d25d2c6c3253e975cab8787ad6dccb99a13 Mon Sep 17 00:00:00 2001 From: kalanamithm Date: Tue, 9 May 2023 18:47:26 +1200 Subject: [PATCH 5/6] enabled concurrent builds --- .github/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d50d940b..0269e0ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,6 +57,4 @@ jobs: run: cargo test --release - name: Benchmarking - run: > - pushd node && - cargo check --features=runtime-benchmarks --release + run: cargo test --features runtime-benchmarks From 9a91631fd161952b8030a9027971c74e50179394 Mon Sep 17 00:00:00 2001 From: kalanamithm Date: Tue, 9 May 2023 20:36:20 +1200 Subject: [PATCH 6/6] enabled concurrent builds --- .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 0269e0ef..9d6ebf9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: branches: - '*' jobs: - build-image: + build: # The type of runner that the job will run on runs-on: ubuntu-latest