Skip to content

Commit

Permalink
<fix>(CI): add ubuntu upload, try to fix windows compile cppsdk error.
Browse files Browse the repository at this point in the history
  • Loading branch information
kyonRay committed Nov 26, 2024
1 parent 631fa05 commit 9c8578c
Show file tree
Hide file tree
Showing 10 changed files with 119 additions and 15 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:
jobs:
compile_macOS_release:
name: upload standard binary of macOS
runs-on: macos-15-large
runs-on: macos-15
# runs-on: self-hosted-mac
# if: startsWith(github.ref,'v2')
steps:
Expand All @@ -42,55 +42,55 @@ jobs:
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bin/fisco-bcos.tar.gz
asset_name: fisco-bcos-macOS-x86_64.tar.gz
asset_name: fisco-bcos-macOS-arm.tar.gz
tag: ${{ github.ref }}
overwrite: true
- name: Upload fisco-bcos-lightnode binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bin/lightnode.tar.gz
asset_name: fisco-bcos-lightnode-macOS-x86_64.tar.gz
asset_name: fisco-bcos-lightnode-macOS-arm.tar.gz
tag: ${{ github.ref }}
overwrite: true
- name: Upload BcosNodeService binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: fisco-bcos-tars-service/BcosNodeService.tgz
asset_name: BcosNodeService-macOS-x86_64.tgz
asset_name: BcosNodeService-macOS-arm.tgz
tag: ${{ github.ref }}
overwrite: true
- name: Upload BcosRpcService binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: fisco-bcos-tars-service/BcosRpcService.tgz
asset_name: BcosRpcService-macOS-x86_64.tgz
asset_name: BcosRpcService-macOS-arm.tgz
tag: ${{ github.ref }}
overwrite: true
- name: Upload BcosGatewayService binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: fisco-bcos-tars-service/BcosGatewayService.tgz
asset_name: BcosGatewayService-macOS-x86_64.tgz
asset_name: BcosGatewayService-macOS-arm.tgz
tag: ${{ github.ref }}
overwrite: true
- name: Upload BcosMaxNodeService binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: fisco-bcos-tars-service/BcosMaxNodeService.tgz
asset_name: BcosMaxNodeService-macOS-x86_64.tgz
asset_name: BcosMaxNodeService-macOS-arm.tgz
tag: ${{ github.ref }}
overwrite: true
- name: Upload BcosExecutorService binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: fisco-bcos-tars-service/BcosExecutorService.tgz
asset_name: BcosExecutorService-macOS-x86_64.tgz
asset_name: BcosExecutorService-macOS-arm.tgz
tag: ${{ github.ref }}
overwrite: true
- name: Upload build_chain.sh
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/workflow-self-hosted-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ on:

env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/workflow-self-hosted-centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ concurrency:
cancel-in-progress: true
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16

jobs:
build_centos:
Expand Down
83 changes: 83 additions & 0 deletions .github/workflows/workflow-self-hosted-ubuntu-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Ubuntu CI Upload
on:
push:
paths-ignore:
- "docs/**"
- "Changelog.md"
- "README.md"
pull_request:
branches:
- release-3.*
- feature-3.*
- bugfix-3.*
- master
release:
types: [ push ]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

jobs:
build_centos:
name: ubuntu ci upload
runs-on: self-hosted-ubuntu
strategy:
fail-fast: false
env:
VCPKG_ROOT: /home/ci/cache/vcpkg
DEPS_ROOT: /home/ci/cache/deps
steps:
- uses: actions/checkout@v3
with:
clean: false

- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "8.0.382"

- name: Set up Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: "16.x"

- name: apt install
run: |
sudo apt update
sudo apt install -y lcov ccache wget python3-dev python3-pip git curl zip unzip tar
sudo apt install -y --no-install-recommends \
clang make build-essential cmake libssl-dev zlib1g-dev ca-certificates \
libgmp-dev flex bison patch libzstd-dev ninja-build pkg-config ccache uuid-runtime automake
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-02-25
override: true

- name: Reuse build cache
run: |
mkdir -p ./build
rm -rf deps
ln -s ${{ env.DEPS_ROOT }} deps
- name: Remove cache if correspond dir change
run: ./tools/.ci/clear_build_cache.sh

