Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update ci #726

Merged
merged 2 commits into from
Jun 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
on:
pull_request_target:
types: [labeled, unlabeled, opened, synchronize, reopened]

name: Changelog check

Expand All @@ -12,7 +13,7 @@ jobs:
uses: actions/checkout@v3

- name: Changelog updated
uses: Zomzog/changelog-checker@v1.2.0
uses: Zomzog/changelog-checker@v1.3.0
with:
fileName: CHANGELOG.md
env:
Expand Down
38 changes: 12 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ jobs:
name: CI
runs-on: ubuntu-latest
needs: [check, ci-linux, ci-clippy, ci-serde]
if: always()
steps:
- name: Done
run: exit 0
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preparation for merge queue


check:
name: Cargo check
name: Cargo check / clippy
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -24,22 +25,18 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.TARGET }}
targets: ${{ matrix.TARGET }}
components: clippy

- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.TARGET }}

- uses: actions-rs/cargo@v1
with:
command: check
args: --target ${{ matrix.TARGET }}
- run: cargo clippy --target ${{ matrix.TARGET }}

ci-linux:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -88,11 +85,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true

- name: Cache
uses: Swatinem/rust-cache@v2
Expand All @@ -114,11 +109,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true

- name: Cache
uses: Swatinem/rust-cache@v2
Expand All @@ -139,11 +132,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true

- name: Cache
uses: Swatinem/rust-cache@v2
Expand All @@ -166,17 +157,12 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt

- name: Cache Dependencies
uses: Swatinem/rust-cache@v2

- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- run: cargo fmt --all -- --check
22 changes: 0 additions & 22 deletions .github/workflows/clippy.yml

This file was deleted.

13 changes: 4 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,15 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
target: ${{ matrix.target }}
override: true
targets: ${{ matrix.target }}
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- uses: actions-rs/cargo@v1
with:
command: build
args: --target ${{ matrix.target }} --release
- run: cargo build --target ${{ matrix.target }} --release

- name: Compress and rename executable
if: ${{ matrix.os != 'windows-latest' }}
Expand Down Expand Up @@ -69,7 +64,7 @@ jobs:
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

- id: changelog-reader
uses: mindsers/changelog-reader-action@v2.0.0
uses: mindsers/changelog-reader-action@v2.2.2
with:
version: ${{ (github.ref_type == 'tag' && github.ref_name) || 'Unreleased' }}

Expand Down