Skip to content

Commit

Permalink
fix: test9
Browse files Browse the repository at this point in the history
  • Loading branch information
dirvine committed Dec 24, 2024
1 parent e1e806a commit 926d384
Showing 1 changed file with 19 additions and 27 deletions.
46 changes: 19 additions & 27 deletions .github/workflows/python-publish-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,21 +154,25 @@ jobs:
mkdir -p build/ant-node
cp -r ant-node/* build/ant-node/
# First, copy all workspace members
# First, copy all workspace members to a deps directory
mkdir -p build/deps
for dir in ant-* test-utils evmlib autonomi; do
if [ -d "$dir" ]; then
echo "Copying $dir to build directory"
cp -r "$dir" "build/$dir"
if [ -d "$dir" ] && [ "$dir" != "ant-node" ]; then
echo "Copying $dir to deps directory"
cp -r "$dir" "build/deps/$dir"
fi
done
# Create a minimal workspace Cargo.toml in the build directory
cat > build/Cargo.toml << EOL
[workspace]
resolver = "2"
members = ["ant-node"]
# Update the package's Cargo.toml to be standalone
cd build/ant-node
# Remove workspace references
sed -i '/^workspace/d' Cargo.toml
# Add lints directly to the package
cat >> Cargo.toml << EOL
[workspace.lints.rust]
[lints.rust]
arithmetic_overflow = "forbid"
mutable_transmutes = "forbid"
no_mangle_const_items = "forbid"
Expand All @@ -179,32 +183,20 @@ jobs:
unused_extern_crates = "warn"
unused_import_braces = "warn"
[workspace.lints.clippy]
[lints.clippy]
clone_on_ref_ptr = "warn"
unicode_not_nfc = "warn"
uninlined_format_args = "warn"
unused_async = "warn"
unwrap_used = "warn"
[workspace.dependencies]
backtrace = "=0.3.71"
EOL
# Remove workspace references from the package's Cargo.toml
cd build/ant-node
sed -i '/^workspace/d' Cargo.toml
cd ../..
# Update all dependency paths to be absolute
find ./build -name "Cargo.toml" -exec sed -i "s|path = \"\.\./|path = \"/home/runner/work/autonomi/autonomi/build/|g" {} \;
# Update dependency paths to point to deps directory
sed -i 's|path = "\.\./|path = "../deps/|g' Cargo.toml
# Display directory structure for debugging
echo "Contents of build directory:"
ls -la ./build/
echo "Contents of workspace Cargo.toml:"
cat ./build/Cargo.toml
# Display final Cargo.toml for debugging
echo "Contents of ant-node Cargo.toml:"
cat ./build/ant-node/Cargo.toml
cat Cargo.toml
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
Expand Down

0 comments on commit 926d384

Please sign in to comment.