Skip to content

Commit

Permalink
fix install after build
Browse files Browse the repository at this point in the history
  • Loading branch information
wey-gu committed Jan 5, 2025
1 parent 77121e1 commit c42f933
Showing 1 changed file with 34 additions and 30 deletions.
64 changes: 34 additions & 30 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,12 @@ jobs:
exclude:
- os: macos-latest
target: aarch64
- os: ubuntu-24.04
target: aarch64 # It's too slow in non-native environment in github actions
include:
- os: ubuntu-24.04
target: x86_64
platform: manylinux2014
container: quay.io/pypa/manylinux2014_x86_64
docker_platform: linux/amd64
# - os: ubuntu-24.04
# target: aarch64
# platform: manylinux2014
# container: quay.io/pypa/manylinux2014_aarch64
# docker_platform: linux/arm64
- os: macos-latest
target: x86_64
platform: native
Expand All @@ -120,16 +113,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

# - name: Set up QEMU
# if: matrix.target == 'aarch64'
# uses: docker/setup-qemu-action@v3
# with:
# platforms: arm64

# - name: Set up Docker Buildx
# if: matrix.target == 'aarch64'
# uses: docker/setup-buildx-action@v3

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
Expand All @@ -142,7 +125,12 @@ jobs:
uses: actions/download-artifact@v3
with:
name: dist-main
path: dist/
path: dist/main-pkg/

- name: Install main package
run: |
python -m pip install --upgrade pip
pip install dist/main-pkg/opendalfs-*.whl
- name: Build service package
id: build-service
Expand All @@ -156,14 +144,26 @@ jobs:
working-directory: crates/service-${{ matrix.service }}
docker-options: --platform ${{ matrix.docker_platform }}

- name: List dist contents
run: ls -la dist/
- name: List all dist directories
run: |
echo "Current directory contents:"
ls -la
echo "\nDist directory contents:"
ls -la dist/ || true
echo "\nTarget directory contents:"
ls -la target/wheels/ || true
echo "\nCrates service directory contents:"
ls -la crates/service-${{ matrix.service }}/target/wheels/ || true
find . -name "*.whl"
- name: Upload service artifact
uses: actions/upload-artifact@v3
with:
name: dist-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.service }}
path: dist/*.whl
path: |
dist/*.whl
target/wheels/*.whl
crates/service-${{ matrix.service }}/target/wheels/*.whl
if-no-files-found: error

verify-install:
Expand Down Expand Up @@ -194,16 +194,22 @@ jobs:
# Copy main package first
cp -r dist/dist-main/* dist_combined/
# List what we have so far
echo "Main package contents:"
ls -la dist_combined/
# Now copy service wheels, being careful about naming
# Now copy service wheels with error handling
echo "Copying service wheels:"
for os in ubuntu-24.04 macos-latest; do
for service in memory s3; do
echo "Copying $os $service service:"
find "dist/dist-$os-x86_64-$service" -name "*.whl" -exec ls -la {} \;
find "dist/dist-$os-x86_64-$service" -name "*.whl" -exec cp {} dist_combined/ \;
echo "Processing $os $service service:"
wheel=$(find "dist/dist-$os-x86_64-$service" -name "*.whl")
if [ -n "$wheel" ]; then
echo "Found wheel: $wheel"
cp "$wheel" "dist_combined/opendalfs_service_${service}-0.0.1-py3-none-any.whl"
else
echo "No wheel found for $os $service"
exit 1
fi
done
done
Expand All @@ -216,10 +222,8 @@ jobs:
# Install main package first
pip install dist_combined/opendalfs-*.whl
# Then install service packages
for wheel in dist_combined/*service*.whl; do
echo "Installing $wheel"
pip install "$wheel"
done
pip install dist_combined/opendalfs_service_memory*.whl
pip install dist_combined/opendalfs_service_s3*.whl
- name: Verify imports
run: |
Expand Down

0 comments on commit c42f933

Please sign in to comment.