ci
This commit is contained in:
parent
ab449ca78b
commit
ca96633652
4 changed files with 58 additions and 94 deletions
124
.github/workflows/build.yml
vendored
124
.github/workflows/build.yml
vendored
|
@ -2,69 +2,13 @@
|
||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
||||||
|
|
||||||
name: build
|
name: build
|
||||||
# on:
|
|
||||||
# push:
|
|
||||||
# branches:
|
|
||||||
# - 'release/**'
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
# release:
|
|
||||||
# types:
|
|
||||||
# - created
|
|
||||||
jobs:
|
jobs:
|
||||||
# wheel:
|
manylinux:
|
||||||
# runs-on: ${{ matrix.os }}
|
|
||||||
# strategy:
|
|
||||||
# fail-fast: false
|
|
||||||
# matrix:
|
|
||||||
# include:
|
|
||||||
# # MacOS
|
|
||||||
# - python: '3.6'
|
|
||||||
# os: macos-latest
|
|
||||||
# - python: '3.7'
|
|
||||||
# os: macos-latest
|
|
||||||
# - python: '3.8'
|
|
||||||
# os: macos-latest
|
|
||||||
# - python: '3.9'
|
|
||||||
# os: macos-latest
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v2
|
|
||||||
# with:
|
|
||||||
# submodules: recursive
|
|
||||||
# - name: Cache .a files
|
|
||||||
# uses: actions/cache@v2
|
|
||||||
# with:
|
|
||||||
# key: ${{ runner.os }}
|
|
||||||
# path: |
|
|
||||||
# src/rocksdb/libsnappy.a
|
|
||||||
# src/rocksdb/liblz4.a
|
|
||||||
# src/rocksdb/libbz2.a
|
|
||||||
# src/rocksdb/libzstd.a
|
|
||||||
# src/rocksdb/libz.a
|
|
||||||
# src/rocksdb/librocksdb.a
|
|
||||||
# - name: Setup python${{ matrix.python }}
|
|
||||||
# uses: actions/setup-python@v2
|
|
||||||
# with:
|
|
||||||
# python-version: "${{ matrix.python }}"
|
|
||||||
# - name: Make static library files
|
|
||||||
# run: make
|
|
||||||
# - name: Install requires
|
|
||||||
# run: python -m pip install cython twine wheel
|
|
||||||
# - name: Build wheel for python "${{ matrix.python }}"
|
|
||||||
# run: python setup.py bdist_wheel
|
|
||||||
# - name: Publishing to pypi
|
|
||||||
# run: twine upload --skip-existing --disable-progress-bar dist/*.whl
|
|
||||||
# env:
|
|
||||||
# TWINE_USERNAME: __token__
|
|
||||||
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
||||||
linux:
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
python-version: [3.7, 3.8, 3.9]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
@ -80,24 +24,56 @@ jobs:
|
||||||
src/rocksdb/libzstd.a
|
src/rocksdb/libzstd.a
|
||||||
src/rocksdb/libz.a
|
src/rocksdb/libz.a
|
||||||
src/rocksdb/librocksdb.a
|
src/rocksdb/librocksdb.a
|
||||||
- name: Make static library files
|
- name: Install requirements
|
||||||
uses: docker://quay.io/pypa/manylinux2014_x86_64
|
run: sudo apt-get install build-essential binutils cmake
|
||||||
|
- name: Build wheels
|
||||||
|
run: /bin/bash scripts/build.sh
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
args: /usr/bin/make
|
name: wheels
|
||||||
- name: Install requires
|
path: dist/
|
||||||
run: python -m pip install cython twine wheel
|
- name: Install twine
|
||||||
- name: Building manylinux2014 wheels
|
run: python -m pip install twine
|
||||||
uses: docker://quay.io/pypa/manylinux2014_x86_64
|
macos:
|
||||||
|
strategy:
|
||||||
|
fail-fast: true
|
||||||
|
matrix:
|
||||||
|
python:
|
||||||
|
- 3.7
|
||||||
|
- 3.8
|
||||||
|
- 3.9
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
args: /bin/bash scripts/make-wheels.sh
|
submodules: recursive
|
||||||
- name: Setup python${{ matrix.python-version }}
|
- name: Cache .a files
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
key: ${{ runner.os }}
|
||||||
|
path: |
|
||||||
|
src/rocksdb/libsnappy.a
|
||||||
|
src/rocksdb/liblz4.a
|
||||||
|
src/rocksdb/libbz2.a
|
||||||
|
src/rocksdb/libzstd.a
|
||||||
|
src/rocksdb/libz.a
|
||||||
|
src/rocksdb/librocksdb.a
|
||||||
|
- name: Setup python${{ matrix.python }}
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: "${{ matrix.python }}"
|
||||||
# - name: Install requires
|
- name: Make static library files
|
||||||
# run: python -m pip install twine
|
run: make clean && make
|
||||||
# - name: Publishing to pypi
|
- name: Install requires
|
||||||
# run: twine upload --skip-existing --disable-progress-bar dist/*.whl
|
run: python -m pip install cython twine wheel
|
||||||
# env:
|
- name: Build wheel
|
||||||
# TWINE_USERNAME: __token__
|
run: python setup.py bdist_wheel
|
||||||
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: wheels
|
||||||
|
path: dist/
|
||||||
|
# - name: Publishing to pypi
|
||||||
|
# run: twine upload --skip-existing --disable-progress-bar dist/*.whl
|
||||||
|
# env:
|
||||||
|
# TWINE_USERNAME: __token__
|
||||||
|
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
||||||
|
|
18
.travis.yml
18
.travis.yml
|
@ -1,18 +0,0 @@
|
||||||
sudo: required
|
|
||||||
dist: trusty
|
|
||||||
language: generic
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- ~/.cache/pip
|
|
||||||
|
|
||||||
install:
|
|
||||||
docker build . -t ci-image;
|
|
||||||
script:
|
|
||||||
docker run -v ~/.cache/pip:/home/tester/.cache/pip -v $(pwd):/home/tester/src ci-image:latest tox -e ${TOXENV} ;
|
|
||||||
env:
|
|
||||||
- TOXENV=py27
|
|
||||||
- TOXENV=py36
|
|
||||||
- TOXENV=docs
|
|
1
scripts/build.sh
Executable file
1
scripts/build.sh
Executable file
|
@ -0,0 +1 @@
|
||||||
|
docker run --rm -v $(pwd):/lbry-rocksdb quay.io/pypa/manylinux_2_24_x86_64 /bin/bash lbry-rocksdb/scripts/make-wheels.sh
|
|
@ -1,10 +1,14 @@
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
apt install -y binutils cmake
|
||||||
|
|
||||||
|
cd lbry-rocksdb
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
make
|
make clean && make
|
||||||
|
|
||||||
|
|
||||||
function build_wheel() {
|
function build_wheel() {
|
||||||
/opt/python/$1/bin/pip install cython
|
/opt/python/$1/bin/pip install cython wheel
|
||||||
/opt/python/$1/bin/pip wheel . -f . -w dist
|
/opt/python/$1/bin/pip wheel . -f . -w dist
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,4 +21,5 @@ cd dist
|
||||||
for f in ./*linux_*;
|
for f in ./*linux_*;
|
||||||
do if [ -f $f ]; then auditwheel repair $f -w . ; rm $f; fi;
|
do if [ -f $f ]; then auditwheel repair $f -w . ; rm $f; fi;
|
||||||
done
|
done
|
||||||
|
rm setuptools-*.whl
|
||||||
cd -
|
cd -
|
||||||
|
|
Loading…
Reference in a new issue