Skip to content

fix: segment fault caused by weak #782

fix: segment fault caused by weak

fix: segment fault caused by weak #782

Workflow file for this run

name: build
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
TOOLS_BUILD_TYPE: Release
PR_NUMBER: ${{ github.event.number }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Step that prints name of pull request's base branch
run: |
echo "Pull request's base branch is: ${BASE_BRANCH}"
echo "Pull request's branch is: ${GITHUB_REF##*/}"
echo "Pull request's head ref is: ${GITHUB_HEAD_REF}"
env:
BASE_BRANCH: ${{ github.base_ref }}
if: github.event_name == 'pull_request'
- name: Checkout Connector
uses: actions/checkout@v3
- name: Set up Rust
id: setup-rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/cache@v3
id: cache-rust
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ steps.setup-rust.outputs.rustc_hash }}
- uses: actions/cache@v3
with:
path: |
target
key: ${{ runner.os }}-taos-target-${{ steps.setup-rust.outputs.rustc_hash }}
- run: |
cargo build -p taos --no-default-features --features ws-rustls
cargo build -p taos-ws-sys
test:
runs-on: ubuntu-latest
steps:
- name: Checkout tdengine
uses: actions/checkout@v2
with:
repository: "taosdata/TDengine"
path: "TDengine"
ref: "main"
- name: Prepare development tools
run: |
sudo apt install libjansson-dev libsnappy-dev liblzma-dev libz-dev pkg-config -y
sudo timedatectl set-timezone Asia/Shanghai
sudo date
- name: Checkout Rust connector
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
run: |
cd TDengine
echo use commit ${BRANCH_NAME}
sed -iE "s#GIT_TAG.*#GIT_TAG ${BRANCH_NAME}#" cmake/taosws_CMakeLists.txt.in
mkdir release && cd release
cmake .. -DBUILD_JDBC=false -DBUILD_HTTP=false -DWEBSOCKET=true
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/cache@v3
id: cache-rust-target
with:
path: |
TDengine/tools/taosws-rs/target/
key: ${{ runner.os }}-cargo-target-${{ steps.setup-rust.outputs.rustc_hash }}
- name: Build & Install TDengine
run: |
cd TDengine/release/
make -j8 || exit 1
sudo make install
nohup sudo taosd > /dev/null 2>&1 &
sleep 5
nohup sudo taosadapter > /dev/null 2>&1 &
- name: Run examples
run: |
cd TDengine/tools/taosws-rs
./taos-ws-sys/ci/package.sh
cd ./target/libtaosws
make
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./
./show-databases || exit 1