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 authored Nov 28, 2024
1 parent 631fa05 commit 85992c9
Show file tree
Hide file tree
Showing 15 changed files with 195 additions and 87 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
11 changes: 0 additions & 11 deletions .github/workflows/workflow-github-macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,5 @@ jobs:
run: |
cd build && CTEST_OUTPUT_ON_FAILURE=TRUE make test
- name: prepare RPCAPI Tests
run: cd tools && bash .ci/rpcapi_ci_prepare.sh

- name: FISCO BCOS RpcApiTest
uses: matt-ball/[email protected]
with:
collection: https://raw.githubusercontent.com/FISCO-BCOS/FISCOBCOS-RPC-API/main/fiscobcos.rpcapi.collection.json

- name: Integration test - Air
run: cd tools && bash .ci/ci_check_air.sh ${{ github.base_ref }}

- name: Integration test - Pro
run: cd tools && bash .ci/ci_check_pro.sh ${{ github.base_ref }}
11 changes: 8 additions & 3 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 All @@ -28,14 +30,17 @@ jobs:
env:
VCPKG_ROOT: ~/cache/vcpkg
DEPS_ROOT: ~/cache/deps
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
steps:
- uses: actions/checkout@v3
with:
clean: false
- name: Set up Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: "16.x"
- uses: actions/checkout@v3
with:
clean: false

- name: Prepare centos tools
run: |
Expand Down
13 changes: 8 additions & 5 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 All @@ -22,11 +24,10 @@ jobs:
env:
VCPKG_ROOT: ~/cache/vcpkg
DEPS_ROOT: ~/cache/deps
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
steps:
- uses: actions/checkout@v3
with:
clean: false

- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
Expand All @@ -37,7 +38,9 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: "16.x"

- uses: actions/checkout@v3
with:
clean: false
- 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
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=ON -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
4 changes: 4 additions & 0 deletions bcos-boostssl/bcos-boostssl/websocket/WsError.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ inline bool notRetryAgain(int _wsError)

inline std::string wsErrorToString(WsError _wsError)
{
#ifdef WIN32
return std::to_string(_wsError);
#else
return std::string(magic_enum::enum_name(_wsError));
#endif
}

} // namespace bcos::boostssl::ws
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
Loading

0 comments on commit 85992c9

Please sign in to comment.