diff --git a/.github/workflows/build-aya.yml b/.github/workflows/build-aya.yml index 01f8a909..6ee07801 100644 --- a/.github/workflows/build-aya.yml +++ b/.github/workflows/build-aya.yml @@ -34,11 +34,29 @@ jobs: - uses: Swatinem/rust-cache@v2 - - uses: taiki-e/install-action@cross + - uses: taiki-e/install-action@cargo-hack + + - uses: taiki-e/setup-cross-toolchain-action@v1 + with: + target: ${{ matrix.arch }} + - name: Build - run: cross build --verbose --target ${{ matrix.arch }} + run: | + cargo hack build --all-targets --feature-powerset \ + --exclude aya-bpf \ + --exclude aya-bpf-bindings \ + --exclude aya-log-ebpf \ + --exclude integration-ebpf \ + --workspace - name: Test env: RUST_BACKTRACE: full - run: cross test --verbose --target ${{ matrix.arch }} + run: | + cargo hack test --all-targets --feature-powerset \ + --exclude aya-bpf \ + --exclude aya-bpf-bindings \ + --exclude aya-log-ebpf \ + --exclude integration-ebpf \ + --exclude integration-test \ + --workspace diff --git a/aya-obj/src/lib.rs b/aya-obj/src/lib.rs index d11cdaf6..3a33a014 100644 --- a/aya-obj/src/lib.rs +++ b/aya-obj/src/lib.rs @@ -37,7 +37,10 @@ //! let bytes = std::fs::read("program.o").unwrap(); //! let mut object = Object::parse(&bytes).unwrap(); //! // Relocate the programs +//! #[cfg(feature = "std")] //! let text_sections = std::collections::HashSet::new(); +//! #[cfg(not(feature = "std"))] +//! let text_sections = hashbrown::HashSet::new(); //! object.relocate_calls(&text_sections).unwrap(); //! object.relocate_maps(std::iter::empty(), &text_sections).unwrap(); //!