Skip to content

Commit

Permalink
CI: less matrix, more updated actions
Browse files Browse the repository at this point in the history
  • Loading branch information
badboy committed Sep 11, 2024
1 parent 21eabfe commit bd5ef18
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 37 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,15 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Setup | Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# Cache files between builds
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2

- name: Setup | Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true
profile: minimal
target: ${{ matrix.target }}

- uses: Swatinem/rust-cache@v1
targets: ${{ matrix.target }}

- name: Setup | musl tools
if: matrix.target == 'x86_64-unknown-linux-musl'
Expand Down Expand Up @@ -92,7 +87,7 @@ jobs:
cd -
- name: Post Setup | Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.CRATE_NAME }}-${{ steps.extract_tag.outputs.tag }}-${{ matrix.name }}
path: target/stage/*
Expand All @@ -104,19 +99,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup | Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: Setup | Release notes
run: |
git log -1 --pretty='%s' > RELEASE.md
- name: Build | Publish
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: ${{ env.CRATE_NAME }}-*/${{ env.CRATE_NAME }}-*
body_path: RELEASE.md
Expand Down
30 changes: 6 additions & 24 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,22 @@ env:
jobs:
build_and_test:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
rust: [stable]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true

- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

- name: tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all
run: cargo test --all

check_fmt_and_docs:
name: Checking fmt and docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
override: true

- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

- name: fmt
Expand Down

0 comments on commit bd5ef18

Please sign in to comment.