From a41eb568ecdc5c462ebdaf54829be6243689e0cb Mon Sep 17 00:00:00 2001 From: David Irvine Date: Tue, 24 Dec 2024 01:00:34 +0000 Subject: [PATCH] fix: test 3 --- .github/workflows/python-publish-client.yml | 14 ++++++++++---- .github/workflows/python-publish-node.yml | 14 ++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python-publish-client.yml b/.github/workflows/python-publish-client.yml index 210bb8629f..3f742903f0 100644 --- a/.github/workflows/python-publish-client.yml +++ b/.github/workflows/python-publish-client.yml @@ -152,11 +152,17 @@ jobs: run: | mkdir -p build/autonomi cp -r autonomi/* build/autonomi/ - # Create a standalone Cargo.toml without workspace + # Copy all workspace dependencies locally + for dir in ant-*; do + if [ -d "$dir" ]; then + cp -r "$dir" "build/$dir" + fi + done + # Remove workspace configuration and update paths cd build/autonomi - sed -i 's|^workspace = .*|workspace = false|' Cargo.toml - # Update dependency paths to be absolute - find . -name "Cargo.toml" -exec sed -i 's|path = "\.\./|path = "/home/runner/work/autonomi/autonomi/|g' {} \; + sed -i '/^workspace/d' Cargo.toml + # Update dependency paths to be relative to the build directory + find . -name "Cargo.toml" -exec sed -i 's|path = "\.\./|path = "../|g' {} \; - name: Build sdist uses: PyO3/maturin-action@v1 with: diff --git a/.github/workflows/python-publish-node.yml b/.github/workflows/python-publish-node.yml index 35e4bac5d7..43c2446be5 100644 --- a/.github/workflows/python-publish-node.yml +++ b/.github/workflows/python-publish-node.yml @@ -152,11 +152,17 @@ jobs: run: | mkdir -p build/ant-node cp -r ant-node/* build/ant-node/ - # Create a standalone Cargo.toml without workspace + # Copy all workspace dependencies locally + for dir in ant-*; do + if [ -d "$dir" ]; then + cp -r "$dir" "build/$dir" + fi + done + # Remove workspace configuration and update paths cd build/ant-node - sed -i 's|^workspace = .*|workspace = false|' Cargo.toml - # Update dependency paths to be absolute - find . -name "Cargo.toml" -exec sed -i 's|path = "\.\./|path = "/home/runner/work/autonomi/autonomi/|g' {} \; + sed -i '/^workspace/d' Cargo.toml + # Update dependency paths to be relative to the build directory + find . -name "Cargo.toml" -exec sed -i 's|path = "\.\./|path = "../|g' {} \; - name: Build sdist uses: PyO3/maturin-action@v1 with: