Skip to content

Commit

Permalink
Ci fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed May 22, 2024
1 parent 439b079 commit 6fb6703
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
33 changes: 19 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ env:
RUST_MIN_VER: "1.70"
# List of packages that will be checked with the minimum supported Rust version.
# This should be limited to packages that are intended for publishing.
RUST_MIN_VER_PKGS: "-p parley -p fontique"
# List of packages that will be checked with libm feature
# This should be limited to packages that have that feature
NO_STD_PKGS: "-p parley -p fontique"
PRIMARY_PKGS: "-p parley -p fontique"
# List of packages that are not published on crates.io (examples, etc)
EXAMPLE_PKGS: "-p tiny_skia_render"
# List of features that depend on the standard library and will be excluded from no_std checks.
FEATURES_DEPENDING_ON_STD: "std,default,system"

Expand Down Expand Up @@ -107,13 +106,16 @@ jobs:

# TODO: Add --target x86_64-unknown-none to the no_std check once we solve the compilation issues with it
- name: cargo clippy (no_std)
run: cargo hack clippy ${{ env.NO_STD_PKGS }} --locked --optional-deps --each-feature --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} -- -D warnings
run: cargo hack clippy ${{ env.PUBLIC_PKGS }} --locked --optional-deps --each-feature --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} -- -D warnings

- name: cargo clippy
run: cargo hack clippy --workspace --locked --optional-deps --each-feature --features std -- -D warnings
run: cargo hack clippy ${{ env.PUBLIC_PKGS }} --locked --optional-deps --each-feature --features std -- -D warnings

- name: cargo clippy (auxiliary)
run: cargo hack clippy --workspace --locked --optional-deps --each-feature --features std --tests --benches --examples -- -D warnings
run: cargo hack clippy ${{ env.PUBLIC_PKGS }} --locked --optional-deps --each-feature --features std --tests --benches --examples -- -D warnings

- name: cargo clippy (examples)
run: cargo hack clippy ${{ env.EXAMPLE_PKGS }} --locked --optional-deps --each-feature -- -D warnings

clippy-stable-android:
name: cargo clippy (android)
Expand All @@ -140,10 +142,13 @@ jobs:
tool: cargo-hack

- name: cargo clippy
run: cargo hack clippy --workspace --locked --target ${{ matrix.target }} --optional-deps --each-feature --features std -- -D warnings
run: cargo hack clippy ${{ env.PUBLIC_PKGS }} --locked --target ${{ matrix.target }} --optional-deps --each-feature --features std -- -D warnings

- name: cargo clippy (auxiliary)
run: cargo hack clippy --workspace --locked --target ${{ matrix.target }} --optional-deps --each-feature --features std --tests --benches --examples -- -D warnings
run: cargo hack clippy ${{ env.PUBLIC_PKGS }} --locked --target ${{ matrix.target }} --optional-deps --each-feature --features std --tests --benches --examples -- -D warnings

- name: cargo clippy (examples)
run: cargo hack clippy ${{ env.EXAMPLE_PKGS }} --locked --target ${{ matrix.target }} --optional-deps --each-feature -- -D warnings

test-stable:
name: cargo test
Expand All @@ -163,7 +168,7 @@ jobs:
toolchain: ${{ env.RUST_STABLE_VER }}

- name: cargo test
run: cargo test --workspace --locked --all-features
run: cargo test ${{ env.PUBLIC_PKGS }} --locked --all-features

check-msrv:
name: cargo check (msrv)
Expand All @@ -189,10 +194,10 @@ jobs:

# TODO: Add --target x86_64-unknown-none to the no_std check once we solve the compilation issues with it
- name: cargo check (no_std)
run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} --locked --optional-deps --each-feature --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }}
run: cargo hack check ${{ env.PUBLIC_PKGS }} --locked --optional-deps --each-feature --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }}

- name: cargo check
run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} --locked --optional-deps --each-feature --features std
run: cargo hack check ${{ env.PUBLIC_PKGS }} --locked --optional-deps --each-feature --features std

check-msrv-android:
name: cargo check (msrv) (android)
Expand All @@ -218,7 +223,7 @@ jobs:
tool: cargo-hack

- name: cargo check
run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} --locked --target ${{ matrix.target }} --optional-deps --each-feature --features std
run: cargo hack check ${{ env.PUBLIC_PKGS }} --locked --target ${{ matrix.target }} --optional-deps --each-feature --features std

doc:
name: cargo doc
Expand All @@ -237,4 +242,4 @@ jobs:

# We test documentation using nightly to match docs.rs. This prevents potential breakages
- name: cargo doc
run: cargo doc --workspace --locked --all-features --no-deps --document-private-items -Zunstable-options -Zrustdoc-scrape-examples
run: cargo doc ${{ env.PUBLIC_PKGS }} --locked --all-features --no-deps --document-private-items -Zunstable-options -Zrustdoc-scrape-examples
2 changes: 1 addition & 1 deletion examples/tiny_skia_render/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ peniko = { workspace = true }
tiny-skia = "0.11"

[[bin]]
name = "tiny-skia"
name = "tiny_skia_render"
path = "main.rs"

[lints]
Expand Down

0 comments on commit 6fb6703

Please sign in to comment.