From 99be440c40169a53b3a9d2e429462de2590c2f2e Mon Sep 17 00:00:00 2001 From: James Harrison <00jamesh@gmail.com> Date: Tue, 15 Oct 2024 19:10:37 +0100 Subject: [PATCH] Update workflows and docker for vcpkg --- .github/workflows/pypi-push.yml | 28 ++++------------------------ docker/Dockerfile | 16 ++++++---------- docker/conan_workaround | 7 ------- docker/musl_Dockerfile | 16 ++++++---------- 4 files changed, 16 insertions(+), 51 deletions(-) delete mode 100644 docker/conan_workaround diff --git a/.github/workflows/pypi-push.yml b/.github/workflows/pypi-push.yml index 8c2da2e..c0423d9 100644 --- a/.github/workflows/pypi-push.yml +++ b/.github/workflows/pypi-push.yml @@ -52,24 +52,12 @@ jobs: - uses: actions/checkout@master with: submodules: recursive - - name: Set up Python 3 for Conan - uses: actions/setup-python@v2 - with: - python-version: 3.7 + - name: Setup vcpkg + uses: lukka/run-vcpkg@v11 - name: Setup cmake uses: jwlawson/actions-setup-cmake@v1.9 with: cmake-version: '3.17.x' - - name: Install Python packages - run: pip3 install conan==1.* setuptools wheel - - name: Check Conan - run: which conan - - name: Check Conan version - run: conan --version - - name: Create default conan profile - run: conan profile new default --detect - - name: Add conancenter remote - run: conan remote add -f conancenter https://center.conan.io - name: build wheels uses: pypa/cibuildwheel@v2.21.1 - uses: actions/upload-artifact@v4 @@ -89,20 +77,12 @@ jobs: - uses: actions/checkout@master with: submodules: recursive - - name: Set up Python 3 for Conan - uses: actions/setup-python@v2 - with: - python-version: 3.7 + - name: Setup vcpkg + uses: lukka/run-vcpkg@v11 - name: Setup cmake uses: jwlawson/actions-setup-cmake@v1.9 with: cmake-version: '3.17.x' - - name: Install Python packages - run: pip3 install conan==1.* setuptools wheel - - name: Create default conan profile - run: conan profile new default --detect - - name: Add conancenter remote - run: conan remote add -f conancenter https://center.conan.io - name: build wheels uses: pypa/cibuildwheel@v2.21.1 - uses: actions/upload-artifact@v4 diff --git a/docker/Dockerfile b/docker/Dockerfile index f316d77..aeea0e7 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,13 +1,9 @@ ARG ARCH=x86_64 FROM quay.io/pypa/manylinux2014_${ARCH}:latest -# Image derived from standard manylinux Python wheel building env, with conan added. -# Wraps conan in a bash script setting the appropriate PYTHONPATH. -# If building the wheel for Python2, conan will fail to run as it will use the wrong -# libs. - -RUN yum install -y python3 glibc-headers python3-devel -RUN /usr/bin/python3 -m ensurepip --upgrade -RUN /usr/bin/python3 -m pip install --upgrade conan==1.* wheel -RUN conan profile new default --detect -RUN conan remote add -f conancenter https://center.conan.io +RUN yum install -y curl zip unzip tar +RUN git clone https://github.com/microsoft/vcpkg.git +RUN cd vcpkg && git checkout 2024.09.30 +RUN ./vcpkg/bootstrap-vcpkg.sh -disableMetrics +ENV VCPKG_ROOT=/vcpkg +ENV PATH="$PATH:$VCPKG_ROOT" diff --git a/docker/conan_workaround b/docker/conan_workaround deleted file mode 100644 index c771ef8..0000000 --- a/docker/conan_workaround +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/bash - -# override the PYTHONPATH here, so that conan always finds the appropriate libs, even if PYTHONPATH -# has been manually setup for Python2 -export PYTHONPATH=/usr/lib/python3.6/site-packages/:/usr/lib64/python3.6/:/usr/local/lib/python3.6/site-packages/ -/usr/local/bin/conan_ "$@" - diff --git a/docker/musl_Dockerfile b/docker/musl_Dockerfile index 61c64c5..68a4d9a 100644 --- a/docker/musl_Dockerfile +++ b/docker/musl_Dockerfile @@ -1,13 +1,9 @@ ARG ARCH=x86_64 FROM quay.io/pypa/musllinux_1_1_${ARCH}:latest -# Image derived from standard manylinux Python wheel building env, with conan added. -# Wraps conan in a bash script setting the appropriate PYTHONPATH. -# If building the wheel for Python2, conan will fail to run as it will use the wrong -# libs. - -RUN apk update && apk add python3 python3-dev -RUN /usr/bin/python3 -m ensurepip --upgrade -RUN /usr/bin/python3 -m pip install --upgrade conan==1.* wheel -RUN conan profile new default --detect -RUN conan remote add -f conancenter https://center.conan.io +RUN apk update && apk add build-base cmake ninja zip unzip curl git +RUN git clone https://github.com/microsoft/vcpkg.git +RUN cd vcpkg && git checkout 2024.09.30 +RUN ./vcpkg/bootstrap-vcpkg.sh -disableMetrics +ENV VCPKG_ROOT=/vcpkg +ENV PATH="$PATH:$VCPKG_ROOT"