From dff524873e71c8590d5e8d4e8df145aa6addbb9d Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 3 Jan 2025 23:58:09 +0700 Subject: [PATCH 1/3] Test `no_std` compilation in CI --- .github/workflows/ci.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a591176..7acc0d51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,10 +111,8 @@ jobs: with: save-if: ${{ github.event_name != 'merge_group' }} - # TODO: Add --target x86_64-unknown-none to the no_std check once we solve the compilation issues with it. - # https://github.com/linebender/parley/issues/86 - name: cargo clippy (no_std) - run: cargo hack clippy --workspace --locked --optional-deps --each-feature --ignore-unknown-features --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} -- -D warnings + run: cargo hack clippy --workspace --locked --optional-deps --each-feature --ignore-unknown-features --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} --target x86_64-unknown-none -- -D warnings - name: cargo clippy run: cargo hack clippy --workspace --locked --optional-deps --each-feature --ignore-unknown-features --features std -- -D warnings @@ -197,6 +195,7 @@ jobs: uses: dtolnay/rust-toolchain@master with: toolchain: ${{ env.RUST_MIN_VER }} + targets: x86_64-unknown-none - name: install cargo-hack uses: taiki-e/install-action@v2 @@ -208,10 +207,8 @@ jobs: with: save-if: ${{ github.event_name != 'merge_group' }} - # TODO: Add --target x86_64-unknown-none to the no_std check once we solve the compilation issues with it. - # https://github.com/linebender/parley/issues/86 - name: cargo check (no_std) - run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} --locked --optional-deps --each-feature --ignore-unknown-features --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} + run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} --locked --optional-deps --each-feature --ignore-unknown-features --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} --target x86_64-unknown-none - name: cargo check run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} --locked --optional-deps --each-feature --ignore-unknown-features --features std From 1ca3d86eadd511d928d93a8f734a9510c51915b0 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Sat, 4 Jan 2025 00:07:44 +0700 Subject: [PATCH 2/3] Only run `no_std` checks on libs We don't want these on examples and such. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7acc0d51..ddbffbe0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,7 +112,7 @@ jobs: save-if: ${{ github.event_name != 'merge_group' }} - name: cargo clippy (no_std) - run: cargo hack clippy --workspace --locked --optional-deps --each-feature --ignore-unknown-features --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} --target x86_64-unknown-none -- -D warnings + run: cargo hack clippy --workspace --locked --optional-deps --each-feature --ignore-unknown-features --features libm --lib --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} --target x86_64-unknown-none -- -D warnings - name: cargo clippy run: cargo hack clippy --workspace --locked --optional-deps --each-feature --ignore-unknown-features --features std -- -D warnings From e899be59e1e5a71129fb9409c6c0b3d49b6a0fc7 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Sat, 4 Jan 2025 00:38:43 +0700 Subject: [PATCH 3/3] Try abusing RUST_MIN_VER_PKGS --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ddbffbe0..f54837ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,7 +112,7 @@ jobs: save-if: ${{ github.event_name != 'merge_group' }} - name: cargo clippy (no_std) - run: cargo hack clippy --workspace --locked --optional-deps --each-feature --ignore-unknown-features --features libm --lib --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} --target x86_64-unknown-none -- -D warnings + run: cargo hack clippy ${{ env.RUST_MIN_VER_PKGS }} --locked --optional-deps --each-feature --ignore-unknown-features --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} --target x86_64-unknown-none -- -D warnings - name: cargo clippy run: cargo hack clippy --workspace --locked --optional-deps --each-feature --ignore-unknown-features --features std -- -D warnings