Skip to content

<fix>(CI): add ubuntu upload, try to fix windows compile cppsdk error. #15

<fix>(CI): add ubuntu upload, try to fix windows compile cppsdk error.

<fix>(CI): add ubuntu upload, try to fix windows compile cppsdk error. #15

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