Skip to content

Commit

Permalink
ci: restructure actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodie committed Sep 10, 2024
1 parent beade40 commit c0ffee2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 30 deletions.
28 changes: 3 additions & 25 deletions .github/workflows/ci.yml → .github/workflows/build-platforms.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,10 @@
name: Continuous Integration
on:
push:
branches:
- main
pull_request:
name: Build Platforms
# This workflow is triggered on pushes to the repository.
on: [ pull_request, workflow_call, workflow_dispatch ]

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
Expand Down Expand Up @@ -70,7 +51,6 @@ jobs:

windows:
name: windows
needs: pr_check
runs-on: windows-latest
strategy:
matrix:
Expand All @@ -95,10 +75,8 @@ jobs:
- name: clippy (default features)
run: cargo clippy -- -D warnings


macos:
name: macos
needs: pr_check
runs-on: macos-latest
strategy:
matrix:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand All @@ -31,6 +30,4 @@ jobs:
- name: cargo-fmt
run: cargo fmt --all --check

#- name: clippy
# run: cargo clippy --all-features -- -D warnings

18 changes: 18 additions & 0 deletions .github/workflows/semver-checks.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c0ffee2

Please sign in to comment.