From 7c3496d63e74f3e0c0d652f143ea3ece02efc7f7 Mon Sep 17 00:00:00 2001 From: Robert Jonczy Date: Tue, 21 Nov 2023 13:05:37 +0100 Subject: [PATCH] Ci optimise cloud costs (#450) * run on selected branches * run on ubuntu-latest * run checker on ubuntu-latest-m * run on self hosted x64-tiny * run tests on self-holted but tiny instance * run for specific branches * run tests on monster * run tests on master and release* branches --- .github/workflows/checks.yml | 15 +++++++++++---- .github/workflows/hyperspace-docker-image.yml | 8 ++++---- .github/workflows/lint.yml | 12 +++++++----- .github/workflows/parachain-node-docker-image.yml | 4 +--- .github/workflows/test.yml | 6 ++---- 5 files changed, 25 insertions(+), 20 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 7a1278123..2522afcd9 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -3,22 +3,29 @@ name: Cargo Check on: pull_request: branches: - - '*' + - 'master' + - 'develop' + - 'release*' push: branches: - - master - + - 'master' + - 'develop' + - 'release*' jobs: checker: + concurrency: group: lint-${{ github.ref }} cancel-in-progress: true + container: image: paritytech/ci-unified:bullseye-1.71.0-v20230727 + runs-on: - self-hosted - - x64-monster + - x64-tiny + steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/hyperspace-docker-image.yml b/.github/workflows/hyperspace-docker-image.yml index 48ba554e4..3c7768105 100644 --- a/.github/workflows/hyperspace-docker-image.yml +++ b/.github/workflows/hyperspace-docker-image.yml @@ -3,7 +3,9 @@ name: "Build and publish Hyperspace Docker image" on: push: branches: - - '*' + - 'master' + - 'develop' + - 'release*' tags: - 'v*' @@ -16,9 +18,7 @@ jobs: name: Build & push docker image - runs-on: - - self-hosted - - x64-monster + runs-on: ubuntu-latest concurrency: group: hyperspace-docker-image-${{ github.ref }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b6c6b1895..5ea372c9f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,10 +3,14 @@ name: Lint on: pull_request: branches: - - '*' + - 'master' + - 'develop' + - 'release*' push: branches: - - master + - 'master' + - 'develop' + - 'release*' jobs: linters: @@ -16,9 +20,7 @@ jobs: cancel-in-progress: true container: image: paritytech/ci-unified:bullseye-1.71.0-v20230727 - runs-on: - - self-hosted - - x64-monster + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/parachain-node-docker-image.yml b/.github/workflows/parachain-node-docker-image.yml index fdfe1d43b..988666358 100644 --- a/.github/workflows/parachain-node-docker-image.yml +++ b/.github/workflows/parachain-node-docker-image.yml @@ -13,9 +13,7 @@ on: jobs: build-and-publish: - runs-on: - - self-hosted - - x64-monster + runs-on: ubuntu-latest concurrency: group: parachain-node-docker-image-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2ed51afc0..974f0e708 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,12 +1,10 @@ name: Test on: - pull_request: - branches: - - '*' push: branches: - - master + - 'master' + - 'release*' env: DEBIAN_FRONTEND: noninteractive