WeDPR-Component v3.0.0 #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish Binary Full Node | |
on: | |
push: | |
branches-ignore: | |
- "**" | |
release: | |
types: [published, created] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
RUST_BACKTRACE: 1 | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16 | |
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 | |
jobs: | |
full_node_macos_release: | |
name: full_node_macos_release | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-13] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 5 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly-2022-07-28 | |
override: true | |
- name: Prepare vcpkg | |
if: runner.os != 'Windows' | |
uses: friendlyanon/setup-vcpkg@v1 | |
with: { committish: 51b14cd4e1230dd51c11ffeff6f7d53c61cc5297 } | |
- uses: actions/cache@v2 | |
id: deps_cache | |
with: | |
path: | | |
deps/ | |
c:/vcpkg | |
!c:/vcpkg/.git | |
!c:/vcpkg/buildtrees | |
!c:/vcpkg/packages | |
!c:/vcpkg/downloads | |
key: build-macos-release-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/release_full_node.yml') }} | |
restore-keys: | | |
build-macos-release-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/release_full_node.yml') }} | |
build-macos-release-${{ matrix.os }}-${{ github.base_ref }}- | |
build-macos-release-${{ matrix.os }}- | |
- name: Build for macOS | |
if: runner.os == 'macOS' | |
run: | | |
bash -x cpp/tools/install_depends.sh -o macos | |
brew install libiconv | |
brew reinstall m4 autoconf libtool automake | |
echo "## m4:"`which m4` | |
export DYLD_LIBRARY_PATH=/usr/local/opt/libiconv/lib:${DYLD_LIBRARY_PATH} | |
export LDFLAGS="-L/usr/local/opt/libiconv/lib" | |
export CPPFLAGS="-I/usr/local/opt/libiconv/include" | |
export PATH="/usr/bin:${PATH}" | |
mkdir -p cpp/build && cd cpp/build | |
cmake -DBUILD_STATIC=ON -DTESTS=OFF -DCOVERAGE=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../ | |
make -j3 | |
cd bin && tar -cvzf ppc-air-node.tar.gz ppc-air-node && tar -cvzf ppc-pro-node.tar.gz ppc-pro-node && tar -cvzf ppc-gateway-service.tar.gz ppc-gateway-service && tar -cvzf wedpr-mpc.tar.gz wedpr-mpc | |
- name: Upload ppc-air-node binary to release | |
uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./cpp/build/bin/ppc-air-node.tar.gz | |
asset_name: ppc-air-node-macOS-x86_64.tar.gz | |
tag: ${{ github.ref }} | |
overwrite: true | |
- name: Upload ppc-pro-node binary to release | |
uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./cpp/build/bin/ppc-pro-node.tar.gz | |
asset_name: ppc-pro-node-macOS-x86_64.tar.gz | |
tag: ${{ github.ref }} | |
overwrite: true | |
- name: Upload ppc-gateway-service binary to release | |
uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./cpp/build/bin/ppc-gateway-service.tar.gz | |
asset_name: ppc-gateway-service-macOS-x86_64.tar.gz | |
tag: ${{ github.ref }} | |
overwrite: true | |
- name: Upload wedpr-mpc binary to release | |
uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./cpp/build/bin/wedpr-mpc.tar.gz | |
asset_name: wedpr-mpc-macOS-x86_64.tar.gzf | |
tag: ${{ github.ref }} | |
overwrite: true | |
full_node_centos_release: | |
name: full_node_centos_release | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
matrix: | |
container: | |
- centos-7.9 | |
container: | |
image: docker.io/centos:7 | |
volumes: | |
- /usr/local/share/vcpkg:/usr/local/share/vcpkg | |
- /node20217:/node20217:rw,rshared | |
- ${{ matrix.container == 'centos-7.9' && '/node20217:/__e/node20:ro,rshared' || ' ' }} | |
steps: | |
- name: install nodejs20glibc2.17 | |
if: ${{ matrix.container == 'centos-7.9' }} | |
run: | | |
curl -LO https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz | |
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217 | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
id: deps_cache | |
with: | |
path: | | |
deps/ | |
/usr/local/share/vcpkg/buildtrees | |
/usr/local/share/vcpkg/packages | |
/home/runner/.ccache | |
/Users/runner/.ccache/ | |
key: centos-release-all-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/cpp_full_node_workflow.yml') }} | |
restore-keys: | | |
centos-release-all-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/cpp_full_node_workflow.yml') }} | |
centos-release-all-${{ matrix.os }}-${{ github.base_ref }}- | |
centos-release-all-${{ matrix.os }}- | |
- name: Prepare centos tools | |
run: | | |
rpm -ivh https://cbs.centos.org/kojifiles/packages/centos-release-scl-rh/2/3.el7.centos/noarch/centos-release-scl-rh-2-3.el7.centos.noarch.rpm | |
rpm -ivh https://cbs.centos.org/kojifiles/packages/centos-release-scl/2/3.el7.centos/noarch/centos-release-scl-2-3.el7.centos.noarch.rpm | |
sed -i s/mirror.centos.org/mirrors.aliyun.com/g /etc/yum.repos.d/*.repo | |
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo | |
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo | |
cat /etc/yum.repos.d/*.repo | |
yum clean all | |
yum makecache | |
yum update -y | |
yum install -y epel-release centos-release-scl centos-release-scl-rh | |
yum install -y https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm | |
yum install -y libtool wget java-11-openjdk-devel git autoconf automake make gcc gcc-c++ glibc-static glibc-devel cmake3 ccache devtoolset-11 libzstd-devel zlib-devel flex bison python-devel python3-devel | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly-2022-07-28 | |
override: true | |
- name: Prepare vcpkg | |
if: runner.os != 'Windows' | |
uses: friendlyanon/setup-vcpkg@v1 | |
with: { committish: 51b14cd4e1230dd51c11ffeff6f7d53c61cc5297 } | |
- name: Check disk space | |
run: df . -h | |
- name: Free disk space | |
run: | | |
du -sch /usr/share/* | |
du -sch /opt/* | |
- name: Check disk space | |
run: | | |
df . -h | |
du /usr/ -hx -d 4 --threshold=1G | sort -hr | head | |
df /tmp | |
du /tmp | sort -n | |
ls -lh /tmp | |
- name: upgradeDepends | |
run: | | |
wget http://ftp.gnu.org/gnu/automake/automake-1.14.1.tar.gz | |
tar -xf automake-1.14.1.tar.gz | |
cd automake-1.14.1 | |
./configure && make -j4 && make install | |
cd .. | |
- name: DependenciesBuild | |
run: | | |
bash -x cpp/tools/install_depends.sh -o centos | |
alias cmake='cmake3' | |
. /opt/rh/devtoolset-11/enable | |
rm -rf python | |
mkdir -p cpp/build | |
cd cpp/build | |
cmake3 -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DBUILD_STATIC=ON -DCMAKE_BUILD_TYPE=Release -DTESTS=OFF ../ | |
- name: FreeDiskSpace | |
run: | | |
df -lh | |
du -sch /__w/WeDPR-Component/WeDPR-Component/vcpkg/buildtrees/* | |
du -sch /__w/WeDPR-Component/WeDPR-Component/vcpkg/buildtrees/grpc/src/* | |
rm -rf /__w/WeDPR-Component/WeDPR-Component/vcpkg/buildtrees/grpc/src | |
rm -rf /__w/WeDPR-Component/WeDPR-Component/vcpkg/buildtrees/grpc/*-dbg | |
rm -rf /__w/WeDPR-Component/WeDPR-Component/vcpkg/buildtrees/openssl/src | |
rm -rf /__w/WeDPR-Component/WeDPR-Component/vcpkg/buildtrees/openssl/*-dbg | |
rm -rf /__w/WeDPR-Component/WeDPR-Component/vcpkg/buildtrees/*/*-dbg | |
df -lh | |
- name: Compile | |
run: | | |
alias cmake='cmake3' | |
. /opt/rh/devtoolset-11/enable | |
cd cpp/build && cmake3 --build . --parallel 3 | |
cd bin && tar -cvzf ppc-air-node.tar.gz ppc-air-node && tar -cvzf ppc-pro-node.tar.gz ppc-pro-node && tar -cvzf ppc-gateway-service.tar.gz ppc-gateway-service && tar -cvzf wedpr-mpc.tar.gz wedpr-mpc | |
- name: Upload ppc-air-node | |
uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./cpp/build/bin/ppc-air-node.tar.gz | |
asset_name: ppc-air-node-linux-x86_64.tar.gz | |
tag: ${{ github.ref }} | |
overwrite: true | |
- name: Upload ppc-pro-node | |
uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./cpp/build/bin/ppc-pro-node.tar.gz | |
asset_name: ppc-pro-node-linux-x86_64.tar.gz | |
tag: ${{ github.ref }} | |
overwrite: true | |
- name: Upload ppc-gateway-service | |
uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./cpp/build/bin/ppc-gateway-service.tar.gz | |
asset_name: ppc-gateway-service-linux-x86_64.tar.gz | |
tag: ${{ github.ref }} | |
overwrite: true | |
- name: Upload wedpr-mpc | |
uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./cpp/build/bin/wedpr-mpc.tar.gz | |
asset_name: wedpr-mpc-linux-x86_64.tar.gz | |
tag: ${{ github.ref }} | |
overwrite: true |