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

Implement Tiny-Skia example #55

Merged
merged 14 commits into from
May 23, 2024
30 changes: 19 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +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"
PRIMARY_PKGS: "-p parley -p fontique"
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't use PRIMARY_PKGS below, but you do use PUBIC_PKGS ...

Is the purpose of renaming this away from RUST_MIN_VER_PKGS to denote which are published and not?

Copy link
Contributor Author

@nicoburns nicoburns May 22, 2024

Choose a reason for hiding this comment

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

We're running check/build/test/doc etc over parley and fontique crates with --features std and --features libm, neither of which work with the tiny_skia_render example crate because it doesn't have those features. So we can't use --workspace to run those checks. So I'm using this "primary packages" variable to do specify "parley and 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 @@ -104,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 --workspace --locked --optional-deps --each-feature --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} -- -D warnings
run: cargo hack clippy ${{ env.PRIMARY_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.PRIMARY_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.PRIMARY_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 @@ -137,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.PRIMARY_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.PRIMARY_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 @@ -160,7 +168,7 @@ jobs:
toolchain: ${{ env.RUST_STABLE_VER }}

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

check-msrv:
name: cargo check (msrv)
Expand All @@ -186,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.PRIMARY_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.PRIMARY_PKGS }} --locked --optional-deps --each-feature --features std

check-msrv-android:
name: cargo check (msrv) (android)
Expand All @@ -215,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.PRIMARY_PKGS }} --locked --target ${{ matrix.target }} --optional-deps --each-feature --features std

doc:
name: cargo doc
Expand All @@ -234,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.PRIMARY_PKGS }} --locked --all-features --no-deps --document-private-items -Zunstable-options -Zrustdoc-scrape-examples
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/target
/examples/_output
161 changes: 139 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading