Skip to content

Commit

Permalink
Merge pull request #1904 from WadeBarnes/ubuntu-22.04
Browse files Browse the repository at this point in the history
Build and workflow updates and fixes
  • Loading branch information
swcurran authored Feb 7, 2025
2 parents c655ff1 + 2acd776 commit 311689d
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/actions/getNewNodeVersion/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ runs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.10'
- name: Get Versions
id: versions
shell: bash
Expand All @@ -35,4 +35,4 @@ runs:
echo "nodeVersion=$nodeVersion" >> $GITHUB_OUTPUT
echo "::group::DEBUG"
echo "nodeVersion is set to $nodeVersion"
echo "::endgroup::"
echo "::endgroup::"
7 changes: 6 additions & 1 deletion .github/workflows/PR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ on:

branches:
- main
- ubuntu-22.04

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
workflow-setup:
name: Initialize Workflow
Expand Down Expand Up @@ -82,4 +87,4 @@ jobs:
needs: [workflow-setup, indy_node_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)." '
- run: 'echo "Just a status Check (Always true, when executed) for branch protection rules(blocks merging while test are running and if tests fail)." '
5 changes: 5 additions & 0 deletions .github/workflows/Push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ on:
branches:
- main
- test-automation-integration
- ubuntu-22.04
paths:
- '**.py'
- '.github/**'
- 'build-scripts/**'
- 'bump_version.sh'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
workflow-setup:
name: Initialize Workflow
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/build/Dockerfile.ubuntu-2204
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,17 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 &&
# Plenum
# - https://github.com/hyperledger/indy-plenum/issues/1546
# - Needed to pick up rocksdb=5.8.8
RUN echo "deb https://hyperledger.jfrog.io/artifactory/indy jammy dev" >> /etc/apt/sources.list && \
RUN echo "deb https://hyperledger.jfrog.io/artifactory/indy jammy dev rc" >> /etc/apt/sources.list && \
echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list && \
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

RUN apt-get update -y && apt-get install -y rubygems python3-pip && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*
RUN apt-get update -y && apt-get install -y \
rubygems \
python3-pip && \
apt-get -y autoremove && \
rm -rf /var/lib/apt/lists/*

# install fpm
RUN gem install --no-document rake dotenv:2.8.1 fpm:1.15.0
RUN gem install --no-document rake dotenv:2.8.1 fpm:1.15.0 && \
pip3 install Cython==0.29.36
2 changes: 1 addition & 1 deletion .github/workflows/reuseable_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
indy_node_tests:
name: Sliced Module Tests
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
# Fix for scacap/action-surefire-report out of memory error:
# - https://github.com/ScaCap/action-surefire-report/issues/17
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ jobs:
bump_version:
name: Bump Version Number
needs: taginfos
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.10'

- name: Install deps for version change
run: |
Expand Down
7 changes: 6 additions & 1 deletion build-scripts/ubuntu-2204/build-indy_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ cd "${TMP_DIR}/build-scripts/ubuntu-2204"
./prepare-package.sh "${TMP_DIR}" indy_node "${VERSION}" debian-packages

echo "Fetching the indy-plenum version from setup.py and converting it to deb format ..."
plenumDebVersion=$(grep -oP "indy-plenum==\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" ${TMP_DIR}/setup.py | grep -oP "\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" | sed 's/\./\~/3')
# Converts Versions defined in the following forms to their equivalent dep version format:
# 1.14.0.rc0 ==> 1.14.0~rc0
# 1.14.0-rc0 ==> 1.14.0~rc0
# 1.14.0.dev0654678970 ==> 1.14.0~dev0654678970
# 1.14.0-dev0654678970 ==> 1.14.0~dev0654678970
plenumDebVersion=$(grep -oP "indy-plenum==\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" ${TMP_DIR}/setup.py | grep -oP "\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" | sed 's/\./\~/3' | sed 's/\-/\~/1')
echo "plenumDebVersion: ${plenumDebVersion}"

sed -i "s/{package_name}/${PACKAGE_NAME}/" "prerm"
Expand Down
13 changes: 7 additions & 6 deletions build-scripts/ubuntu-2204/prepare-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@ bash -ex $GENERATE_MANIFEST_SCRIPT
cat $module_name/__manifest__.json

if [ "$distro_packages" = "debian-packages" ]; then
# Only used for the deb package builds, NOT for the PyPi package builds.
echo -e "\n\nPrepares indy-node debian package version"
sed -i -r "s~indy-node==([0-9\.]+[0-9])(\.)?([a-z]+)~indy-node==\1\~\3~" setup.py

# Update the package names to match the names that are available on the os.
echo -e "\nAdapt the dependencies for the Canonical archive"
sed -i "s~timeout-decorator~python3-timeout-decorator~" setup.py
sed -i "s~distro~python3-distro~" setup.py
# Update the package names to match the versions that are pre-installed on the os.
echo -e "\nAdapting the dependencies for the Canonical archive"
sed -i "s~timeout-decorator>=0.5.0~python3-timeout-decorator==0.5.0-1~" setup.py
sed -i "s~distro==1.7.0~python3-distro==1.7.0-1~" setup.py
sed -i "s~importlib-metadata=~python3-importlib-metadata=~" setup.py

echo "Preparing config files"
GENERAL_CONFIG_DIR="\/etc\/indy"
REPO_GENERAL_CONFIG_DIR="indy_node/general_config"
Expand All @@ -54,4 +55,4 @@ fi

popd

echo -e "\nFinished preparing $repo for publishing\n"
echo -e "\nFinished preparing $repo for publishing\n"
2 changes: 1 addition & 1 deletion indy_node/__version__.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[1, 13, 2, "", ""]
[1, 14, 0, "", ""]

0 comments on commit 311689d

Please sign in to comment.