Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rocksdbfix #1635

Merged
merged 3 commits into from
Mar 3, 2023
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
20 changes: 10 additions & 10 deletions .github/workflows/PR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,9 @@ jobs:
DOCKER_IMAGE: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/plenum-build
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}

plenum_tests:
name: Test Plenum
needs: [workflow-setup, lint, build-docker-image]
uses: ./.github/workflows/reuseable_test.yaml
with:
GITHUB_REPOSITORY_NAME: ${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}

build_packages:
name: Build Packages
needs: [workflow-setup, plenum_tests]
needs: [workflow-setup, build-docker-image]
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v1
with:
DOCKER_IMAGE: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/plenum-build:${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
Expand All @@ -74,10 +66,18 @@ jobs:
isRC: 'false'
moduleName: plenum

plenum_tests:
name: Test Plenum
needs: [workflow-setup, lint, build_packages]
uses: ./.github/workflows/reuseable_test.yaml
with:
GITHUB_REPOSITORY_NAME: ${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}

statusCheck:
name: statusCheck
runs-on: ubuntu-latest
needs: [workflow-setup, build_packages]
needs: [workflow-setup, plenum_tests]
if: ${{ needs.workflow-setup.outputs.testsNeeded == 'false' || success() }}
steps:
- run: 'echo "Just a status Check (Always true, when executed) for branch protection rules(blocks merging while test are running and if tests fail)." '
25 changes: 13 additions & 12 deletions .github/workflows/Push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- ubuntu-20.04-upgrade
- rocksdbfix
paths:
- '**.py'
- '.github/**'
Expand Down Expand Up @@ -42,29 +43,29 @@ jobs:
CACHE_KEY_BUILD: ${{ needs.workflow-setup.outputs.CACHE_KEY_BUILD }}
DOCKER_IMAGE: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/plenum-build
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}

plenum_tests:
name: Test Plenum
needs: [workflow-setup, lint, build-docker-image]
uses: ./.github/workflows/reuseable_test.yaml
with:
GITHUB_REPOSITORY_NAME: ${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}


