Skip to content

add ci for centos binary upload #6

add ci for centos binary upload

add ci for centos binary upload #6

name: Centos CI Upload
on:
push:
paths-ignore:
- "docs/**"
- "Changelog.md"
- "README.md"
release:
types: [push]
pull_request:
paths-ignore:
- "docs/**"
- "Changelog.md"
- "README.md"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build_centos:
name: centos ci upload
runs-on: self-hosted-centos
strategy:
fail-fast: false
env:
VCPKG_ROOT: ~/cache/vcpkg
DEPS_ROOT: ~/cache/deps
steps:
- name: yum install
run: |
sudo yum install -y -q epel-release centos-release-scl flex bison patch gmp-static glibc-static glibc-devel libzstd-devel
sudo yum install -y -q devtoolset-7 llvm-toolset-7.0 rh-perl530-perl cmake3 zlib-devel ccache python-devel python3-devel python3-pip automake openssl
sudo yum reinstall -y -q https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
sudo yum install -y -q git
- uses: actions/checkout@v2
with:
fetch-depth: 5
- uses: actions/cache@v3
id: cache
with:
path: deps/src
key: deps-x86_64-v0-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/arm_runner.yml') }}
restore-keys: |
deps-x86_64-v0-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/arm_runner.yml') }}
deps-x86_64-v0-${{ runner.temp }}-${{ github.base_ref }}-
deps-x86_64-v0-${{ runner.temp }}-
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.21.0'
- name: configure without tbb
run: |
. /opt/rh/devtoolset-7/enable
. /opt/rh/rh-perl530/enable
cmake . -DWITH_TBB=OFF
make fisco-bcos -j4
- name: tar fisco-bcos without tbb
run: cp tools/build_chain.sh bin/ && cd bin && strip fisco-bcos && tar -zcf fisco-bcos.tar.gz fisco-bcos build_chain.sh
- uses: actions/upload-artifact@v4
with:
name: fisco-bcos.tar.gz
path: bin/fisco-bcos.tar.gz
- name: configure and compile
run: |
. /opt/rh/devtoolset-7/enable
. /opt/rh/rh-perl530/enable
cmake . -DWITH_TBB=ON
make fisco-bcos -j4
- name: tar fisco-bcos tbb
run: cp tools/build_chain.sh bin/ && cd bin && strip fisco-bcos && tar -zcf fisco-bcos.tar.gz fisco-bcos build_chain.sh
- uses: actions/upload-artifact@v4
with:
name: fisco-bcos-without-tbb.tar.gz
path: bin/fisco-bcos.tar.gz