Skip to content

Merge branch 'develop' into bug/macos-crash #523

Merge branch 'develop' into bug/macos-crash

Merge branch 'develop' into bug/macos-crash #523

Workflow file for this run

name: Raptoreum Build
on:
push:
branches:
- master
- develop
- "ft/*"
- "bug/*"
- "release/*"
pull_request:
branches:
- develop
workflow_dispatch:
env:
COIN_NAME: raptoreum
BUILD_DIR: raptoreum-build
COMPRESS_DIR: raptoreum-compress
TEST_DIR: raptoreum-test
jobs:
get-version:
name: Get Version
runs-on: ubuntu-latest
steps:
- name: Triggered By
run: |
echo "checking out $GITHUB_REF triggered by $GITHUB_EVENT_NAME"
- name: Checkout
uses: actions/checkout@v3
- name: Read versions
id: versions
uses: christian-draeger/[email protected]
with:
path: build.properties
properties: "release-version candidate-version snapshot-version"
- name: Choose version
id: selected-version
shell: bash
run: |
if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]] || [[ "$GITHUB_REF" == *develop ]] || [[ "$GITHUB_REF" == *ft/* ]] || [[ "$GITHUB_REF" == *bug/* ]]; then
version=${{ steps.versions.outputs.snapshot-version }}
elif [[ "$GITHUB_EVENT_NAME" != "pull_request" ]] && [[ "$GITHUB_REF" == *"release/"* ]]; then
version=${{ steps.versions.outputs.candidate-version }}
elif [[ "$GITHUB_EVENT_NAME" != "pull_request" ]] && [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
version=${{ steps.versions.outputs.release-version }}
fi
echo "version is: [$version]"
echo "version=$version" >> $GITHUB_OUTPUT
echo "BUILD_VERSION=$version" > version.txt
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: version
path: version.txt
outputs:
version: ${{ steps.selected-version.outputs.version }}
build-ubuntu20:
name: Ubuntu 20 Build
needs: get-version
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Required Packages
run: |
sudo apt-get update -y
sudo apt-get install curl libcurl4-openssl-dev build-essential libtool autotools-dev automake pkg-config python3 bsdmainutils cmake -y
- name: Build Depends
run: |
echo "building with $(nproc) threads"
gcc --version
export FALLBACK_DOWNLOAD_PATH=https://pool.nowput.org/depends/
make -C depends -j$(nproc) HOST=x86_64-pc-linux-gnu
- name: Configure
run: |
./autogen.sh
./configure --prefix=`pwd`/depends/x86_64-pc-linux-gnu
- name: Build Binaries
run: |
make -j$(nproc)
mkdir -p ${BUILD_DIR} ${BUILD_DIR}_not_strip ${TEST_DIR}
cp src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_not_strip/
mv src/test/test_raptoreum ${TEST_DIR}
strip ${BUILD_DIR}/*
- name: Build Debug Binaries
run: |
make clean
make distclean
./autogen.sh
./configure --prefix=`pwd`/depends/x86_64-pc-linux-gnu --disable-tests --enable-debug --enable-crash-hooks
make -j$(nproc)
mkdir -p ${BUILD_DIR}_debug
mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_debug/
- name: Generate Checksum and Compress
run: |
mkdir -p ${COMPRESS_DIR}
cd ${BUILD_DIR}
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-ubuntu20-${{ needs.get-version.outputs.version }}.tar.gz *
cd ../${BUILD_DIR}_debug
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-ubuntu20-debug-${{ needs.get-version.outputs.version }}.tar.gz *
cd ../${BUILD_DIR}_not_strip
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-ubuntu20-not_strip-${{ needs.get-version.outputs.version }}.tar.gz *
cd ..
mv *.tar.gz ${COMPRESS_DIR}/
cd ${COMPRESS_DIR}
echo "sha256: `shasum ${COIN_NAME}-ubuntu20-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-ubuntu20-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "sha256: `shasum ${COIN_NAME}-ubuntu20-debug-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-ubuntu20-debug-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "sha256: `shasum ${COIN_NAME}-ubuntu20-not_strip-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-ubuntu20-not_strip-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
cd ..
cat ${COMPRESS_DIR}/checksums.txt
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-ubuntu20-${{ needs.get-version.outputs.version }}
path: ${{ env.COMPRESS_DIR }}
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-ubuntu20-test-${{ needs.get-version.outputs.version }}
path: ${{ env.TEST_DIR }}
test-ubuntu20:
name: Ubuntu 20 Tests
needs: [get-version, build-ubuntu20]
runs-on: ubuntu-20.04
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: ${{ env.COIN_NAME }}-ubuntu20-test-${{ needs.get-version.outputs.version }}
- name: Run Unit Tests
id: Tests
run: |
chmod +x test_raptoreum
./test_raptoreum --log_format=JUNIT > unit_test_results.xml
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: ${{ env.COIN_NAME }}-ubuntu20-test-${{ needs.get-version.outputs.version }}
path: unit_test_results.xml
- name: Publish Unit Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
check_name: "Ubuntu 20"
detailed_summary: ${{ steps.Tests.conclusion == 'failure'}}
include_passed: false
report_paths: "unit_test_results.xml"
build-ubuntu22:
name: Ubuntu 22 Build
needs: get-version
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Required Packages
run: |
sudo apt-get update -y
sudo apt-get install curl libcurl4-openssl-dev build-essential libtool autotools-dev automake pkg-config python3 bsdmainutils cmake -y
- name: Build Depends
run: |
echo "building with $(nproc) threads"
gcc --version
export FALLBACK_DOWNLOAD_PATH=https://pool.nowput.org/depends/
make -C depends -j$(nproc) HOST=x86_64-pc-linux-gnu
- name: Configure
run: |
./autogen.sh
./configure --prefix=`pwd`/depends/x86_64-pc-linux-gnu
# TODO: @Jami - this line was from malbit, I think we may not need it but could you help confirm?
# CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site ./configure
- name: Build Binaries
run: |
make -j$(nproc)
mkdir -p ${BUILD_DIR} ${BUILD_DIR}_not_strip ${TEST_DIR}
cp src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_not_strip/
mv src/test/test_raptoreum ${TEST_DIR}
strip ${BUILD_DIR}/*
- name: Build Debug Binaries
run: |
make clean
make distclean
./autogen.sh
./configure --prefix=`pwd`/depends/x86_64-pc-linux-gnu --disable-tests --enable-debug --enable-crash-hooks
make -j$(nproc)
mkdir -p ${BUILD_DIR}_debug
mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_debug/
- name: Generate Checksum and Compress
run: |
mkdir -p ${COMPRESS_DIR}
cd ${BUILD_DIR}
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-ubuntu22-${{ needs.get-version.outputs.version }}.tar.gz *
cd ../${BUILD_DIR}_debug
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-ubuntu22-debug-${{ needs.get-version.outputs.version }}.tar.gz *
cd ../${BUILD_DIR}_not_strip
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-ubuntu22-not_strip-${{ needs.get-version.outputs.version }}.tar.gz *
cd ..
mv *.tar.gz ${COMPRESS_DIR}/
cd ${COMPRESS_DIR}
echo "sha256: `shasum ${COIN_NAME}-ubuntu22-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-ubuntu22-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "sha256: `shasum ${COIN_NAME}-ubuntu22-debug-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-ubuntu22-debug-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "sha256: `shasum ${COIN_NAME}-ubuntu22-not_strip-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-ubuntu22-not_strip-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
cd ..
cat ${COMPRESS_DIR}/checksums.txt
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-ubuntu22-${{ needs.get-version.outputs.version }}
path: ${{ env.COMPRESS_DIR }}
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-ubuntu22-test-${{ needs.get-version.outputs.version }}
path: ${{ env.TEST_DIR }}
test-ubuntu22:
name: Ubuntu 22 Tests
needs: [get-version, build-ubuntu22]
runs-on: ubuntu-22.04
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: ${{ env.COIN_NAME }}-ubuntu22-test-${{ needs.get-version.outputs.version }}
- name: Run Unit Tests
id: Tests
run: |
chmod +x test_raptoreum
./test_raptoreum --log_format=JUNIT > unit_test_results.xml
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: ${{ env.COIN_NAME }}-ubuntu22-test-${{ needs.get-version.outputs.version }}
path: unit_test_results.xml
- name: Publish Unit Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
check_name: "Ubuntu 22"
detailed_summary: ${{ steps.Tests.conclusion == 'failure'}}
include_passed: false
report_paths: "unit_test_results.xml"
build-macos:
name: macOS 12 Build
needs: get-version
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Required Packages
run: |
brew install automake libtool pkg-config librsvg libnatpmp python
pip3 install ds_store mac_alias
pip3 install -U pip setuptools
- name: Build Depends
run: |
echo "building with 8 threads"
export FALLBACK_DOWNLOAD_PATH=https://pool.nowput.org/depends/
make -C depends -j8 HOST=x86_64-apple-darwin21.6.0
- name: Configure
run: |
./autogen.sh
./configure --prefix=`pwd`/depends/x86_64-apple-darwin21.6.0
- name: Build Binaries
run: |
make -j8
mkdir -p ${BUILD_DIR} ${BUILD_DIR}_not_strip ${TEST_DIR}
cp src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_not_strip/
mv src/test/test_raptoreum ${TEST_DIR}
strip ${BUILD_DIR}/*
- name: Generate Checksum and Compress
run: |
cd ${BUILD_DIR}
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
openssl sha256 * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-macos-${{ needs.get-version.outputs.version }}.tar.gz *
cd ../${BUILD_DIR}_not_strip
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
openssl sha256 * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-macos-not_strip-${{ needs.get-version.outputs.version }}.tar.gz *
cd ..
mkdir -p ${COMPRESS_DIR}
mv *.tar.gz ${COMPRESS_DIR}/
cd ${COMPRESS_DIR}
echo "sha256: `shasum ${COIN_NAME}-macos-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `openssl sha256 ${COIN_NAME}-macos-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "sha256: `shasum ${COIN_NAME}-macos-not_strip-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `openssl sha256 ${COIN_NAME}-macos-not_strip-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
cat checksums.txt
cd ..
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-macos-${{ needs.get-version.outputs.version }}
path: ${{ env.COMPRESS_DIR }}
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-macos-test-${{ needs.get-version.outputs.version }}
path: ${{ env.TEST_DIR }}
- name: Generate Macos dmg files
run: |
make deploy
mkdir -p macos-dmg
mv Raptoreum-Core.dmg macos-dmg/
cd macos-dmg
echo "sha256: `shasum Raptoreum-Core.dmg`" >> checksums.txt
echo "openssl-sha256: `openssl sha256 Raptoreum-Core.dmg`" >> checksums.txt
cd ..
- name: Upload dmg file
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-dmg-${{ needs.get-version.outputs.version }}
path: macos-dmg
test-macos:
name: macOS Tests
needs: [get-version, build-macos]
runs-on: macos-12
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: ${{ env.COIN_NAME }}-macos-test-${{ needs.get-version.outputs.version }}
- name: Run Unit Tests
id: Tests
run: |
chmod +x test_raptoreum
./test_raptoreum --log_format=JUNIT > unit_test_results.xml
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: ${{ env.COIN_NAME }}-macos-test-${{ needs.get-version.outputs.version }}
path: unit_test_results.xml
- name: Publish Unit Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
check_name: "macOS 11"
detailed_summary: ${{ steps.Tests.conclusion == 'failure'}}
include_passed: false
report_paths: "unit_test_results.xml"
# build-arm-32:
# name: ARM 32-bit Build
# needs: get-version
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Install Required Packages
# run: |
# sudo apt-get update -y
# sudo apt-get upgrade -y
# sudo apt-get install curl build-essential libtool g++-arm-linux-gnueabihf autotools-dev automake pkg-config python3 bsdmainutils cmake
# - name: Build Depends
# run: |
# echo "building with $(nproc) threads"
# make -C depends -j$(nproc) HOST=arm-linux-gnueabihf
# - name: Configure
# run: |
# ./autogen.sh
# ./configure --prefix=`pwd`/depends/arm-linux-gnueabihf
# - name: Build Binaries
# run: |
# make -j$(nproc)
# mkdir -p ${BUILD_DIR} ${TEST_DIR}
# mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
# mv src/test/test_raptoreum ${TEST_DIR}
# - name: Build Debug Binaries
# run: |
# make clean
# make distclean
# ./autogen.sh
# ./configure --prefix=`pwd`/depends/arm-linux-gnueabihf --disable-tests --enable-debug
# make -j$(nproc)
# mkdir -p ${BUILD_DIR}_debug
# mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_debug/
# - name: Generate Checksum and Compress
# run: |
# mkdir -p ${COMPRESS_DIR}
# cd ${BUILD_DIR}
# echo "sha256:" >> checksums.txt
# echo "------------------------------------" >> checksums.txt
# shasum * >> checksums.txt
# echo "------------------------------------" >> checksums.txt
# echo "openssl-sha256:" >> checksums.txt
# echo "------------------------------------" >> checksums.txt
# sha256sum * >> checksums.txt
# cat checksums.txt
# tar -cvzf ../${COIN_NAME}-arm32-${{ needs.get-version.outputs.version }}.tar.gz *
# cd ../${BUILD_DIR}_debug
# echo "sha256:" >> checksums.txt
# echo "------------------------------------" >> checksums.txt
# shasum * >> checksums.txt
# echo "------------------------------------" >> checksums.txt
# echo "openssl-sha256:" >> checksums.txt
# echo "------------------------------------" >> checksums.txt
# sha256sum * >> checksums.txt
# cat checksums.txt
# tar -cvzf ../${COIN_NAME}-arm32-debug-${{ needs.get-version.outputs.version }}.tar.gz *
# cd ..
# mv *.tar.gz ${COMPRESS_DIR}/
# cd ${COMPRESS_DIR}
# echo "sha256: `shasum ${COIN_NAME}-arm32-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
# echo "openssl-sha256: `sha256sum ${COIN_NAME}-arm32-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
# echo "sha256: `shasum ${COIN_NAME}-arm32-debug-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
# echo "openssl-sha256: `sha256sum ${COIN_NAME}-arm32-debug-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
# cd ..
# cat ${COMPRESS_DIR}/checksums.txt
# - name: Upload Artifacts
# uses: actions/upload-artifact@v3
# with:
# name: ${{ env.COIN_NAME }}-arm32-${{ needs.get-version.outputs.version }}
# path: ${{ env.COMPRESS_DIR }}
# - name: Upload Test Artifacts
# uses: actions/upload-artifact@v3
# with:
# name: ${{ env.COIN_NAME }}-arm32-test-${{ needs.get-version.outputs.version }}
# path: ${{ env.TEST_DIR }}
# test-arm-32:
# name: ARM 32-bit Tests
# needs: [ get-version, build-arm-32 ]
# runs-on: ubuntu-20.04
# steps:
# - name: Download Artifacts
# uses: actions/download-artifact@v3
# with:
# name: ${{ env.COIN_NAME }}-arm32-test-${{ needs.get-version.outputs.version }}
# - name: Run Unit Tests
# id: Tests
# uses: nandofw/[email protected]
# with:
# base_image: raspios_lite:latest
# cpu: cortex-a7
# cpu_info: cpuinfo/raspberrypi_3b
# copy_artifact_dest: ${{ github.workspace }}
# copy_artifact_path: unit_test_results.xml
# copy_artifacts_on_fail: yes
# commands: |
# chmod +x test_raptoreum
# ./test_raptoreum --log_format=JUNIT > unit_test_results.xml
# - name: Upload Test Artifacts
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: ${{ env.COIN_NAME }}-arm32-test-${{ needs.get-version.outputs.version }}
# path: unit_test_results.xml
# - name: Publish Unit Test Report
# uses: mikepenz/action-junit-report@v3
# if: always()
# with:
# check_name: "ARM 32-bit"
# detailed_summary: ${{ steps.Tests.conclusion == 'failure'}}
# include_passed: false
# report_paths: 'unit_test_results.xml'
build-arm-64:
name: ARM 64-bit Build
needs: get-version
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Required Packages
run: |
sudo apt-get update -y
sudo apt-get install curl libcurl4-openssl-dev build-essential libtool g++-aarch64-linux-gnu autotools-dev automake pkg-config python3 bsdmainutils cmake -y
- name: Build Depends
run: |
echo "building with $(nproc) threads"
export FALLBACK_DOWNLOAD_PATH=https://pool.nowput.org/depends/
make -C depends -j$(nproc) HOST=aarch64-linux-gnu
- name: Configure
run: |
./autogen.sh
./configure --prefix=`pwd`/depends/aarch64-linux-gnu
- name: Build Binaries
run: |
make -j$(nproc)
mkdir -p ${BUILD_DIR} ${TEST_DIR}
mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
mv src/test/test_raptoreum ${TEST_DIR}/
- name: Build Debug Binaries
run: |
make clean
make distclean
./autogen.sh
./configure --prefix=`pwd`/depends/aarch64-linux-gnu --disable-tests --enable-debug --enable-crash-hooks
make -j$(nproc)
mkdir -p ${BUILD_DIR}_debug
mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_debug/
- name: Generate Checksum and Compress
run: |
mkdir -p ${COMPRESS_DIR}
cd ${BUILD_DIR}
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-arm64-${{ needs.get-version.outputs.version }}.tar.gz *
cd ../${BUILD_DIR}_debug
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-arm64-debug-${{ needs.get-version.outputs.version }}.tar.gz *
cd ..
mv *.tar.gz ${COMPRESS_DIR}/
cd ${COMPRESS_DIR}
echo "sha256: `shasum ${COIN_NAME}-arm64-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-arm64-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "sha256: `shasum ${COIN_NAME}-arm64-debug-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-arm64-debug-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
cd ..
cat ${COMPRESS_DIR}/checksums.txt
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-arm64-${{ needs.get-version.outputs.version }}
path: ${{ env.COMPRESS_DIR }}
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-arm64-test-${{ needs.get-version.outputs.version }}
path: ${{ env.TEST_DIR }}
test-arm-64:
name: ARM 64-bit Tests
needs: [get-version, build-arm-64]
runs-on: ubuntu-20.04
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: ${{ env.COIN_NAME }}-arm64-test-${{ needs.get-version.outputs.version }}
- name: Run Unit Tests
id: Tests
uses: nandofw/[email protected]
with:
base_image: raspios_lite_arm64:latest
cpu: cortex-a7
copy_artifact_dest: ${{ github.workspace }}
copy_artifact_path: unit_test_results.xml
copy_artifacts_on_fail: yes
commands: |
chmod +x test_raptoreum
./test_raptoreum --log_format=JUNIT > unit_test_results.xml
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: ${{ env.COIN_NAME }}-arm64-test-${{ needs.get-version.outputs.version }}
path: unit_test_results.xml
- name: Publish Unit Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
check_name: "ARM 64-bit"
detailed_summary: ${{ steps.Tests.conclusion == 'failure'}}
include_passed: false
report_paths: "unit_test_results.xml"
build-win64:
name: Win64 Build
needs: get-version
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Required Packages
run: |
sudo apt-get update -y
sudo apt-get install curl libcurl4-openssl-dev build-essential libtool autotools-dev automake pkg-config python3 bsdmainutils cmake -y
sudo apt-get install -y g++-mingw-w64-x86-64 gcc-mingw-w64-x86-64 nsis
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
- name: Build Depends
run: |
echo "building with $(nproc) threads"
export FALLBACK_DOWNLOAD_PATH=https://pool.nowput.org/depends/
make -C depends -j$(nproc) HOST=x86_64-w64-mingw32
- name: Configure
run: |
./autogen.sh
export FALLBACK_DOWNLOAD_PATH=https://pool.nowput.org/depends/
./configure --prefix=`pwd`/depends/x86_64-w64-mingw32
# CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure
- name: Build Binaries
run: |
make -j$(nproc)
mkdir -p ${BUILD_DIR} ${BUILD_DIR}_not_strip ${TEST_DIR}
cp src/{raptoreum-cli.exe,raptoreumd.exe,qt/raptoreum-qt.exe} ${BUILD_DIR}/
mv src/{raptoreum-cli.exe,raptoreumd.exe,qt/raptoreum-qt.exe} ${BUILD_DIR}_not_strip/
mv src/test/test_raptoreum.exe ${TEST_DIR}
strip ${BUILD_DIR}/*
- name: Generate Checksum and Compress
run: |
cd ${BUILD_DIR}
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
zip -r ../${COIN_NAME}-win-${{ needs.get-version.outputs.version }}.zip .
cd ../${BUILD_DIR}_not_strip
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
zip -r ../${COIN_NAME}-win-not_strip-${{ needs.get-version.outputs.version }}.zip .
cd ..
mkdir -p ${COMPRESS_DIR}
mv *.zip ${COMPRESS_DIR}/
cd ${COMPRESS_DIR}
echo "sha256: `shasum ${COIN_NAME}-win-${{ needs.get-version.outputs.version }}.zip`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-win-${{ needs.get-version.outputs.version }}.zip`" >> checksums.txt
echo "sha256: `shasum ${COIN_NAME}-win-not_strip-${{ needs.get-version.outputs.version }}.zip`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-win-not_strip-${{ needs.get-version.outputs.version }}.zip`" >> checksums.txt
cat checksums.txt
cd ..
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-win-${{ needs.get-version.outputs.version }}
path: ${{ env.COMPRESS_DIR }}
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-win-test-${{ needs.get-version.outputs.version }}
path: ${{ env.TEST_DIR }}
- name: Generate window installation file
run: |
make deploy
mkdir win64-installation
mv *.exe win64-installation/
cd win64-installation
echo "sha256: `shasum *.exe`" >> checksums.txt
echo "openssl-sha25: `sha256sum *.exe`" >> checksums.txt
cd ..
- name: Upload Win64 installation file
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-win-installation-${{ needs.get-version.outputs.version }}
path: win64-installation
test-win64:
name: Win64 Tests
needs: [get-version, build-win64]
runs-on: windows-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: ${{ env.COIN_NAME }}-win-test-${{ needs.get-version.outputs.version }}
- name: Check Artifacts
run: |
pwd
dir
- name: Run Unit Tests B
id: Tests
run: |
pwd
dir
.\test_raptoreum.exe --log_format=JUNIT > unit_test_results.xml
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: ${{ env.COIN_NAME }}-win-test-${{ needs.get-version.outputs.version }}
path: unit_test_results.xml
- name: Publish Unit Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
check_name: "Win64"
detailed_summary: ${{ steps.Tests.conclusion == 'failure'}}
include_passed: false
report_paths: "unit_test_results.xml"