Skip to content

Commit

Permalink
add ci for centos binary upload (FISCO-BCOS#4450)
Browse files Browse the repository at this point in the history
  • Loading branch information
bxq2011hust authored May 13, 2024
1 parent c06989d commit e5aa592
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 1 deletion.
75 changes: 75 additions & 0 deletions .github/workflows/workflow-self-hosted-centos-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
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@v2
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@v2
with:
name: fisco-bcos-without-tbb.tar.gz
path: bin/fisco-bcos.tar.gz
2 changes: 1 addition & 1 deletion libstorage/MemoryTableFactory2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,4 +428,4 @@ void MemoryTableFactory2::setAuthorizedAddress(storage::TableInfo::Ptr _tableInf
uint64_t dev::storage::MemoryTableFactory2::ID()
{
return m_ID;
};
}

0 comments on commit e5aa592

Please sign in to comment.