diff --git a/.github/workflows/ci.yml b/.github/workflows/build-platforms.yml similarity index 82% rename from .github/workflows/ci.yml rename to .github/workflows/build-platforms.yml index de655bb1..85512cc9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/build-platforms.yml @@ -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 @@ -70,7 +51,6 @@ jobs: windows: name: windows - needs: pr_check runs-on: windows-latest strategy: matrix: @@ -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: 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