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

Subxt Metadata: #[no_std] compatibility #1401

Merged
merged 19 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
a262766
no-std tests and porting of subxt-metadata
tadeohepperle Jan 26, 2024
8aa4bec
Merge branch 'master' into tadeohepperle/subxt-metadata-no-std
tadeohepperle Jan 26, 2024
55cfb23
update pipeline
tadeohepperle Jan 26, 2024
1b4e371
fix generate custom metadata test
tadeohepperle Jan 26, 2024
d679e95
fix cargo run command
tadeohepperle Jan 26, 2024
7954815
adjust pipeline
tadeohepperle Jan 29, 2024
fbee16d
Merge branch 'master' into tadeohepperle/subxt-metadata-no-std
tadeohepperle Jan 29, 2024
7aa6989
remove prelude from subxt-metadata
tadeohepperle Feb 1, 2024
addc4c8
Merge branch 'master' into tadeohepperle/subxt-metadata-no-std
tadeohepperle Feb 1, 2024
87200b4
revert autoformatting of Cargo.toml
tadeohepperle Feb 1, 2024
57743c3
remove alloc::format! again, still causes linker errors
tadeohepperle Feb 2, 2024
408f81e
Merge branch 'master' into tadeohepperle/subxt-metadata-no-std
tadeohepperle Feb 2, 2024
f41f090
add no-std-build for thumbv7em-none-eabi target
tadeohepperle Feb 5, 2024
ce17d82
remove std feature flag
tadeohepperle Feb 14, 2024
5d6e0d5
Merge branch 'master' into tadeohepperle/subxt-metadata-no-std
tadeohepperle Feb 14, 2024
cb0d35d
Merge branch 'master' into tadeohepperle/subxt-metadata-no-std
tadeohepperle Feb 14, 2024
d447f7c
remove libc and add small readme with test instructions
tadeohepperle Feb 14, 2024
9c8fee0
Merge branch 'master' into tadeohepperle/subxt-metadata-no-std
tadeohepperle Feb 15, 2024
1aebd91
change ci for nightly no std
tadeohepperle Feb 15, 2024
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
34 changes: 34 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -419,3 +419,37 @@ jobs:

- if: "failure()"
uses: "andymckay/cancel-action@271cfbfa11ca9222f7be99a47e8f929574549e0a" # v0.4

no-std-tests:
name: "Test (no_std)"
runs-on: ubuntu-latest
needs: [machete, docs]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd incline to start this test after the following needs: [clippy, wasm_clippy, check, wasm_check, docs]

Copy link
Member

@niklasad1 niklasad1 Feb 15, 2024

Choose a reason for hiding this comment

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

I don't agree, this no-std check/test should be cheap and runs faster than for example clippy it's not really a test. It just checks that a binary builds without std enabled.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In that case, we'd need to adjust the needs: [clippy, wasm_clippy, check, wasm_check, docs] to include no-std-tests as well :D

Copy link
Member

Choose a reason for hiding this comment

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

ok, sounds good :)

timeout-minutes: 30
steps:
- name: Checkout sources
uses: actions/checkout@v4

# Note: needs nighly toolchain because otherwise we cannot define custom lang-items.
- name: Install Rust nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
target: thumbv7em-none-eabi

- name: Install the gcc-arm-none-eabi linker
run: sudo apt install gcc-arm-none-eabi

- name: Rust Cache
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3

# Note: We currently do not have a way to run real tests in a `no_std` environment.
# We can only make sure that they compile to ARM thumb ISA.
# Running the binary and inspecting the output would require an actual machine with matching ISA or some sort of emulator.
- name: Compile `no-std-tests` crate to `thumbv7em-none-eabi` target.
run: cargo build --target thumbv7em-none-eabi
working-directory: testing/no-std-tests

- if: "failure()"
uses: "andymckay/cancel-action@271cfbfa11ca9222f7be99a47e8f929574549e0a" # v0.4
Loading
Loading