From 9e7cd0644c3c8db18118ac1a0719cdbb72bfc532 Mon Sep 17 00:00:00 2001 From: Yee <2520865+yixinglu@users.noreply.github.com> Date: Thu, 31 Mar 2022 18:28:40 +0800 Subject: [PATCH] Trigger release workflow manually (#4105) * Cleanup nightly workflow * Fix pull request workflow * Fix tagname action * Fix gcc version * Semicolon * workflow dispatch * ignore secrets * Restore * format * Remove default value of version * Restore fastcov Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> --- .github/actions/tagname-action/action.yml | 14 +++++----- .github/workflows/nightly.yml | 33 +++++++++++------------ .github/workflows/pull_request.yml | 7 +++-- .github/workflows/rc.yml | 19 ++++++++----- .github/workflows/release.yml | 2 +- .gitignore | 1 + 6 files changed, 40 insertions(+), 36 deletions(-) diff --git a/.github/actions/tagname-action/action.yml b/.github/actions/tagname-action/action.yml index 27e74404236..4118adf3741 100644 --- a/.github/actions/tagname-action/action.yml +++ b/.github/actions/tagname-action/action.yml @@ -1,14 +1,14 @@ -name: 'Extract tag information' -description: 'Extract tag information' +name: "Extract tag information" +description: "Extract tag information" outputs: tag: - description: 'tag name' + description: "tag name" value: ${{ steps.tag.outputs.tag }} tagnum: - description: 'tag number' + description: "tag number" value: ${{ steps.tag.outputs.tagnum }} majorver: - description: 'major version' + description: "major version" value: ${{ steps.tag.outputs.majorver }} runs: using: "composite" @@ -16,8 +16,8 @@ runs: - id: tag run: | tag=$(echo ${{ github.ref }} | rev | cut -d/ -f1 | rev) - tagnum=$(echo $tag | sed 's/^v//') - majorver=$(echo $tag | cut -d '.' -f 1) + tagnum=$(echo $tag | sed "s/^v//") + majorver=$(echo $tag | cut -d "." -f 1) echo "::set-output name=tag::$tag" echo "::set-output name=tagnum::$tagnum" echo "::set-output name=majorver::$majorver" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 775b04c20a7..ab12140cb83 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -46,10 +46,10 @@ jobs: find pkg-build/cpack_output -type f \( -iname \*.deb -o -iname \*.rpm -o -iname \*.tar.gz \) -exec bash -c "sha256sum {} > {}.sha256sum.txt" \; subdir=$(date -u +%Y.%m.%d) echo "::set-output name=subdir::$subdir" - - uses: actions/upload-artifact@v1 - with: - name: ${{ matrix.os }}-nightly - path: pkg-build/cpack_output + # - uses: actions/upload-artifact@v1 + # with: + # name: ${{ matrix.os }}-nightly + # path: pkg-build/cpack_output - uses: ./.github/actions/upload-to-oss-action with: key-id: ${{ secrets.OSS_ID }} @@ -75,12 +75,12 @@ jobs: with: run: sh -c "find . -mindepth 1 -delete" - uses: actions/checkout@v2 - - uses: docker/setup-qemu-action@v1 - - uses: docker/setup-buildx-action@v1 - uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - uses: docker/setup-qemu-action@v1 + - uses: docker/setup-buildx-action@v1 - uses: docker/build-push-action@v2 with: context: . @@ -97,9 +97,9 @@ jobs: fail-fast: false matrix: os: - - ubuntu2004 + - centos7 compiler: - - gcc-9.2 + - gcc-9.3 container: image: vesoft/nebula-dev:${{ matrix.os }} env: @@ -114,26 +114,25 @@ jobs: run: sh -c "find . -mindepth 1 -delete" - uses: actions/checkout@v2 - name: Prepare environment - id: prepare run: | [ -d build/ ] && rm -rf build/* || mkdir -p build make init -C tests - name: CMake - id: cmake run: | cmake \ - -DCMAKE_CXX_COMPILER=$TOOLSET_CLANG_DIR/bin/g++ \ - -DCMAKE_C_COMPILER=$TOOLSET_CLANG_DIR/bin/gcc \ + -DCMAKE_CXX_COMPILER=$TOOLSET_GCC_DIR/bin/g++ \ + -DCMAKE_C_COMPILER=$TOOLSET_GCC_DIR/bin/gcc \ -DCMAKE_BUILD_TYPE=Debug \ -DENABLE_TESTING=on \ -DENABLE_COVERAGE=on \ + -GNinja -B build - echo "::set-output name=j::8" - name: Make run: | ccache -z - cmake --build build/ -j $(nproc) + ninja -j $(nproc) ccache -s + working-directory: build/ - name: CTest env: ASAN_OPTIONS: fast_unwind_on_malloc=1 @@ -147,12 +146,12 @@ jobs: timeout-minutes: 2 - name: Pytest run: | - make RM_DIR=false DEBUG=false J=${{ steps.cmake.outputs.j }} test + make RM_DIR=false DEBUG=false J=8 test working-directory: tests/ timeout-minutes: 15 - name: TCK run: | - make RM_DIR=false DEBUG=false J=${{ steps.cmake.outputs.j }} tck + make RM_DIR=false DEBUG=false J=8 tck working-directory: tests/ timeout-minutes: 60 - name: Down cluster @@ -162,7 +161,7 @@ jobs: timeout-minutes: 2 - name: coverage run: | - ~/.local/bin/fastcov -d build -l -o fastcov.info -p --exclude /usr/include --exclude=/opt/vesoft --exclude scanner.lex + ~/.local/bin/fastcov -d build -l -o fastcov.info -p --exclude /usr/include --exclude=/opt/vesoft --exclude scanner.lex - uses: codecov/codecov-action@v2 with: files: fastcov.info diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 16a41382348..448a46b5738 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -5,7 +5,7 @@ on: types: [synchronize, reopened, labeled] branches: - master - - 'v[0-9]+.*' + - 'release-**' concurrency: group: ${{ github.head_ref }} @@ -183,11 +183,11 @@ jobs: working-directory: tests/ timeout-minutes: 2 - name: coverage - if: ${{ matrix.compiler == 'gcc-9.2' && matrix.os == 'ubuntu2004' }} + if: ${{ matrix.compiler == 'gcc-9.3' && matrix.os == 'ubuntu2004' }} run: | ~/.local/bin/fastcov -d build -l -o fastcov.info -p --exclude /usr/include --exclude=/opt/vesoft --exclude scanner.lex - uses: codecov/codecov-action@v2 - if: ${{ matrix.compiler == 'gcc-9.2' && matrix.os == 'ubuntu2004' }} + if: ${{ matrix.compiler == 'gcc-9.3' && matrix.os == 'ubuntu2004' }} with: files: fastcov.info fail_ci_if_error: false @@ -227,7 +227,6 @@ jobs: run: sh -c "find . -mindepth 1 -delete" - uses: actions/checkout@v2 - name: Prepare environment - id: prepare run: | [ -d build/ ] && rm -rf build/* || mkdir -p build make init -C tests diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml index e15a2406e80..f79a7a48798 100644 --- a/.github/workflows/rc.yml +++ b/.github/workflows/rc.yml @@ -1,9 +1,11 @@ name: rc on: - push: - branches: - - 'v[0-9]+.*' + workflow_dispatch: + inputs: + version: + description: "version such as '3.1.0'" + required: true concurrency: group: rc @@ -40,8 +42,8 @@ jobs: - uses: actions/setup-go@v2 with: go-version: '^1.16.7' - - uses: ./.github/actions/tagname-action - id: tag + - id: tag + run: echo ::set-output name=tagnum::${{ github.event.inputs.version }} - name: package run: ./package/package.sh -v ${{ steps.tag.outputs.tagnum }} -t RelWithDebInfo -r OFF -p ON -s TRUE -k ON - name: output some vars @@ -81,8 +83,11 @@ jobs: with: run: sh -c "find . -mindepth 1 -delete" - uses: actions/checkout@v2 - - uses: ./.github/actions/tagname-action - id: tagname + - id: tagname + run: | + echo ::set-output name=tag::"v${{ github.event.inputs.version }}" + echo ::set-output name=tagnum::"${{ github.event.inputs.version }}" + echo ::set-output name=majorver::"v$(echo ${{ github.event.inputs.version }} | cut -f1 -d'.')" - id: docker run: | majorver=$(git tag -l --sort=v:refname | tail -n1 | cut -f1 -d".") diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ff1cc187ec1..7bd28c4857b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,7 +51,7 @@ jobs: id: tagname - id: docker run: | - majorver=$(git tag -l --sort=v:refname | tail -n1 | cut -f1 -d'.') + majorver=$(git tag -l --sort=v:refname | tail -n1 | cut -f1 -d".") tag="" if [[ $majorver == ${{ steps.tagname.outputs.majorver }} ]]; then tag="latest" diff --git a/.gitignore b/.gitignore index b13cd6c5215..8890b286dbc 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,7 @@ modules/ # tests !tests/Makefile +tests/secrets reformat-gherkin nebula-python