diff --git a/.github/workflows/beta_artifacts.yml b/.github/workflows/beta_artifacts.yml index 5adaedab..6f35fade 100644 --- a/.github/workflows/beta_artifacts.yml +++ b/.github/workflows/beta_artifacts.yml @@ -105,6 +105,40 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: us-east-2 + linux_rpm_job: + if: ${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.result == 'success' && always() || github.event.inputs.ref != '' && always() }} + needs: build_auto_setup_job + runs-on: ubuntu-22.04 + timeout-minutes: 90 + steps: + - name: Sets the tag and repo variables (to build) + run: | + echo "TAG=${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.outputs.build_tag || github.event.inputs.ref }}" >> $GITHUB_ENV + echo "VERSION_PRE_RELEASE=${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.outputs.build_number || 'OFF' }}" >> $GITHUB_ENV + echo "REPO_TO_BUILD=${{ github.event.inputs.repo }}" >> $GITHUB_ENV + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 + with: + submodules: "recursive" + ref: ${{ github.ref }} + repository: ${{ github.repository }} + - name: RockyLinux 8 Base + run: ci/build-docker-image.sh docker/ci/Dockerfile-rhel nanocurrency/nano-env:rhel + - name: Build Artifact + run: | + mkdir -p ${GITHUB_WORKSPACE}/artifacts + docker run -e BETA=1 -e TAG=$TAG -e REPO_TO_BUILD=$REPO_TO_BUILD -e RPM_RELEASE=1 \ + -v ${GITHUB_WORKSPACE}:/workspace \ + -v ${GITHUB_WORKSPACE}/artifacts:/root/rpmbuild \ + nanocurrency/nano-env:rhel /bin/bash -c "ci/build-rhel.sh" + - name: Deploy Artifacts + run: ci/actions/deploy.sh + env: + LINUX_RPM: 1 + S3_BUILD_DIRECTORY: ${{ secrets.S3_BUILD_DIRECTORY }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: us-east-2 + linux_docker_job: if: ${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.result == 'success' && always() || github.event.inputs.ref != '' && always() }} needs: build_auto_setup_job diff --git a/.github/workflows/beta_artifacts_latest_release_branch.yml b/.github/workflows/beta_artifacts_latest_release_branch.yml index 8ca4850d..7627a46e 100644 --- a/.github/workflows/beta_artifacts_latest_release_branch.yml +++ b/.github/workflows/beta_artifacts_latest_release_branch.yml @@ -95,6 +95,39 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: us-east-2 + linux_rpm_job: + needs: build_auto_setup_job + runs-on: ubuntu-22.04 + timeout-minutes: 90 + steps: + - name: Sets the tag and repo variables (to build) + run: | + echo "TAG=${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.outputs.build_tag || github.event.inputs.ref }}" >> $GITHUB_ENV + echo "VERSION_PRE_RELEASE=${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.outputs.build_number || 'OFF' }}" >> $GITHUB_ENV + echo "REPO_TO_BUILD=${{ github.event.inputs.repo }}" >> $GITHUB_ENV + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 + with: + submodules: "recursive" + ref: ${{ github.ref }} + repository: ${{ github.repository }} + - name: RockyLinux 8 Base + run: ci/build-docker-image.sh docker/ci/Dockerfile-rhel nanocurrency/nano-env:rhel + - name: Build Artifact + run: | + mkdir -p ${GITHUB_WORKSPACE}/artifacts + docker run -e BETA=1 -e TAG=$TAG -e REPO_TO_BUILD=$REPO_TO_BUILD -e RPM_RELEASE=1 \ + -v ${GITHUB_WORKSPACE}:/workspace \ + -v ${GITHUB_WORKSPACE}/artifacts:/root/rpmbuild \ + nanocurrency/nano-env:rhel /bin/bash -c "ci/build-rhel.sh" + - name: Deploy Artifacts + run: ci/actions/deploy.sh + env: + LINUX_RPM: 1 + S3_BUILD_DIRECTORY: ${{ secrets.S3_BUILD_DIRECTORY }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: us-east-2 + linux_docker_job: needs: build_auto_setup_job runs-on: ubuntu-20.04 diff --git a/nanocurrency-beta.spec.in b/nanocurrency-beta.spec.in index fdce2e65..aba45eda 100644 --- a/nanocurrency-beta.spec.in +++ b/nanocurrency-beta.spec.in @@ -6,7 +6,7 @@ License: BSD-2-Clause URL: https://nano.org/ Requires(pre): /usr/sbin/useradd, /usr/bin/getent Requires(postun): /usr/sbin/userdel -BuildRequires: make, libstdc++-static, glibc-devel, glibc-headers +BuildRequires: make, glibc-devel, glibc-headers Source: nano-%{version}.tar.gz %description @@ -17,22 +17,18 @@ the nano daemon, and a service. %prep if [ ! -x "$(which cmake)" ]; then echo "cmake must exist, try:" >&2 - echo " scl enable devtoolset-7 'rpmbuild ...'" >&2 + echo " scl enable gcc-toolset-12 'rpmbuild ...'" >&2 exit 1 fi -if cc --std=c++14 --version 2>&1 >/dev/null | grep '^' >/dev/null; then +if cc --std=c++20 --version 2>&1 >/dev/null | grep '^' >/dev/null; then echo "Unsupported C++ compiler, try:" >&2 - echo " scl enable devtoolset-7 'rpmbuild ...'" >&2 - exit 1 -fi -if test ! -d /usr/local/boost; then - echo "Boost should be in /usr/local/boost" >&2 + echo " scl enable gcc-toolset-12 'rpmbuild ...'" >&2 exit 1 fi %autosetup -n nano-%{version} %build -cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DBOOST_ROOT=/usr/local/boost -DACTIVE_NETWORK=nano_beta_network . +cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DACTIVE_NETWORK=nano_beta_network -DCMAKE_BUILD_TYPE=RelWithDebInfo . make nano_node %{?_smp_mflags} make nano_rpc %{?_smp_mflags}