diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 87f2b60..92b8119 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -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 @@ -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 @@ -54,11 +52,10 @@ jobs: # Redirect root index to crate doc echo '' > 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 diff --git a/.github/workflows/refactor.yml b/.github/workflows/refactor.yml index 969476e..40d5e95 100644 --- a/.github/workflows/refactor.yml +++ b/.github/workflows/refactor.yml @@ -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 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e12680b..ef598ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: | @@ -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: