Skip to content

Commit

Permalink
Update build-release.yml, .gitignore, and 64 more files...
Browse files Browse the repository at this point in the history
  • Loading branch information
f04ever committed May 25, 2022
0 parents commit 46328c2
Show file tree
Hide file tree
Showing 66 changed files with 18,234 additions and 0 deletions.
296 changes: 296 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
name: build
on:
push:
branches: [ main, devel ]
tags:
- "*"
jobs:
build-linux:
name: 'Build Linux'
runs-on: 'ubuntu-latest'
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Build source
run: |
sudo apt-get -y -qq update && sudo apt-get -y -q upgrade 2>&1 > /dev/null
sudo apt-get -y -qq install libc++-12-dev libc++abi-12-dev lld 2>&1 > /dev/null
sudo apt-get -y -qq install g++-10-i686-linux-gnu 2>&1 > /dev/null
sudo apt-get -y -qq install g++-10-arm-linux-gnueabihf 2>&1 > /dev/null
sudo apt-get -y -qq install g++-10-aarch64-linux-gnu 2>&1 > /dev/null
sudo apt-get -y -qq install libncurses-dev 2>&1 > /dev/null
wget -q http://ftp.de.debian.org/debian/pool/main/l/llvm-toolchain-12/libc++-12-dev_12.0.1-20+b1_i386.deb 2>&1 > /dev/null
dpkg-deb -x libc++-12-dev_12.0.1-20+b1_i386.deb clang+llvm-12.0.1-i386-linux-gnu 2>&1 > /dev/null
wget -q http://ftp.de.debian.org/debian/pool/main/l/llvm-toolchain-12/libc++abi-12-dev_12.0.1-20+b1_i386.deb 2>&1 > /dev/null
dpkg-deb -x libc++abi-12-dev_12.0.1-20+b1_i386.deb clang+llvm-12.0.1-i386-linux-gnu 2>&1 > /dev/null
wget -q http://de.archive.ubuntu.com/ubuntu/pool/main/n/ncurses/libncurses-dev_6.2-0ubuntu2_i386.deb 2>&1 > /dev/null
dpkg-deb -x libncurses-dev_6.2-0ubuntu2_i386.deb libncurses-dev_6.2-0ubuntu2_i386 2>&1 > /dev/null
wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.1/clang+llvm-12.0.1-aarch64-linux-gnu.tar.xz 2>&1 > /dev/null
tar xf clang+llvm-12.0.1-aarch64-linux-gnu.tar.xz 2>&1 > /dev/null
wget -q https://mirrors.ecnu.edu.cn/ubuntu-ports/ubuntu-ports/pool/main/n/ncurses/libncurses-dev_6.2-0ubuntu2_arm64.deb 2>&1 > /dev/null
dpkg-deb -x libncurses-dev_6.2-0ubuntu2_arm64.deb libncurses-dev_6.2-0ubuntu2_arm64 2>&1 > /dev/null
wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.1/clang+llvm-12.0.1-armv7a-linux-gnueabihf.tar.xz 2>&1 > /dev/null
tar xf clang+llvm-12.0.1-armv7a-linux-gnueabihf.tar.xz 2>&1 > /dev/null
wget -q https://mirrors.ecnu.edu.cn/ubuntu-ports/ubuntu-ports/pool/main/n/ncurses/libncurses-dev_6.2-0ubuntu2_armhf.deb 2>&1 > /dev/null
dpkg-deb -x libncurses-dev_6.2-0ubuntu2_armhf.deb libncurses-dev_6.2-0ubuntu2_armhf 2>&1 > /dev/null
wget -q https://dl.google.com/android/repository/android-ndk-r23b-linux.zip 2>&1 > /dev/null
unzip -qq android-ndk-r23b-linux.zip 2>&1 > /dev/null
#
clang++-12 --target=i686-linux-gnu --sysroot=/usr/i686-linux-gnu \
-L$(pwd)/clang+llvm-12.0.1-i386-linux-gnu/usr/lib/llvm-12/lib \
-I$(pwd)/libncurses-dev_6.2-0ubuntu2_i386/usr/include \
-L$(pwd)/libncurses-dev_6.2-0ubuntu2_i386/usr/lib/i386-linux-gnu \
noso-2m.cpp md5-c.cpp -o noso-2m-linux-i686 \
-std=c++20 -Ofast -DNDEBUG \
--stdlib=libc++ -fuse-ld=lld \
-lpthread -lc++ -lc++abi \
-lncurses -lform -ltermcap \
-static -s
file noso-2m-linux-i686
#
clang++-12 \
noso-2m.cpp md5-c.cpp -o noso-2m-linux-x86_64 \
-std=c++20 -Ofast -DNDEBUG \
--stdlib=libc++ -fuse-ld=lld \
-lpthread -lc++ -lc++abi \
-lncurses -lform -ltermcap \
-static -s
file noso-2m-linux-x86_64
#
clang++-12 --target=arm-linux-gnueabihf --sysroot=/usr/arm-linux-gnueabihf \
-L$(pwd)/clang+llvm-12.0.1-armv7a-linux-gnueabihf/lib \
-I$(pwd)/libncurses-dev_6.2-0ubuntu2_armhf/usr/include \
-L$(pwd)/libncurses-dev_6.2-0ubuntu2_armhf/usr/lib/arm-linux-gnueabihf \
noso-2m.cpp md5-c.cpp -o noso-2m-linux-armv7a \
-std=c++20 -Ofast -DNDEBUG \
--stdlib=libc++ -fuse-ld=lld \
-lpthread -lc++ -lc++abi \
-lncurses -lform -ltermcap \
-static -s
file noso-2m-linux-armv7a
#
clang++-12 --target=aarch64-linux-gnu --sysroot=/usr/aarch64-linux-gnu \
-L$(pwd)/clang+llvm-12.0.1-aarch64-linux-gnu/lib \
-I$(pwd)/libncurses-dev_6.2-0ubuntu2_arm64/usr/include \
-L$(pwd)/libncurses-dev_6.2-0ubuntu2_arm64/usr/lib/aarch64-linux-gnu \
noso-2m.cpp md5-c.cpp -o noso-2m-linux-aarch64 \
-std=c++20 -Ofast -DNDEBUG \
--stdlib=libc++ -fuse-ld=lld \
-lpthread -lc++ -lc++abi \
-lncurses -lform -ltermcap \
-static -s
file noso-2m-linux-aarch64
#
wget -q https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.2.tar.gz 2>&1 > /dev/null
tar xf ncurses-6.2.tar.gz 2>&1 > /dev/null
mkdir armv7a-linux-androideabi-ncurses
mkdir aarch64-linux-android-ncurses
cd ncurses-6.2
CC=$(pwd)/../android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi31-clang \
STRIP=$(pwd)/../android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip \
./configure \
--host=armv7a-linux-androideabi \
--prefix=$(pwd)/../armv7a-linux-androideabi-ncurses \
--without-manpages --without-progs --without-tack --without-tests 2>&1 > /dev/null
make 2>&1 > /dev/null
make install 2>&1 > /dev/null
CC=$(pwd)/../android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang \
STRIP=$(pwd)/../android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip \
./configure \
--host=aarch64-linux-android \
--prefix=$(pwd)/../aarch64-linux-android-ncurses \
--without-manpages --without-progs --without-tack --without-tests 2>&1 > /dev/null
make 2>&1 > /dev/null
make install 2>&1 > /dev/null
cd ..
android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi31-clang++ \
-I$(pwd)/armv7a-linux-androideabi-ncurses/include \
-I$(pwd)/armv7a-linux-androideabi-ncurses/include/ncurses \
-L$(pwd)/armv7a-linux-androideabi-ncurses/lib \
noso-2m.cpp md5-c.cpp -o noso-2m-android-armv7a \
-std=c++20 -Ofast -DNDEBUG \
-lncurses -lform \
-static -s
file noso-2m-android-armv7a
#
android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang++ \
-I$(pwd)/aarch64-linux-android-ncurses/include \
-I$(pwd)/aarch64-linux-android-ncurses/include/ncurses \
-L$(pwd)/aarch64-linux-android-ncurses/lib \
noso-2m.cpp md5-c.cpp -o noso-2m-android-aarch64 \
-std=c++20 -Ofast -DNDEBUG \
-lncurses -lform \
-static -s
file noso-2m-android-aarch64
shell: bash
- name: Upload artifacs
uses: actions/upload-artifact@v2
with:
name: 'ubuntu-latest'
path: |
README.md
noso-2m-linux-i686
noso-2m-linux-x86_64
noso-2m-linux-armv7a
noso-2m-linux-aarch64
noso-2m-android-armv7a
noso-2m-android-aarch64
build-windows:
name: 'Build Windows'
runs-on: 'windows-latest'
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Build source
run: |
clang++ --target=i686-pc-win32 \
-Imingw-w64-clang-i686-ncurses-6_3\\include \
-Imingw-w64-clang-i686-ncurses-6_3\\include\\ncurses \
mingw-w64-clang-i686-ncurses-6_3\\lib\\libncurses.dll.a \
mingw-w64-clang-i686-ncurses-6_3\\lib\\libform.dll.a \
noso-2m.cpp md5-c.cpp -o noso-2m-i686.exe \
-std=c++20 -Ofast -DNOGDI -DNDEBUG \
-Wl,-machine:x86 -nostdlib -lWs2_32.lib -lmsvcrt
clang++ --target=x86_64-pc-win32 \
-Imingw-w64-clang-x86_64-ncurses-6_3\\include \
-Imingw-w64-clang-x86_64-ncurses-6_3\\include\\ncurses \
mingw-w64-clang-x86_64-ncurses-6_3\\lib\\libncurses.dll.a \
mingw-w64-clang-x86_64-ncurses-6_3\\lib\\libform.dll.a \
noso-2m.cpp md5-c.cpp -o noso-2m-x86_64.exe \
-std=c++20 -Ofast -DNOGDI -DNDEBUG \
-Wl,-machine:x64 -nostdlib -lWs2_32.lib -lmsvcrt
shell: bash
- name: Upload artifacs
uses: actions/upload-artifact@v2
with:
name: 'windows-latest'
path: |
README.md
mingw-w64-clang-i686-ncurses-6_3\\bin\\libncurses6.dll
mingw-w64-clang-i686-ncurses-6_3\\bin\\libform6.dll
noso-2m-i686.exe
mingw-w64-clang-x86_64-ncurses-6_3\\bin\\libncurses6.dll
mingw-w64-clang-x86_64-ncurses-6_3\\bin\\libform6.dll
noso-2m-x86_64.exe
build-macos:
name: 'Build macOS'
runs-on: 'macos-latest'
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Build source
run: |
clang++ \
noso-2m.cpp md5-c.cpp -o noso-2m-darwin \
-std=c++20 -Ofast -DNDEBUG \
-lncurses -lform -ltermcap
strip -x noso-2m-darwin
file noso-2m-darwin
shell: bash
- name: Upload artifacs
uses: actions/upload-artifact@v2
with:
name: 'macos-latest'
path: |
README.md
noso-2m-darwin
release-linux:
if: contains(github.ref, '/tags/')
name: 'Release ubuntu-latest'
runs-on: 'ubuntu-latest'
needs: [build-linux]
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
- name: Package artifacts
run: |
tag=${{ github.event.ref }}
tag=${tag#"refs/tags/"}
cp ubuntu-latest/README.md README.md
#
cp ubuntu-latest/noso-2m-linux-i686 noso-2m
chmod +x noso-2m
tar -zcvf noso-2m-${tag}-linux-i686.tar.gz noso-2m README.md
#
cp ubuntu-latest/noso-2m-linux-x86_64 noso-2m
chmod +x noso-2m
tar -zcvf noso-2m-${tag}-linux-x86_64.tar.gz noso-2m README.md
#
cp ubuntu-latest/noso-2m-linux-armv7a noso-2m
chmod +x noso-2m
tar -zcvf noso-2m-${tag}-linux-armv7a.tar.gz noso-2m README.md
#
cp ubuntu-latest/noso-2m-linux-aarch64 noso-2m
chmod +x noso-2m
tar -zcvf noso-2m-${tag}-linux-aarch64.tar.gz noso-2m README.md
#
cp ubuntu-latest/noso-2m-android-armv7a noso-2m
chmod +x noso-2m
tar -zcvf noso-2m-${tag}-android-armv7a.tar.gz noso-2m README.md
#
cp ubuntu-latest/noso-2m-android-aarch64 noso-2m
chmod +x noso-2m
tar -zcvf noso-2m-${tag}-android-aarch64.tar.gz noso-2m README.md
shell: bash
- name: Upload artifacts
uses: softprops/action-gh-release@v1
with:
files: |
noso-2m-*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-macos:
if: contains(github.ref, '/tags/')
name: 'Release macos-latest'
runs-on: 'macos-latest'
needs: [build-macos]
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
- name: Package artifacts
run: |
tag=${{ github.event.ref }}
tag=${tag#"refs/tags/"}
cp macos-latest/README.md README.md
cp macos-latest/noso-2m-darwin noso-2m
chmod +x noso-2m
tar -zcvf noso-2m-${tag}-darwin.tar.gz noso-2m README.md
shell: bash
- name: Upload artifacts
uses: softprops/action-gh-release@v1
with:
files: |
noso-2m-*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-windows:
if: contains(github.ref, '/tags/')
name: 'Release windows-latest'
runs-on: 'windows-latest'
needs: [build-windows]
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
- name: Package artifacts
run: |
tag=${{ github.event.ref }}
tag=${tag#"refs/tags/"}
cp windows-latest/README.md README.md
#
cp windows-latest/noso-2m-x86_64.exe noso-2m.exe
cp windows-latest/mingw-w64-clang-x86_64-ncurses-6_3\\bin\\libncurses6.dll libncurses6.dll
cp windows-latest/mingw-w64-clang-x86_64-ncurses-6_3\\bin\\libform6.dll libform6.dll
7z a -tzip noso-2m-${tag}-win64-x86_64.zip noso-2m.exe libncurses6.dll libform6.dll README.md
#
cp windows-latest/noso-2m-i686.exe noso-2m.exe
cp windows-latest/mingw-w64-clang-i686-ncurses-6_3\\bin\\libncurses6.dll libncurses6.dll
cp windows-latest/mingw-w64-clang-i686-ncurses-6_3\\bin\\libform6.dll libform6.dll
7z a -tzip noso-2m-${tag}-win32-i686.zip noso-2m.exe libncurses6.dll libform6.dll README.md
shell: bash
- name: Upload artifacts
uses: softprops/action-gh-release@v1
with:
files: |
noso-2m-*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46 changes: 46 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Local clang build flags
noso-2m
compile_commands.json
compile_flags.txt
cache
*.log
.DS_Store

# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
#*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
#*.a
*.lib

# Executables
*.exe
*.out
*.app

## App packaging
*.ipa
*.dSYM.zip
*.dSYM

46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Version 0.2.3

- Support config file
- `--pools` option now supports both IP address and domain names
- Correct summary report of actual hashrate, balance, payment
- Fixed unexpected exits in Windows.
- Minor refining

Version 0.2.2

- Quick patch number overflow in block summary

Version 0.2.2

- Protect new target from racing conditions
- Block summary fixing
- Update pool protocol for providing miner app's information
- Update seed nodes
- Mainnet timestamp check before mininig

Version 0.2.0

- Support pool mining mode, plus pools failover
- Hashrate improvements
- Support CI/CD build for Linux, Android(Termux), macOS and Windows on amd64/x86-64, i686, arm64/aarch64, arm(v7a) 64-bits and 32-bits versions
- Eliminate redundant information in the summary report (will be improved more next versions)
- Bugfixes and several improvements
- Pump version series to v0.2.x

Version 0.1.3

- Update mainnet seed nodes

Version 0.1.2

- Consensus only once at beginning each blocks
- Now buildable with C++14
- Bug fixed and refining algo

Version 0.1.1

- Windows support

Version 0.1.0

- First release
Loading

0 comments on commit 46328c2

Please sign in to comment.