Skip to content
Closed
Show file tree
Hide file tree
Changes from 8 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
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ jobs:
#
# `test-no-std` is only meant to check if the `substrate-api-client` compiles to `no_std`, hence
# we omit clippy and test there.
cargo build --release -p test-no-std --features api-client,
cargo build --release -p test-no-std --features compose-macros,
cargo build --release -p test-no-std --features node-api,
cargo build --release -p test-no-std --features primitives,
RUSTFLAGS='--cfg substrate_runtime' cargo build --release -p test-no-std --features api-client,
RUSTFLAGS='--cfg substrate_runtime' cargo build --release -p test-no-std --features compose-macros,
RUSTFLAGS='--cfg substrate_runtime' cargo build --release -p test-no-std --features node-api,
RUSTFLAGS='--cfg substrate_runtime' cargo build --release -p test-no-std --features primitives,
Copy link
Collaborator

@clangenb clangenb Jan 14, 2026

Choose a reason for hiding this comment

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

You should be able to set the env at the step level here with:

      - name: ${{ matrix.check }}
        env: 
           RUSTFLAGS: '--cfg substrate_runtime'
        run: ${{ matrix.check }}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I found yet another approach that works with cargo directly by providing a config.toml.
I like this a bit more as it is more general, but so far I only managed to get it working for the wasm32 builds. For no-std I have not (yet) managed to find a solution that works with a config.toml 😞


# Check build of stand-alone features.
cargo check --no-default-features,
Expand All @@ -67,8 +67,8 @@ jobs:
cargo check --no-default-features --features std,

# Test for 32 bit and wasm32-unknown-unknown compatibility
cargo build -p substrate-api-client --target wasm32-unknown-unknown --no-default-features --features sync-api,
cargo build --release -p ac-examples-wasm --examples --target wasm32-unknown-unknown,
RUSTFLAGS='--cfg substrate_runtime' cargo build -p substrate-api-client --target wasm32-unknown-unknown --no-default-features --features sync-api,
RUSTFLAGS='--cfg substrate_runtime' cargo build --release -p ac-examples-wasm --examples --target wasm32-unknown-unknown,

# Test for 32 bit and wasm32-wasip1 compatibility
# As of PR https://github.com/scs/substrate-api-client/pull/858 this check fails
Expand Down
Loading
Loading