ci: disable parallel package build

The current package name doesn't reflect that it's using
parallelization, and it's using platform linux_x86_64 which does mean
that it should work on any linux distro, while it's not the case
This commit is contained in:
youben11
2022-04-05 10:43:19 +01:00
committed by Ayoub Benaissa
parent fafaa4c870
commit 3dcd465962

View File

@@ -382,88 +382,6 @@ jobs:
asset_name: ${{ steps.build-wheel-linux.outputs.ASSET_NAME }}
asset_content_type: application/zip
BuildAndPushPythonPackagesLinuxWithParallelization:
runs-on: ubuntu-latest
needs: CreateRelease
strategy:
matrix:
python: ['3.8', '3.9', '3.10']
outputs:
python-package-name-linux-py38: ${{ steps.build-wheel-linux.outputs.ASSET_NAME_PY38 }}
python-package-name-linux-py39: ${{ steps.build-wheel-linux.outputs.ASSET_NAME_PY39 }}
python-package-name-linux-py310: ${{ steps.build-wheel-linux.outputs.ASSET_NAME_PY310 }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/checkout@v2
with:
repository: zama-ai/concrete_internal
ref: engine_c_api
path: concrete
token: ${{ secrets.GH_TOKEN }}
- uses: actions/checkout@v2
with:
repository: STEllAR-GROUP/hpx.git
ref: 1.7.1
path: hpx
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Build Concrete
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
cd ${{ github.workspace }}/concrete/concrete-ffi
RUSTFLAGS="-C target-cpu=native" cargo build --release
- name: Build HPX
run: |
sudo apt install -y libboost-filesystem-dev libhwloc-dev
cd ${{ github.workspace }}/hpx
mkdir build
cd build
cmake \
-DHPX_WITH_FETCH_ASIO=on \
-DHPX_FILESYSTEM_WITH_BOOST_FILESYSTEM_COMPATIBILITY=ON \
-DHPX_WITH_MALLOC=system ..
make
- name: Update Python Version
run: cd compiler && make update_python_version
- name: Build Parallel Python Package
id: build-wheel-linux
run: |
set -e
export HPX=${{ github.workspace }}/hpx
export HPX_INSTALL_DIR=$HPX/build
export CONCRETE_PROJECT=${{ github.workspace }}/concrete
sudo apt install -y ninja-build
pip install numpy pybind11==2.6.2 wheel auditwheel patchelf
cd compiler
mkdir build
make PARALLEL_EXECUTION_ENABLED=ON python-bindings
pip wheel --no-deps -w ./wheels .
auditwheel repair ./wheels/*.whl --plat linux_x86_64 -w ./wheels/
echo "::set-output name=ASSET_NAME::`find ./wheels/ -name *linux_x86_64*.whl | rev |cut -d "/" -f 1 |rev `"
# used later for python package test
echo "::set-output name=ASSET_NAME_PY`echo ${{ matrix.python }} |tr -d '.'`::`find ./wheels/ -name *linux_x86_64*.whl | rev |cut -d "/" -f 1 |rev `"
- name: Upload Python Package
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_RELEASE }}
with:
upload_url: ${{ needs.CreateRelease.outputs.upload_url }}
asset_path: ${{ github.workspace }}/compiler/wheels/${{ steps.build-wheel-linux.outputs.ASSET_NAME }}
asset_name: ${{ steps.build-wheel-linux.outputs.ASSET_NAME }}
asset_content_type: application/zip
BuildAndPushTarballLinux:
runs-on: ubuntu-latest
needs: CreateRelease
@@ -619,47 +537,6 @@ jobs:
pip install pytest
pytest -vs -m "not parallel" --ignore=tests/python/test_compiler_file_output/ tests/python
TestPythonPackageLinuxWithParallelization:
runs-on: ubuntu-latest
needs: [BuildAndPushPythonPackagesLinuxWithParallelization, CreateRelease]
strategy:
matrix:
include:
- python: '3.8'
filename-index: 'python-package-name-linux-py38'
- python: '3.9'
filename-index: 'python-package-name-linux-py39'
- python: '3.10'
filename-index: 'python-package-name-linux-py310'
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Extract Package Filename
id: extract-filename
run: echo "::set-output name=FILE_NAME::`echo '${{ toJson(needs.BuildAndPushPythonPackagesLinuxWithParallelization.outputs) }}' | jq '.[\"${{ matrix.filename-index }}\"]' | tr -d '\"' `"
- name: Download and Install Package
run: |
wget --auth-no-challenge --header='Accept:application/octet-stream' \
"https://${{ secrets.GH_TOKEN_RELEASE }}:@api.github.com/repos/${{ github.repository }}/releases/assets/`curl -s -u "zama-bot:${{ secrets.GH_TOKEN_RELEASE }}" \
https://api.github.com/repos/${{ github.repository }}/releases | \
jq 'map(select(.tag_name == "${{ github.ref_name }}"))' | \
jq '.[0].assets' | \
jq 'map(select(.name == "${{ steps.extract-filename.outputs.FILE_NAME }}" ))' | \
jq '.[].id'`" -O ${{ steps.extract-filename.outputs.FILE_NAME }}
pip install ${{ steps.extract-filename.outputs.FILE_NAME }}
- name: Test
run: |
cd compiler
pip install pytest
pytest -vs --ignore=tests/python/test_compiler_file_output/ tests/python
TestPythonPackageMacOS:
runs-on: macos-10.15
needs: [BuildAndPushPackagesMacOS, CreateRelease]