- name: update vcpkg
run: |
cd ${{ env.VCPKG_ROOT }} && git fetch --all && git checkout master && git pull
cd -
- name: Build for linux
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cd build && cmake -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DTESTS=OFF -DCOVERAGE=OFF -DWITH_LIGHTNODE=ON -DWITH_CPPSDK=OFF -DWITH_TIKV=OFF -DWITH_TARS_SERVICES=OFF -DTOOLS=OFF -DBUILD_STATIC=ON -DALLOCATOR=default .. || cat *.log
make -j6
- uses: actions/upload-artifact@v3
with:
name: fisco-bcos.tar.gz
path: build/fisco-bcos-air/fisco-bcos
2 changes: 1 addition & 1 deletion bcos-crypto/bcos-crypto/interfaces/crypto/CommonType.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
* @date 2021-04-01
*/
#pragma once
#include <bcos-utilities/BoostLog.h>
#include <bcos-utilities/FixedBytes.h>
#include <bcos-utilities/Log.h>

#define CRYPTO_LOG(LEVEL) BCOS_LOG(LEVEL) << LOG_BADGE("CRYPTO")
namespace bcos::crypto
Expand Down
2 changes: 1 addition & 1 deletion bcos-crypto/bcos-crypto/signature/fastsm2/fast_sm2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
* @date 2022.01.17
* @author yujiechen
*/
#include "bcos-utilities/BoostLog.h"
#include <bcos-crypto/interfaces/crypto/CommonType.h>
#include <bcos-crypto/signature/fastsm2/fast_sm2.h>
#include <bcos-utilities/BoostLog.h>
#include <bcos-utilities/DataConvertUtility.h>
#include <openssl/bn.h>
#include <openssl/ec.h>
Expand Down
5 changes: 3 additions & 2 deletions bcos-crypto/bcos-crypto/signature/hsmSM2/HsmSM2Crypto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
* @date 2022.10.07
* @author lucasli
*/
#include "hsm-crypto/hsm/CryptoProvider.h"
#include "hsm-crypto/hsm/SDFCryptoProvider.h"
#include <bcos-crypto/signature/Exceptions.h>
#include <bcos-crypto/signature/codec/SignatureDataWithPub.h>
#include <bcos-crypto/signature/hsmSM2/HsmSM2Crypto.h>
#include <bcos-crypto/signature/hsmSM2/HsmSM2KeyPair.h>
#include <bcos-utilities/BoostLog.h>
#include <hsm-crypto/hsm/CryptoProvider.h>
#include <hsm-crypto/hsm/SDFCryptoProvider.h>
#include <algorithm>

using namespace bcos;
Expand Down
16 changes: 16 additions & 0 deletions bcos-utilities/bcos-utilities/BoostLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,22 @@
#undef ERROR
#endif

#ifdef TRACE
#undef TRACE
#endif

#ifdef INFO
#undef INFO
#endif

#ifdef WARNING
#undef WARNING
#endif

#ifdef FATAL
#undef FATAL
#endif

namespace bcos
{
extern std::string const FileLogger;
Expand Down
4 changes: 2 additions & 2 deletions bcos-utilities/bcos-utilities/BoostLogInitializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
*/
#include "BoostLogInitializer.h"
#include "BoostLogThreadNameAttribute.h"
#include "bcos-framework/bcos-framework/Common.h"
#include "bcos-utilities/BoostLog.h"
#include <bcos-framework/Common.h>
#include <bcos-framework/bcos-framework/protocol/GlobalConfig.h>
#include <bcos-utilities/BoostLog.h>
#include <bcos-utilities/RateCollector.h>
#include <boost/algorithm/string/split.hpp>
#include <boost/core/null_deleter.hpp>
Expand Down
2 changes: 1 addition & 1 deletion bcos-utilities/bcos-utilities/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @date 2021-02-24
*/

#include "bcos-utilities/BoostLog.h"
#include <bcos-utilities/BoostLog.h>
#define NOMINMAX
#if defined(WIN32) || defined(WIN64) || defined(_WIN32) || defined(_WIN32_)
#define _WIN32_WINNT 0x0601
Expand Down

0 comments on commit 9c8578c

Please sign in to comment.