Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Python Rocksdb
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public
Python Rocksdb
Commits
bd8e8fc4
Commit
bd8e8fc4
authored
4 years ago
by
Martina Ferrari
Committed by
Martina Ferrari
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update build.yml
parent
4d25d82c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.github/workflows/build.yml
+74
-34
74 additions, 34 deletions
.github/workflows/build.yml
with
74 additions
and
34 deletions
.github/workflows/build.yml
+
74
−
34
View file @
bd8e8fc4
name
:
"
Build"
# vim:ts=2:sw=2:et:ai:sts=2
name
:
'
Build'
on
:
[
'
push'
,
'
pull_request'
]
on
:
[
'
push'
,
'
pull_request'
]
jobs
:
jobs
:
test
:
name
:
'
Test'
runs-on
:
${{ matrix.os }}
strategy
:
matrix
:
os
:
[
ubuntu-latest
]
#py_ver: ['3.7', '3.8', '3.9']
#rocksdb_ver: ['v6.14.6', 'v6.11.4', 'v5.17.2']
py_ver
:
[
'
3.9'
]
rocksdb_ver
:
[
'
v6.14.6'
]
steps
:
-
uses
:
actions/checkout@v2
name
:
'
Checkout
source
repository'
-
uses
:
actions/setup-python@v2
name
:
'
Set
up
Python
${{
matrix.py_ver
}}'
with
:
python-version
:
${{ matrix.py_ver }}
-
name
:
'
Install
dependencies'
run
:
|
sudo apt install -y libsnappy-dev libbz2-dev liblz4-dev libz-dev libgflags-dev libzstd-dev python3-pytest
-
name
:
'
Install
RocksDB
${{
matrix.rocksdb_ver
}}'
run
:
|
pushd /opt
git clone https://github.com/facebook/rocksdb
cd rocksdb
git reset --hard ${{ matrix.rocksdb_ver }}
CXXFLAGS='-flto -Os -s' PORTABLE=1 make shared_lib -j 4
make shared_lib
sudo make install-shared
popd
-
name
:
Test with pytest
run
:
|
pytest-3 rocksdb/tests
build_wheels
:
build_wheels
:
name
:
"
Build
wheels
"
name
:
'
Build
wheels
'
runs-on
:
'
ubuntu-latest
'
runs-on
:
ubuntu-latest
steps
:
steps
:
-
uses
:
actions/checkout@v2
-
uses
:
actions/checkout@v2
name
:
"
Checkout
source
repository
"
name
:
'
Checkout
source
repository
'
-
uses
:
actions/setup-python@v2
-
uses
:
actions/setup-python@v2
name
:
"
Set
up
Python
3.9
"
name
:
'
Set
up
Python
3.9
'
with
:
with
:
python-version
:
'
3.9'
python-version
:
'
3.9'
-
name
:
"
Install
cibuildwheel
"
-
name
:
'
Install
cibuildwheel
'
run
:
|
run
:
|
python3 -m pip install cibuildwheel==1.7.1
python3 -m pip install cibuildwheel==1.7.1
-
name
:
"
Build
wheels
"
-
name
:
'
Build
wheels
'
run
:
|
run
:
|
python3 -m cibuildwheel --output-dir dist
python3 -m cibuildwheel --output-dir dist
env
:
env
:
ROCKSDB_VERSION
:
'
6.14.6'
ROCKSDB_VERSION
:
'
v
6.14.6'
CIBW_MANYLINUX_X86_64_IMAGE
:
'
manylinux2014'
CIBW_MANYLINUX_X86_64_IMAGE
:
'
manylinux2014'
CIBW_BUILD
:
'
cp3
7-manylinux*
cp38-manylinux*
cp39-manylinux
*'
CIBW_BUILD
:
'
cp3*'
CIBW_SKIP
:
'
*-manylinux_i686'
CIBW_SKIP
:
'
*-manylinux_i686'
CIBW_TEST_REQUIRES
:
'
.[test]'
CIBW_TEST_REQUIRES
:
'
.[test]'
CIBW_TEST_COMMAND
:
'
rm
{project}/rocksdb/tests/__init__.py;
pytest
{project}/rocksdb/tests'
CIBW_TEST_COMMAND
:
'
pytest
{project}/rocksdb/tests'
CIBW_BEFORE_BUILD
:
|
CIBW_BEFORE_BUILD
:
|
yum
install -y
bzip2-devel lz4-devel snappy-devel z
lib-dev
el
apt
install -y
libsnappy-dev libbz2-dev liblz4-dev
lib
z
-dev
python3-pytest
pushd /opt
pushd /opt
git clone https://github.com/facebook/rocksdb
git clone https://github.com/facebook/rocksdb
cd rocksdb
cd rocksdb
...
@@ -41,47 +81,47 @@ jobs:
...
@@ -41,47 +81,47 @@ jobs:
popd
popd
-
uses
:
actions/upload-artifact@v2
-
uses
:
actions/upload-artifact@v2
name
:
"
Upload
build
artifacts
"
name
:
'
Upload
build
artifacts
'
with
:
with
:
path
:
'
dist/*.whl'
path
:
'
dist/*.whl'
build_sdist
:
build_sdist
:
name
:
"
Build
source
distribution
"
name
:
'
Build
source
distribution
'
runs-on
:
'
ubuntu-latest'
runs-on
:
'
ubuntu-latest'
steps
:
steps
:
-
uses
:
actions/checkout@v2
-
uses
:
actions/checkout@v2
name
:
"
Checkout
source
repository
"
name
:
'
Checkout
source
repository
'
-
uses
:
actions/setup-python@v2
-
uses
:
actions/setup-python@v2
name
:
"
Set
up
Python
3.9
"
name
:
'
Set
up
Python
3.9
'
with
:
with
:
python-version
:
'
3.9'
python-version
:
'
3.9'
-
name
:
"
Build
sdist
"
-
name
:
'
Build
sdist
'
run
:
|
run
:
|
python3 setup.py sdist
python3 setup.py sdist
-
uses
:
actions/upload-artifact@v2
-
uses
:
actions/upload-artifact@v2
name
:
"
Upload
build
artifacts
"
name
:
'
Upload
build
artifacts
'
with
:
with
:
path
:
'
dist/*.tar.gz'
path
:
'
dist/*.tar.gz'
upload_pypi
:
#
upload_pypi:
name
:
"
Upload
packages
"
#
name:
'
Upload packages
'
needs
:
[
'
build_wheels'
,
'
build_sdist'
]
#
needs: ['build_wheels', 'build_sdist']
runs-on
:
'
ubuntu-latest'
#
runs-on: 'ubuntu-latest'
if
:
github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
#
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
steps
:
#
steps:
-
uses
:
actions/download-artifact@v2
#
- uses: actions/download-artifact@v2
name
:
"
Download
artifacts
"
#
name:
'
Download artifacts
'
with
:
#
with:
name
:
'
artifact'
#
name: 'artifact'
path
:
'
dist'
#
path: 'dist'
#
-
uses
:
pypa/gh-action-pypi-publish@master
#
- uses: pypa/gh-action-pypi-publish@master
name
:
"
Publish
built
packages
"
#
name:
'
Publish built packages
'
with
:
#
with:
user
:
'
__token__'
#
user: '__token__'
password
:
"
${{
secrets.PYPI_API_TOKEN
}}
"
#
password:
'
${{ secrets.PYPI_API_TOKEN }}
'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment