Skip to content
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
25 changes: 11 additions & 14 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jobs:

runs-on: macos-latest

env:
MACOSX_DEPLOYMENT_TARGET: 11
SCCACHE_GHA_ENABLED: "true"
SCCACHE_CACHE_SIZE: 2G
RUSTC_WRAPPER: "sccache"

steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
Expand All @@ -28,17 +34,9 @@ jobs:
toolchain: stable
override: true

- name: Cache Cargo registry and build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- uses: Swatinem/rust-cache@v2
- uses: mozilla-actions/sccache-action@v0.0.9
- run: sccache --show-stats || true
- uses: actions/configure-pages@v5

- name: Copy docs to /docs folder
Expand All @@ -54,11 +52,10 @@ jobs:
# Redirect root index to crate doc
echo '<meta http-equiv="refresh" content="0; url=defaults_rs/index.html">' > docs/index.html

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
- uses: actions/upload-pages-artifact@v3
with:
path: "docs"

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
id: deployment
25 changes: 11 additions & 14 deletions .github/workflows/refactor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ jobs:
tests:
runs-on: macos-latest

env:
MACOSX_DEPLOYMENT_TARGET: 11
SCCACHE_GHA_ENABLED: "true"
SCCACHE_CACHE_SIZE: 2G
RUSTC_WRAPPER: "sccache"

steps:
- uses: actions/checkout@v5

Expand All @@ -31,17 +37,8 @@ jobs:
override: true
components: clippy, rustfmt

- name: Run rust-cache action
uses: Swatinem/rust-cache@v2

- name: Run sccache-cache action
uses: mozilla-actions/sccache-action@v0.0.9

- name: sccache stats
run: sccache --show-stats || true

- name: Run Clippy
run: cargo clippy --all-targets --no-deps -v -- -D warnings

- name: Check formatting
run: cargo fmt --all -- --check
- uses: Swatinem/rust-cache@v2
- uses: mozilla-actions/sccache-action@v0.0.9
- run: sccache --show-stats || true
- run: cargo clippy --all-targets --no-deps -v -- -D warnings
- run: cargo fmt --all -- --check
27 changes: 6 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,11 @@ jobs:
toolchain: stable
override: true

- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.9
- uses: Swatinem/rust-cache@v2
- uses: mozilla-actions/sccache-action@v0.0.9
- run: sccache --show-stats || true

- name: sccache stats
run: sccache --show-stats || true

- name: Cache Cargo registry and build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- name: Build release artifact
run: cargo build --release --verbose --locked --features cli
- run: cargo build --release --verbose --locked --features cli

- name: Package release
run: |
Expand All @@ -64,14 +51,12 @@ jobs:
echo "$body" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- name: Release
uses: softprops/action-gh-release@v2
- uses: softprops/action-gh-release@v2
with:
body: ${{ steps.release_body.outputs.body }}
files: ${{ env.FILE_NAME }}

- name: Prepare Crates.io README
run: sed -i '' '/^>/d' README.md
- run: sed -i '' '/^>/d' README.md

- name: Publish to crates.io
env:
Expand Down
Loading