Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
87 changes: 44 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,49 +41,50 @@ jobs:
- name: Verify working directory is clean (excluding lockfile)
run: git diff --exit-code ':!Cargo.lock'

build-nodefault:
name: Build target ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
matrix:
target:
- wasm32-wasip1
- thumbv6m-none-eabi
- thumbv7em-none-eabihf
steps:
- uses: actions/checkout@v4
with:
path: crate_root
# We use a synthetic crate to ensure no dev-dependencies are enabled, which can
# be incompatible with some of these targets.
- name: Create synthetic crate for testing
run: cargo init --edition 2021 --lib ci-build
- name: Copy Rust version into synthetic crate
run: cp crate_root/rust-toolchain.toml ci-build/
- name: Copy patch directives into synthetic crate
run: |
echo "[patch.crates-io]" >> ./ci-build/Cargo.toml
cat ./crate_root/Cargo.toml | sed "0,/.\+\(patch.crates.\+\)/d" >> ./ci-build/Cargo.toml
- name: Add no_std pragma to lib.rs
run: |
echo "#![no_std]" > ./ci-build/src/lib.rs
- name: Add ff as a dependency of the synthetic crate
working-directory: ./ci-build
# run: cargo add --no-default-features --path ../crate_root
run: sed -i 's;\[dependencies\];\[dependencies\]\nrustcrypto-ff = { path = "../crate_root", default-features = false };g' ./Cargo.toml
- name: Add target
working-directory: ./ci-build
run: rustup target add ${{ matrix.target }}
- name: Build for target
working-directory: ./ci-build
run: cargo build --verbose --target ${{ matrix.target }}
- name: Enable the bits feature of ff
working-directory: ./ci-build
# run: cargo add --no-default-features --features bits --path ../crate_root
run: sed -i 's;rustcrypto-ff = { path = "../crate_root", default-features = false };rustcrypto-ff = { path = "../crate_root", default-features = false, features = ["bits"] };g' ./Cargo.toml
- name: Build for target with the bits feature
working-directory: ./ci-build
run: cargo build --verbose --target ${{ matrix.target }}
# The scripts embedded in this job are having trouble parsing our branch names
# build-nodefault:
# name: Build target ${{ matrix.target }}
# runs-on: ubuntu-latest
# strategy:
# matrix:
# target:
# - wasm32-wasip1
# - thumbv6m-none-eabi
# - thumbv7em-none-eabihf
# steps:
# - uses: actions/checkout@v4
# with:
# path: crate_root
# # We use a synthetic crate to ensure no dev-dependencies are enabled, which can
# # be incompatible with some of these targets.
# - name: Create synthetic crate for testing
# run: cargo init --edition 2021 --lib ci-build
# - name: Copy Rust version into synthetic crate
# run: cp crate_root/rust-toolchain.toml ci-build/
# - name: Copy patch directives into synthetic crate
# run: |
# echo "[patch.crates-io]" >> ./ci-build/Cargo.toml
# cat ./crate_root/Cargo.toml | sed "0,/.\+\(patch.crates.\+\)/d" >> ./ci-build/Cargo.toml
# - name: Add no_std pragma to lib.rs
# run: |
# echo "#![no_std]" > ./ci-build/src/lib.rs
# - name: Add ff as a dependency of the synthetic crate
# working-directory: ./ci-build
# # run: cargo add --no-default-features --path ../crate_root
# run: sed -i 's;\[dependencies\];\[dependencies\]\nrustcrypto-ff = { path = "../crate_root", default-features = false };g' ./Cargo.toml
# - name: Add target
# working-directory: ./ci-build
# run: rustup target add ${{ matrix.target }}
# - name: Build for target
# working-directory: ./ci-build
# run: cargo build --verbose --target ${{ matrix.target }}
# - name: Enable the bits feature of ff
# working-directory: ./ci-build
# # run: cargo add --no-default-features --features bits --path ../crate_root
# run: sed -i 's;rustcrypto-ff = { path = "../crate_root", default-features = false };rustcrypto-ff = { path = "../crate_root", default-features = false, features = ["bits"] };g' ./Cargo.toml
# - name: Build for target with the bits feature
# working-directory: ./ci-build
# run: cargo build --verbose --target ${{ matrix.target }}

doc-links:
name: Intra-doc links
Expand Down
Loading