From a311fd0eb5c7bb1de0495f3846cadc642d360f17 Mon Sep 17 00:00:00 2001 From: Konstantin Podshumok Date: Sun, 31 Mar 2019 07:27:39 +0300 Subject: [PATCH 1/2] try simplifying ci --- .droneci/NiceLinuxDockerfile | 8 ----- .droneci/config.yml | 69 ++++++++++++++++-------------------- 2 files changed, 30 insertions(+), 47 deletions(-) delete mode 100644 .droneci/NiceLinuxDockerfile diff --git a/.droneci/NiceLinuxDockerfile b/.droneci/NiceLinuxDockerfile deleted file mode 100644 index 8ef5518..0000000 --- a/.droneci/NiceLinuxDockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM debian:testing -RUN mkdir /work -WORKDIR /work -RUN \ - apt update && \ - apt install -y --no-install-recommends clang ssh git tar zip ca-certificates && \ - apt install -y cmake python-pip && \ - rm -rf /var/lib/apt/lists/* diff --git a/.droneci/config.yml b/.droneci/config.yml index 421c166..610ac9f 100644 --- a/.droneci/config.yml +++ b/.droneci/config.yml @@ -3,50 +3,40 @@ name: default steps: - name: build - image: ivigns/nice-linux:debian-0.0.3 + image: alpine:edge volumes: - name: cache path: /tmp/cache commands: - - git submodule sync - - git submodule update --init --recursive - - cd /drone/src/libdivsufsort - - git pull origin master - - cd /drone/src/sdsl-lite - - git pull origin master - - cd /drone/src/sdsl-lite/external/libdivsufsort - - git pull origin master - - cd /drone/src/pybind11 - - git pull origin master - - cd /tmp - - mkdir sdsl-lite-build - - mkdir libdivsufsort-build - - export CC=clang - - export CXX=clang++ - - export CFLAGS="-O3 -static -lc -fPIC -static-libgcc -pipe -fcolor-diagnostics -lpthread -Wl,-Bstatic" - - cd /tmp/libdivsufsort-build - - cmake -D BUILD_SHARED_LIBS=OFF /drone/src/libdivsufsort - - make install - - export CXXFLAGS="-O3 -pipe -fcolor-diagnostics -static-libgcc -static-libstdc++ -fPIC -lpthread -Wl,-Bstatic -Wl,-Bdynamic" - - cd /tmp/sdsl-lite-build - - cmake /drone/src/sdsl-lite - - make install - - export CXXFLAGS="-O3 -pipe -stdlib=libc++ -fcolor-diagnostics -fPIC" - - export CFLAGS="-O3 -pipe -fcolor-diagnostics -fPIC" - - cd /drone/src/pybind11 - - pip install --no-binary ':all:' --no-cache-dir . --verbose - - cd /drone/src - - pip wheel --no-binary ':all:' --no-cache-dir -w dist . --verbose + - apk add git cmake make clang g++ binutils musl-dev python3 python3-dev patchelf + - | + git submodule init + git submodule sync + git submodule update --init --recursive + git submodule update --recursive + - | + mkdir /tmp/sdsl-lite-build + export CC=clang + export CXX=clang++ + export CFLAGS="-O3 -pipe -fcolor-diagnostics -static-libgcc -fPIC" + export CXXFLAGS="-O3 -pipe -fcolor-diagnostics -static-libgcc -static-libstdc++ -fPIC" + - cd /tmp/sdsl-lite-build && cmake /drone/src/sdsl-lite + - make VERBOSE=1 install + - | + python3 -m ensurepip + python3 -m pip install -U pip wheel pybind11 + - | + export LDFLAGS="-Wl,-Bstatic -lstdc++ -lc -ldl -Wl,-Bdynamic" + export CXXFLAGS="${CXXFLAGS} ${LDFLAGS}" + export CFLAGS="${CFLAGS} ${LDFLAGS}" + cd /drone/src + - pip --disable-pip-version-check wheel --no-binary ':all:' --no-cache-dir -w dist --verbose --no-deps . + - | + pip uninstall wheel -y + pip install auditwheel + - auditwheel repair --plat linux_x86_64 dist/pysdsl*.whl - cp -r . /tmp/cache -- name: show - image: debian:testing - volumes: - - name: cache - path: /tmp/cache - commands: - - cd /tmp/cache && ls -aR - - name: test-wheel image: debian:testing volumes: @@ -55,7 +45,7 @@ steps: commands: - apt-get update -qq - apt-get install -qqy python python-pip - - pip install $(ls -d /tmp/cache/dist/*) + - pip install /tmp/cache/dist/pysdsl*.whl - mkdir /tmp/test - cd /tmp/test - python -c 'import pysdsl' @@ -70,6 +60,7 @@ steps: from_secret: repo_token files: - /tmp/cache/dist/* + - /tmp/cach/wheelhouse/* title: ${DRONE_TAG} when: event: tag From 2231e7b0656d266999cfef23d731c52c0ee3e564 Mon Sep 17 00:00:00 2001 From: Konstantin Podshumok Date: Sun, 31 Mar 2019 08:44:24 +0300 Subject: [PATCH 2/2] fix python version in testing --- .droneci/config.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.droneci/config.yml b/.droneci/config.yml index 610ac9f..a627613 100644 --- a/.droneci/config.yml +++ b/.droneci/config.yml @@ -38,13 +38,11 @@ steps: - cp -r . /tmp/cache - name: test-wheel - image: debian:testing + image: python:3.6 volumes: - name: cache path: /tmp/cache commands: - - apt-get update -qq - - apt-get install -qqy python python-pip - pip install /tmp/cache/dist/pysdsl*.whl - mkdir /tmp/test - cd /tmp/test