From c0ffee48aa338f9d8431e68676e624e16e0d37ff Mon Sep 17 00:00:00 2001 From: Hendrik Sollich Date: Wed, 11 Sep 2024 00:01:46 +0200 Subject: [PATCH] ci: restructure actions --- .../workflows/{ci.yml => build-platforms.yml} | 21 +------------------ .github/workflows/pull-request.yml | 7 ++----- .github/workflows/semver-checks.yml | 18 ++++++++++++++++ 3 files changed, 21 insertions(+), 25 deletions(-) rename .github/workflows/{ci.yml => build-platforms.yml} (84%) create mode 100644 .github/workflows/semver-checks.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/build-platforms.yml similarity index 84% rename from .github/workflows/ci.yml rename to .github/workflows/build-platforms.yml index de655bb1..bd5a82b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/build-platforms.yml @@ -1,4 +1,4 @@ -name: Continuous Integration +name: Build Platforms on: push: branches: @@ -6,24 +6,8 @@ on: pull_request: jobs: - pr_check: - name: Pull Request Check - uses: ./.github/workflows/pull-request.yml - - semver: - name: cargo-semver-checks - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - - uses: Swatinem/rust-cache@v2 - - - name: check semver - uses: obi1kenobi/cargo-semver-checks-action@v2.6 - linux: name: linux - needs: pr_check runs-on: ubuntu-latest strategy: #fail-fast: true @@ -70,7 +54,6 @@ jobs: windows: name: windows - needs: pr_check runs-on: windows-latest strategy: matrix: @@ -95,10 +78,8 @@ jobs: - name: clippy (default features) run: cargo clippy -- -D warnings - macos: name: macos - needs: pr_check runs-on: macos-latest strategy: matrix: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index b0efc7e6..8b1a7870 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,6 +1,6 @@ name: Pull request # This workflow is triggered on pushes to the repository. -on: [ pull_request, workflow_call, workflow_dispatch ] +on: [ pull_request ] jobs: check: @@ -19,9 +19,8 @@ jobs: ./convco check ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} rm convco - check_fmt_clippy: + check_fmt: name: Check Format - needs: check runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -31,6 +30,4 @@ jobs: - name: cargo-fmt run: cargo fmt --all --check - #- name: clippy - # run: cargo clippy --all-features -- -D warnings diff --git a/.github/workflows/semver-checks.yml b/.github/workflows/semver-checks.yml new file mode 100644 index 00000000..2a242719 --- /dev/null +++ b/.github/workflows/semver-checks.yml @@ -0,0 +1,18 @@ +name: Semver Checks +on: + push: + branches: + - main + pull_request: + +jobs: + semver: + name: cargo-semver-checks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + + - name: check semver + uses: obi1kenobi/cargo-semver-checks-action@v2.6