diff --git a/.github/workflows/cross.yaml b/.github/workflows/cross.yaml new file mode 100644 index 0000000..f506d8c --- /dev/null +++ b/.github/workflows/cross.yaml @@ -0,0 +1,29 @@ +# SPDX-License-Identifier: Apache-2.0 + +on: [push, pull_request] + +name: Cross-compile + +jobs: + build: + name: Build + runs-on: ubuntu-latest + strategy: + matrix: + target: + - thumbv6m-none-eabi + - thumbv7m-none-eabi + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + target: ${{ matrix.target }} + override: true + + - name: Build for target + run: cargo build --release --target=${{ matrix.target }} diff --git a/demos/src/lib.rs b/demos/src/lib.rs index 4a78695..cd17a80 100644 --- a/demos/src/lib.rs +++ b/demos/src/lib.rs @@ -3,3 +3,5 @@ //! Demos crate for picojson-rs //! //! This crate contains demonstration code and examples. + +#![cfg_attr(not(test), no_std)]