Fixes to let it run in the CI
This commit is contained in:
parent
8a2f0d39db
commit
8bcc3818b6
4 changed files with 38 additions and 23 deletions
15
.github/workflows/live_artifacts.yml
vendored
15
.github/workflows/live_artifacts.yml
vendored
|
|
@ -70,7 +70,7 @@ jobs:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 90
|
timeout-minutes: 90
|
||||||
steps:
|
steps:
|
||||||
- name: tag
|
- name: Checkout the Tag
|
||||||
run: |
|
run: |
|
||||||
echo "TAG=${{ github.event.inputs.ref }}" >> $GITHUB_ENV
|
echo "TAG=${{ github.event.inputs.ref }}" >> $GITHUB_ENV
|
||||||
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
@ -78,18 +78,19 @@ jobs:
|
||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
ref: ${{ github.event.inputs.ref }}
|
ref: ${{ github.event.inputs.ref }}
|
||||||
repository: ${{ github.event.inputs.repo }}
|
repository: ${{ github.event.inputs.repo }}
|
||||||
- name: centos base
|
- name: CentOS Base
|
||||||
run: ci/build-docker-image.sh docker/ci/Dockerfile-centos nanocurrency/nano-env:centos
|
run: ci/build-docker-image.sh docker/ci/Dockerfile-centos nanocurrency/nano-env:centos
|
||||||
- name: Build Artifact
|
- name: Build Artifact
|
||||||
run: |
|
run: |
|
||||||
docker run -e LIVE=1 -v ${GITHUB_WORKSPACE}:/workspace \
|
mkdir -p ${GITHUB_WORKSPACE}/artifacts
|
||||||
-v artifacts:/root/rpmbuild/RPMS -v source:/root/rpmbuild/SOURCES \
|
docker run -e LIVE=1 -e PAT=${{ secrets.GITHUB_TOKEN }} \
|
||||||
|
-e TAG=$TAG -v ${GITHUB_WORKSPACE}:/workspace \
|
||||||
|
-v ${GITHUB_WORKSPACE}/artifacts:/root/rpmbuild \
|
||||||
nanocurrency/nano-env:centos /bin/bash -c "ci/build-centos.sh"
|
nanocurrency/nano-env:centos /bin/bash -c "ci/build-centos.sh"
|
||||||
env:
|
- name: Deploy Artifacts
|
||||||
PAT: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Deploy Artifact
|
|
||||||
run: ci/actions/deploy.sh
|
run: ci/actions/deploy.sh
|
||||||
env:
|
env:
|
||||||
|
LINUX_RPM: 1
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
AWS_DEFAULT_REGION: us-east-2
|
AWS_DEFAULT_REGION: us-east-2
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
OS=$(uname)
|
OS=$(uname)
|
||||||
|
IS_RPM_DEPLOY="${LINUX_RPM:-0}"
|
||||||
|
|
||||||
if [[ "${BETA:-0}" -eq 1 ]]; then
|
if [[ "${BETA:-0}" -eq 1 ]]; then
|
||||||
BUILD="beta"
|
BUILD="beta"
|
||||||
|
|
@ -19,7 +20,20 @@ else
|
||||||
DIRECTORY="${S3_BUILD_DIRECTORY}/${BUILD}"
|
DIRECTORY="${S3_BUILD_DIRECTORY}/${BUILD}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$OS" == 'Linux' ]]; then
|
if [[ "$OS" == 'Linux' && "$IS_RPM_DEPLOY" -eq "1" ]]; then
|
||||||
|
RPMS=$(find ${GITHUB_WORKSPACE}/artifacts/RPMS -type f -name '*.rpm')
|
||||||
|
SRPMS=$(find ${GITHUB_WORKSPACE}/artifacts/SRPMS -type f -name '*.src.rpm')
|
||||||
|
for rpm in $RPMS; do
|
||||||
|
sha256sum $rpm > "${GITHUB_WORKSPACE}/${rpm}.sha256"
|
||||||
|
aws s3 cp "${rpm}" s3://repo.nano.org/$DIRECTORY/binaries/$(basename "${rpm}") --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
|
||||||
|
aws s3 cp "${GITHUB_WORKSPACE}/${rpm}.sha256" s3://repo.nano.org/$DIRECTORY/binaries/$(basename "${rpm}.sha256") --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
|
||||||
|
done
|
||||||
|
for srpm in $SRPMS; do
|
||||||
|
sha256sum $srpm > "${GITHUB_WORKSPACE}/${srpm}.sha256"
|
||||||
|
aws s3 cp "${srpm}" s3://repo.nano.org/$DIRECTORY/source/$(basename "${srpm}") --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
|
||||||
|
aws s3 cp "${GITHUB_WORKSPACE}/${srpm}.sha256" s3://repo.nano.org/$DIRECTORY/source/$(basename "${srpm}.sha256") --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
|
||||||
|
done
|
||||||
|
elif [[ "$OS" == 'Linux' ]]; then
|
||||||
sha256sum $GITHUB_WORKSPACE/build/nano-node-*-Linux.tar.bz2 >$GITHUB_WORKSPACE/nano-node-$TAG-Linux.tar.bz2.sha256
|
sha256sum $GITHUB_WORKSPACE/build/nano-node-*-Linux.tar.bz2 >$GITHUB_WORKSPACE/nano-node-$TAG-Linux.tar.bz2.sha256
|
||||||
sha256sum $GITHUB_WORKSPACE/build/nano-node-*-Linux.deb >$GITHUB_WORKSPACE/nano-node-$TAG-Linux.deb.sha256
|
sha256sum $GITHUB_WORKSPACE/build/nano-node-*-Linux.deb >$GITHUB_WORKSPACE/nano-node-$TAG-Linux.deb.sha256
|
||||||
aws s3 cp $GITHUB_WORKSPACE/build/nano-node-*-Linux.tar.bz2 s3://repo.nano.org/$DIRECTORY/binaries/nano-node-$TAG-Linux.tar.bz2 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
|
aws s3 cp $GITHUB_WORKSPACE/build/nano-node-*-Linux.tar.bz2 s3://repo.nano.org/$DIRECTORY/binaries/nano-node-$TAG-Linux.tar.bz2 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
|
||||||
|
|
@ -30,4 +44,4 @@ else
|
||||||
sha256sum $GITHUB_WORKSPACE/build/nano-node-*-Darwin.dmg >$GITHUB_WORKSPACE/build/nano-node-$TAG-Darwin.dmg.sha256
|
sha256sum $GITHUB_WORKSPACE/build/nano-node-*-Darwin.dmg >$GITHUB_WORKSPACE/build/nano-node-$TAG-Darwin.dmg.sha256
|
||||||
aws s3 cp $GITHUB_WORKSPACE/build/nano-node-*-Darwin.dmg s3://repo.nano.org/$DIRECTORY/binaries/nano-node-$TAG-Darwin.dmg --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
|
aws s3 cp $GITHUB_WORKSPACE/build/nano-node-*-Darwin.dmg s3://repo.nano.org/$DIRECTORY/binaries/nano-node-$TAG-Darwin.dmg --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
|
||||||
aws s3 cp $GITHUB_WORKSPACE/build/nano-node-$TAG-Darwin.dmg.sha256 s3://repo.nano.org/$DIRECTORY/binaries/nano-node-$TAG-Darwin.dmg.sha256 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
|
aws s3 cp $GITHUB_WORKSPACE/build/nano-node-$TAG-Darwin.dmg.sha256 s3://repo.nano.org/$DIRECTORY/binaries/nano-node-$TAG-Darwin.dmg.sha256 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ yes | yum update -y
|
||||||
|
|
||||||
yes | yum install -y git wget openssl bzip2 # <boost>
|
yes | yum install -y git wget openssl bzip2 # <boost>
|
||||||
|
|
||||||
yes | yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # epel 7
|
yes | yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # epel 7
|
||||||
yes | yum install -y jq || exit 1
|
yes | yum install -y jq || exit 1
|
||||||
|
|
||||||
yes | yum install -y rpm-build || exit 1
|
yes | yum install -y rpm-build || exit 1
|
||||||
|
|
|
||||||
26
util/makesrc
26
util/makesrc
|
|
@ -20,7 +20,7 @@ scriptDir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||||
function make_source() {
|
function make_source() {
|
||||||
git clone --recursive --single-branch --branch ${TAG} https://github.com/nanocurrency/nano-node nano-$VERSION
|
git clone --recursive --single-branch --branch ${TAG} https://github.com/nanocurrency/nano-node nano-$VERSION
|
||||||
cd nano-$VERSION
|
cd nano-$VERSION
|
||||||
git pull --tags
|
git fetch --tags
|
||||||
COUNT=$(git tag -l "${TAG}" | wc -l)
|
COUNT=$(git tag -l "${TAG}" | wc -l)
|
||||||
if [ "$COUNT" -eq 0 ]; then
|
if [ "$COUNT" -eq 0 ]; then
|
||||||
echo "tag $TAG not found"
|
echo "tag $TAG not found"
|
||||||
|
|
@ -40,18 +40,18 @@ function source_information() {
|
||||||
COMMIT=$(git log | head -1 | cut -d " " -f 2)
|
COMMIT=$(git log | head -1 | cut -d " " -f 2)
|
||||||
TAG_DATE=$(TZ=UTC date -d"$DATE" +%s)
|
TAG_DATE=$(TZ=UTC date -d"$DATE" +%s)
|
||||||
|
|
||||||
(
|
# (
|
||||||
eval "$(scl enable rh-python38 'echo -e "source /opt/rh/rh-python38/enable\n"')"
|
# eval "$(scl enable rh-python38 'echo -e "source /opt/rh/rh-python38/enable\n"')"
|
||||||
python -m pip install PyGithub mdutils
|
# python -m pip install PyGithub mdutils
|
||||||
|
#
|
||||||
python ${scriptDir}/changelog.py -p ${PAT} -t ${TAG} -m full
|
# python ${scriptDir}/changelog.py -p ${PAT} -t ${TAG} -m full
|
||||||
|
#
|
||||||
if [ ! -s CHANGELOG.md ]; then
|
# if [ ! -s CHANGELOG.md ]; then
|
||||||
echo "CHANGELOG not generated"
|
# echo "CHANGELOG not generated"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
# fi
|
||||||
exit 0
|
# exit 0
|
||||||
) || exit 1
|
# ) || exit 1
|
||||||
|
|
||||||
export TAG_DATE
|
export TAG_DATE
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue