Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions .github/workflows/pypipublish_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@ on:

jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
os:
- ubuntu-latest
python-version: [3.5, 3.6, 3.7,3.8]

runs-on: ${{ matrix.os }}
python-version: [3.5, 3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up submodules
run: |
bash ./ext_source_setup.sh
git submodule update --init --recursive
rm -rf third_party/differential-privacy/java
rm -rf third_party/differential-privacy/examples/java
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
Expand All @@ -42,14 +41,19 @@ jobs:
chmod +x bazel-2.1.0-installer-linux-x86_64.sh
./bazel-2.1.0-installer-linux-x86_64.sh --user
export PATH="$PATH:$HOME/bin"
- name: Build pydp lib
run: |
bash ./build_PyDP.sh

- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./requirements_dev.txt
pip install twine
pip install wheel
pip install setuptools

- name: Build pydp lib
run: |
bazel build src/python:bindings_test --verbose_failures
rm -f pydp.so
cp -f ./bazel-bin/src/bindings/pydp.so ./pydp

- name: Build wheel
run: |
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/pypipublish_osx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: MacOS Package PyPI deploy

on:
release:
types: [published]

jobs:
deploy:
runs-on: macos-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up submodules
run: |
git submodule update --init --recursive
rm -rf third_party/differential-privacy/java
rm -rf third_party/differential-privacy/examples/java
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install twine
pip install wheel
pip install setuptools

- name: Build pydp lib
run: |
bazel build src/python:bindings_test --verbose_failures
rm -f pydp.so
cp -f ./bazel-bin/src/bindings/pydp.so ./pydp


- name: Build wheel
run: |
python setup.py bdist_wheel

- name: Publishing the wheel
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TOKEN }}
run: |
twine upload --skip-existing dist/*.whl
1 change: 0 additions & 1 deletion .github/workflows/style_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./requirements_dev.txt
pip install black
- name: Black pep8 style
run: |
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,29 @@ jobs:
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./requirements_dev.txt
pip install coverage
pip install wheel
- name: Set up submodules
run: |
bash ./ext_source_setup.sh
git submodule update --init --recursive
rm -rf third_party/differential-privacy/java
rm -rf third_party/differential-privacy/examples/java
- name: Install pre-requisites
run: |
sudo apt-get update
bash ./prereqs.sh
bash ./prereqs_linux.sh
export PATH="$PATH:$HOME/bin"
- name: Build pydp lib
run: |
bash ./build_PyDP.sh
bazel build src/python:bindings_test --verbose_failures
rm -f pydp.so
cp -f ./bazel-bin/src/bindings/pydp.so ./pydp
- name: Run tests
run: |
python setup.py test
pip install pycodestyle
pip install pytest
python setup.py test
- name: Check test coverage
run: |
coverage run --source pydp setup.py test
coverage report --ignore-errors --fail-under 95 -m
coverage run --source pydp setup.py test
coverage report --ignore-errors --fail-under 95 -m
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "third_party/differential-privacy"]
path = third_party/differential-privacy
url = https://github.com/google/differential-privacy
[submodule "third_party/pybind11_bazel"]
path = third_party/pybind11_bazel
url = https://github.com/pybind/pybind11_bazel
5 changes: 0 additions & 5 deletions BUILD

This file was deleted.

15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,22 @@ RUN \
# get third-party dependencies
WORKDIR /tmp/third_party

RUN git clone https://github.com/google/differential-privacy.git && \
git clone https://github.com/pybind/pybind11_bazel.git
RUN git clone https://github.com/google/differential-privacy.git
RUN pip3 install pipenv

WORKDIR /root/PyDP
COPY . /root/PyDP

RUN rm -rf third_party/differential-privacy/ third_party/pybind11_bazel/ && \
RUN rm -rf third_party/differential-privacy/ && \
cp -r /tmp/third_party/* /root/PyDP/third_party

RUN rm -rf third_party/differential-privacy/java && \
rm -rf third_party/differential-privacy/examples/java

RUN \
bash build_PyDP.sh && \
python3 setup.py sdist bdist_wheel && \
pip install dist/*.whl && \
pip install -r requirements_dev.txt
pipenv run bazel build src/python:bindings_test --verbose_failures && \
pipenv run python3 setup.py bdist_wheel && \
pipenv install dist/*.whl

# Define default command.
CMD ["bash"]
15 changes: 15 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
setuptools = "*"
bumpversion = "==0.5.3"
tox = "==3.5.2"
pytest = "*"
pycodestyle = "*"
twine = "*"
coverage = "*"

[packages]
Loading