build_packages:
name: Build Packages
needs: [workflow-setup, plenum_tests]
needs: [workflow-setup, build-docker-image]
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v1
with:
DOCKER_IMAGE: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/plenum-build:${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
isDev: 'true'
isRC: 'false'
moduleName: plenum
moduleName: plenum

plenum_tests:
name: Test Plenum
needs: [workflow-setup, lint, build_packages]
uses: ./.github/workflows/reuseable_test.yaml
with:
GITHUB_REPOSITORY_NAME: ${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}

publish_artifacts:
name: Publish Artifacts
needs: [workflow-setup, build_packages]
needs: [workflow-setup, plenum_tests]
if: needs.workflow-setup.outputs.publish == 'true'
uses: hyperledger/indy-shared-gha/.github/workflows/publish_artifacts.yaml@v1
with:
Expand Down
50 changes: 7 additions & 43 deletions .github/workflows/build/Dockerfile.ubuntu-2004
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ ARG user=indy
RUN apt-get update -y && apt-get install -y \
# common stuff
git \
wget \
gnupg \
apt-transport-https \
ca-certificates \
apt-utils \
curl \
jq
apt-utils\
wget\
curl\
jq\
gnupg

# ========================================================================================================
# Update repository signing keys
Expand All @@ -31,45 +30,10 @@ RUN echo "deb https://hyperledger.jfrog.io/artifactory/indy focal dev" >> /etc/
echo "deb https://repo.sovrin.org/deb bionic master" >> /etc/apt/sources.list && \
echo "deb https://repo.sovrin.org/sdk/deb bionic master" >> /etc/apt/sources.list

# Sovrin
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88

RUN apt-get update -y && apt-get install -y \
# Python
python3-pip \
python3-nacl \
# rocksdb python wrapper
rocksdb=5.8.8 \
libgflags-dev \
libsnappy-dev \
zlib1g-dev \
libbz2-dev \
liblz4-dev \
libgflags-dev \
# zstd is needed for caching in github actions pipeline
zstd \
# fpm
ruby \
ruby-dev \
rubygems \
gcc \
make \
# Indy Node and Plenum
libssl1.0.0 \
ursa=0.3.2-1 \
# Indy SDK
libindy=1.15.0~1625-bionic \
# Need to move libursa.so to parent dir
&& mv /usr/lib/ursa/* /usr/lib && rm -rf /usr/lib/ursa
rubygems &&\
gem install --no-document fpm -v 1.14.2

RUN pip3 install -U \
# Required by setup.py
setuptools==50.3.2

# install rake
RUN gem install --no-document rake
## install fpm; needs to be pinned to 1.13.1 because some packages cannot be built with the newest release 1.14.0
RUN gem install --no-document fpm -v 1.14.2

RUN apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
22 changes: 11 additions & 11 deletions .github/workflows/releasepr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,9 @@ jobs:
DOCKER_IMAGE: ghcr.io/${{ needs.release-infos.outputs.GITHUB_REPOSITORY_NAME }}/plenum-build
UBUNTU_VERSION: ${{ needs.release-infos.outputs.UBUNTU_VERSION }}

plenum_tests:
name: Test Plenum
needs: [release-infos, lint, build-docker-image]
if: needs.release-infos.outputs.isVersionBump == 'true'
uses: ./.github/workflows/reuseable_test.yaml
with:
GITHUB_REPOSITORY_NAME: ${{ needs.release-infos.outputs.GITHUB_REPOSITORY_NAME }}
UBUNTU_VERSION: ${{ needs.release-infos.outputs.UBUNTU_VERSION }}

build_packages:
name: Build Packages
needs: [release-infos, plenum_tests]
needs: [release-infos, build-docker-image]
if: needs.release-infos.outputs.isVersionBump == 'true'
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v1
with:
Expand All @@ -70,9 +61,18 @@ jobs:
isRC: '${{ needs.release-infos.outputs.isPreRelease }}'
moduleName: plenum

plenum_tests:
name: Test Plenum
needs: [release-infos, lint, build_packages]
if: needs.release-infos.outputs.isVersionBump == 'true'
uses: ./.github/workflows/reuseable_test.yaml
with:
GITHUB_REPOSITORY_NAME: ${{ needs.release-infos.outputs.GITHUB_REPOSITORY_NAME }}
UBUNTU_VERSION: ${{ needs.release-infos.outputs.UBUNTU_VERSION }}

statusCheck:
name: statusCheck
runs-on: ubuntu-latest
needs: [build_packages]
needs: [plenum_tests]
steps:
- run: 'echo "Just a status Check (Always true, when executed) for branch protection rules(blocks merging while test are running and if tests fail)." '
23 changes: 22 additions & 1 deletion .github/workflows/reuseable_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-

- name: Download plenum deb build
uses: actions/download-artifact@v3
with:
name: plenum-deb

- name: Install dependencies from deb
run: |
aptStr=$(dpkg-deb -I indy-plenum_*.deb | grep -P "Depends: " | sed 's~Depends:~~g;s~(~~g;s~)~~g;s~>~~g;s~<~~g' | tr -d " \t\n\r" | tr "," "\n")
apt install -y ./indy-plenum_*.deb $aptStr libindy
ln -s /usr/lib/ursa/libursa.so /usr/lib/libursa.so

- name: Install dependencies
run: |
# Explicitly use the existing pip cache location in the plenum-build image.
Expand Down Expand Up @@ -98,11 +109,21 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-

- name: Download plenum deb build
uses: actions/download-artifact@v3
with:
name: plenum-deb

- name: Install dependencies from deb
run: |
aptStr=$(dpkg-deb -I indy-plenum_*.deb | grep -P "Depends: " | sed 's~Depends:~~g;s~(~~g;s~)~~g;s~>~~g;s~<~~g' | tr -d " \t\n\r" | tr "," "\n")
apt install -y ./indy-plenum_*.deb $aptStr libindy
ln -s /usr/lib/ursa/libursa.so /usr/lib/libursa.so

- name: Install dependencies
run: |
# Explicitly use the existing pip cache location in the plenum-build image.
pip --cache-dir /root/.cache/pip install .[tests]


- name: Run Indy Plenum ${{ matrix.module }} tests
run: python3 -m pytest -l -vv --junitxml=test-result-plenum-${{ matrix.module }}.xml ${{ matrix.module }}
Expand Down
3 changes: 2 additions & 1 deletion build-scripts/ubuntu-2004/build-3rd-parties.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ OUTPUT_PATH=${1:-.}
function build_rocksdb_deb {
VERSION=$1
VERSION_TAG="rocksdb-$VERSION"

#Install rocksdb requirements (libsnappy lbz2 llz4)
apt update && apt install -y libsnappy-dev libbz2-dev liblz4-dev zlib1g-dev libgflags-dev
git clone https://github.com/evernym/rocksdb.git /tmp/rocksdb
scriptpath="$(dirname "$(realpath "$0")")"/make_rocksdb.sh
cd /tmp/rocksdb
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def run(self):
'packaging',
# 'portalocker==2.2.1',
'portalocker',
'prompt_toolkit>=3.0.16',
'prompt_toolkit>=3.0.18',
# 'psutil==5.6.6',
'psutil',
# Pinned because tests fail with v.0.9
Expand Down