Skip to content

Commit

Permalink
test: fix workflow taos-tools build (#378)
Browse files Browse the repository at this point in the history
* test: refine tests for taosdump

* test: rm tests/CMakeLists.txt

* test: change workflow accordingly

* fix: taosdump ws float null

* test: coveralls.yml includes websocket test

* fix: disable taosdump/ws dep

* fix: wrong filename in cmake file

* test: add more test cases

* test: add expect test taosdump password

* fix: ci-taosdump-release-ws.yml wrong branch

* test: cherry pick from other branch

* test: add tools path finding for 3.0

* test: remove days/blocks for 3.0

* fix: .github/workflows/non-x64.yml

* test: add vnodes=256 env variable for 3.0

* test: fix windows-build-for3.0.yml

* test: disable ws for tdengine 2.0

* test: disable ws for tdengine 2.0 on centos

* fix: windows compile

* fix: check windows macro

* test: use test/sangshuduo/TD-17080-taosdump-functest on windows build

* fix: pip3 install taospy on centos

* test: add 3.0-coveralls.yml

* fix: replace test branch with 3.0

* fix: add expect install

* fix: stb pointer is null on tdengine 3.0

* test: add basic test cases

* fix: use ins_ instead of user_

* fix: select tbname,stbname from schema

* test: remove taosdump3.py

* test: add ws3 test

* test: remove nested query case

* test: remove taosdemo old test case

* fix: refine coverage test

* test: use test/sangshuduo/TD-17080-taosdump-functest

* test: disable taosdump test col tag case

* fix: change actions to 3.0 branch

* fix: run actions on push too

* fix: make 3.0-coveralls.yml run on push

* fix: remove unused debug info

* test: use jom for windows compile

* test: allow to test system program

* test: move coverage to topdir

* test: revise .github/workflows/3.0-coveralls.yml

* test: check changed file in ../.github/workflows/centos-release.yml

* test: add tests/taosdump/old cases

* fix: make info print to stdout

* test: change test case to take system program at last

* test: remove stderr redirect in ../../.github/workflows/3.0-coveralls.yml

* test: change 3.0-taosdump-release.yml to test stand aline taos-tools

* test: add 3.0 taosbenchmark release workflow

* test: exclude sml_, telnet_tcp and websocket test

* test: fix centos release

* test: fix build taos-tools in  ../.github/workflows/3.0-coveralls.yml

Co-authored-by: Yang Zhao <yzhao@taosdata.com>
  • Loading branch information
sangshuduo and Yang Zhao authored Sep 19, 2022
1 parent 318246c commit 509ec72
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 34 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/3.0-coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,16 @@ jobs:
if: |
(steps.changed-files-specific.outputs.any_changed == 'true'
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
run: |
git fetch origin +refs/pull/${{env.PR_NUMBER}}/merge
git checkout -qf FETCH_HEAD
- name: build taos-tools
if: |
(steps.changed-files-specific.outputs.any_changed == 'true'
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
run: |
mkdir debug ||:
cd debug
cmake .. -DTOOLS_BUILD_TYPE=Debug -DWEBSOCKET=true -DTOOLS_COVER=true > /dev/null
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/3.0-taosBenchmark-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,6 @@ jobs:
sudo timedatectl set-timezone Asia/Shanghai
sudo date
- name: Checkout taos-tools to PR number
if: |
(steps.changed-files-specific.outputs.any_changed == 'true'
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
run: |
git fetch origin +refs/pull/${{env.PR_NUMBER}}/merge
git checkout -qf FETCH_HEAD
- name: Set up Go
if: |
(steps.changed-files-specific.outputs.any_changed == 'true'
Expand Down Expand Up @@ -129,11 +120,16 @@ jobs:
if:
(steps.changed-files-specific.outputs.any_changed == 'true'
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
run: |
git fetch origin +refs/pull/${{env.PR_NUMBER}}/merge
git checkout -qf FETCH_HEAD
- name: Build taos-tools
if: |
(steps.changed-files-specific.outputs.any_changed == 'true'
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
run: |
mkdir debug ||:
cd debug
cmake .. -DTOOLS_BUILD_TYPE=Release -DWEBSOCKET=true > /dev/null && make -j8 > /dev/null && sudo make install > /dev/null
Expand All @@ -143,6 +139,12 @@ jobs:
exit 1
fi
- name: Install python packages
if: |
(steps.changed-files-specific.outputs.any_changed == 'true'
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
run: |
pip3 install numpy fabric2 psutil pandas faker toml > /dev/null 2>&1
pip3 install git+https://github.com/taosdata/taos-connector-python > /dev/null
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/3.0-taosdump-release-ws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,16 @@ jobs:
if: |
(steps.changed-files-specific.outputs.any_changed == 'true'
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
run: |
git fetch origin +refs/pull/${{env.PR_NUMBER}}/merge
git checkout -qf FETCH_HEAD
- name: Build taos-tools
if: |
(steps.changed-files-specific.outputs.any_changed == 'true'
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
run: |
mkdir debug ||:
cd debug
cmake .. -DTOOLS_BUILD_TYPE=Release -DWEBSOCKET=true > /dev/null
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/3.0-taosdump-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,16 @@ jobs:
if: |
(steps.changed-files-specific.outputs.any_changed == 'true'
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
run: |
git fetch origin +refs/pull/${{env.PR_NUMBER}}/merge
git checkout -qf FETCH_HEAD
- name: Build taos-tools
if: |
(steps.changed-files-specific.outputs.any_changed == 'true'
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
run: |
mkdir debug ||:
cd debug
cmake .. -DTOOLS_BUILD_TYPE=Release > /dev/null
Expand Down
39 changes: 18 additions & 21 deletions .github/workflows/centos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ env:
PR_NUMBER: ${{ github.event.number }}

jobs:
changed:
check-changed:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.changed-files-specific.outputs.changed }}

output1: ${{ steps.step1.outputs.test }}
output2: ${{ steps.step2.outputs.test }}
changedflag: ${{ steps.changedflag.outputs.changedflag }}
steps:
- name: Step that prints name of pull request's base branch
run: |
Expand Down Expand Up @@ -51,25 +52,21 @@ jobs:
.github/workflows/centos-release.yml
- name: Run step if any of the listed files above change
if: steps.changed-files-specific.outputs.any_changed == 'false'
run: |
echo "No files listed above changed."
exit 1
- name: Run step if any of the listed files above change
id: changedflag
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
echo "One or more files listed above has changed."
echo "One or more files listed above has changed." > ~/changed.log
echo "::set-output name=changedflag::true"
build:
runs-on: ubuntu-latest
needs: changed
needs: check-changed
container: docker.io/centos:7

steps:
- name: Step that prints name of pull request's base branch
run: |
echo ${{needs.changed.result}}
echo ${{needs.check-changed.outputs.changedflag}}
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}"
Expand All @@ -79,7 +76,7 @@ jobs:

- name: intall packages for build
if: |
(needs.changed.result == 'success'
(needs.check-changed.outputs.changedflag == 'true'
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
run: |
Expand Down Expand Up @@ -109,16 +106,16 @@ jobs:
- name: Checkout TDengine's taos-tools to PR number
if: |
steps.changed-files-specific.outputs.any_changed == 'true' &&
github.event_name == 'pull_request'
(needs.check-changed.outputs.changedflag == 'true'
&& github.event_name == 'pull_request')
run: |
cd TDengine/src/kit/taos-tools
git fetch origin +refs/pull/${{env.PR_NUMBER}}/merge
git checkout -qf FETCH_HEAD
- name: Set up Go
if: |
(needs.changed.result == 'success'
(needs.check-changed.outputs.changedflag == 'true'
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
uses: actions/setup-go@v3
Expand All @@ -127,7 +124,7 @@ jobs:

- name: Set up Rust
if: |
(needs.changed.result == 'success'
(needs.check-changed.outputs.changedflag == 'true'
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
uses: actions-rs/toolchain@v1
Expand All @@ -136,7 +133,7 @@ jobs:

- uses: actions/cache@v3
if: |
(needs.changed.result == 'success'
(needs.check-changed.outputs.changedflag == 'true'
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
id: cache-rust
Expand All @@ -150,7 +147,7 @@ jobs:

- name: Build & Install TDengine
if: |
(needs.changed.result == 'success'
(needs.check-changed.outputs.changedflag == 'true'
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
run: |
Expand All @@ -167,7 +164,7 @@ jobs:
- name: taosdump Old Test cases
if: |
(needs.changed.result == 'success'
(needs.check-changed.outputs.changedflag == 'true'
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
run: |
Expand All @@ -180,7 +177,7 @@ jobs:
- name: Check Test Result
if: |
(needs.changed.result == 'success'
(needs.check-changed.outputs.changedflag == 'true'
&& github.event_name == 'pull_request')
|| github.event_name == 'push'
run: |
Expand Down

0 comments on commit 509ec72

Please sign in to comment.