chore: delete unused coverage files #1794
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Coverage | |
on: | |
push: | |
workflow_dispatch: | |
inputs: | |
tdengine_branch: | |
description: "TDengine branch" | |
required: true | |
type: string | |
env: | |
TOOLS_BUILD_TYPE: Release | |
TAOS_SUPPORT_VNODES: "256" | |
jobs: | |
build-tdengine: | |
runs-on: ubuntu-latest | |
outputs: | |
commit_id: ${{ steps.get_commit_id.outputs.commit_id }} | |
steps: | |
- name: Checkout TDengine by push | |
if: github.event_name == 'push' | |
uses: actions/checkout@v4 | |
with: | |
repository: "taosdata/TDengine" | |
path: "TDengine" | |
ref: "main" | |
- name: Checkout TDengine manually | |
if: github.event_name == 'workflow_dispatch' | |
uses: actions/checkout@v4 | |
with: | |
repository: "taosdata/TDengine" | |
path: "TDengine" | |
ref: ${{ inputs.tdengine_branch }} | |
- name: Get commit ID | |
id: get_commit_id | |
run: | | |
date | |
cd TDengine | |
echo "commit_id=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
- name: Cache server by push | |
if: github.event_name == 'push' | |
id: cache-server-push | |
uses: actions/cache@v4 | |
with: | |
path: server.tar.gz | |
key: ${{ runner.os }}-build-main-${{ steps.get_commit_id.outputs.commit_id }} | |
- name: Cache server manually | |
if: github.event_name == 'workflow_dispatch' | |
id: cache-server-manually | |
uses: actions/cache@v4 | |
with: | |
path: server.tar.gz | |
key: ${{ runner.os }}-build-${{ inputs.tdengine_branch }}-${{ steps.get_commit_id.outputs.commit_id }} | |
- name: Prepare install | |
if: > | |
(github.event_name == 'workflow_dispatch' && steps.cache-server-manually.outputs.cache-hit != 'true') || | |
(github.event_name == 'push' && steps.cache-server-push.outputs.cache-hit != 'true') | |
run: sudo apt install -y libgeos-dev | |
- name: Install TDengine | |
if: > | |
(github.event_name == 'workflow_dispatch' && steps.cache-server-manually.outputs.cache-hit != 'true') || | |
(github.event_name == 'push' && steps.cache-server-push.outputs.cache-hit != 'true') | |
run: | | |
cd TDengine | |
mkdir debug | |
cd debug | |
cmake .. -DBUILD_TEST=off -DBUILD_HTTP=false -DVERNUMBER=3.9.9.9 -DBUILD_DEPENDENCY_TESTS=false | |
make -j 8 | |
- name: Package | |
if: > | |
(github.event_name == 'workflow_dispatch' && steps.cache-server-manually.outputs.cache-hit != 'true') || | |
(github.event_name == 'push' && steps.cache-server-push.outputs.cache-hit != 'true') | |
run: | | |
mkdir -p ./release | |
cp ./TDengine/debug/build/bin/taos ./release/ | |
cp ./TDengine/debug/build/bin/taosd ./release/ | |
cp ./TDengine/debug/build/bin/taosadapter ./release/ | |
cp ./TDengine/debug/build/lib/libtaos.so.3.9.9.9 ./release/ | |
cp ./TDengine/debug/build/lib/librocksdb.so.8.1.1 ./release/ ||: | |
cp ./TDengine/include/client/taos.h ./release/ | |
cat >./release/install.sh<<EOF | |
chmod +x ./taos | |
chmod +x ./taosd | |
chmod +x ./taosadapter | |
cp ./taos /bin/ | |
cp ./taosd /bin/ | |
cp ./taosadapter /bin/ | |
cp ./libtaos.so.3.9.9.9 /usr/lib | |
cp ./librocksdb.so.8.1.1 /usr/lib | |
ln -sf /usr/lib/libtaos.so.3.9.9.9 /usr/lib/libtaos.so.1 | |
ln -sf /usr/lib/libtaos.so.1 /usr/lib/libtaos.so | |
ln -sf /usr/lib/librocksdb.so.8.1.1 /usr/lib/librocksdb.so.8 ||: | |
ln -sf /usr/lib/librocksdb.so.8 /usr/lib/librocksdb.so ||: | |
cp ./taos.h /usr/include | |
EOF | |
tar -zcvf server.tar.gz ./release | |
coverage: | |
runs-on: ubuntu-latest | |
needs: build-tdengine | |
steps: | |
- name: Get cache server by push | |
if: github.event_name == 'push' | |
id: get-cache-server-push | |
uses: actions/cache@v4 | |
with: | |
path: server.tar.gz | |
key: ${{ runner.os }}-build-main-${{ needs.build-tdengine.outputs.commit_id }} | |
restore-keys: ${{ runner.os }}-build-main- | |
- name: Get cache server manually | |
if: github.event_name == 'workflow_dispatch' | |
id: get-cache-server-manually | |
uses: actions/cache@v4 | |
with: | |
path: server.tar.gz | |
key: ${{ runner.os }}-build-${{ inputs.tdengine_branch }}-${{ needs.build-tdengine.outputs.commit_id }} | |
restore-keys: ${{ runner.os }}-build-${{ inputs.tdengine_branch }}- | |
- name: Install TDengine | |
run: | | |
tar -zxvf server.tar.gz | |
cd release && sudo sh install.sh | |
- uses: actions/checkout@v4 | |
- name: Set up Rust | |
id: setup-rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- uses: actions/cache@v4 | |
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@v4 | |
with: | |
path: target | |
key: ${{ runner.os }}-taos-target-${{ steps.setup-rust.outputs.rustc_hash }} | |
- name: Prepare development tools | |
run: | | |
sudo apt install libjansson-dev libsnappy-dev liblzma-dev libz-dev pkg-config libgflags2.2 libgflags-dev libgeos-dev -y | |
sudo timedatectl set-timezone Asia/Shanghai | |
sudo date | |
- name: Copy taos.cfg | |
run: | | |
sudo mkdir -p /etc/taos | |
sudo cp ./.github/workflows/taos.cfg /etc/taos/taos.cfg | |
- name: Start TDengine | |
run: | | |
mkdir -p /tmp/taos/v3/log /tmp/taos/v3/data | |
taosd & | |
TAOS_ADAPTER_LOG_PATH=/tmp/taos/v3/log taosadapter & | |
sleep 1 | |
- name: Generate code coverage | |
run: RUST_BACKTRACE=1 cargo llvm-cov -j 2 --workspace --lcov --output-path lcov.info | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: lcov.info | |
fail_ci_if_error: true | |
verbose: true | |
# env: | |
# CODECOV_EXPIRED_DISABLED: true |