Skip to content

Commit

Permalink
*: refine github actions and makefile (#37235)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhebox authored Sep 7, 2022
1 parent 8670731 commit 5f0c580
Show file tree
Hide file tree
Showing 13 changed files with 189 additions and 284 deletions.
42 changes: 0 additions & 42 deletions .github/labeler.yml

This file was deleted.

70 changes: 35 additions & 35 deletions .github/licenserc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,39 @@ header:
spdx-id: Apache-2.0
copyright-owner: PingCAP, Inc.
paths-ignore:
- 'docs/'
- 'br/'
- '.gitignore'
- '.gitattributes'
- '.cilinter.yaml'
- '.golangci.yml'
- '.golangci_br.yml'
- 'LICENSES/'
- '**/BUILD.bazel'
- 'WORKSPACE'
- '.bazelrc'
- '**/*.key'
- '**/*.md'
- '**/*.json'
- '**/*.toml'
- '**/*.pem'
- '**/*.crt'
- '**/*.test'
- '**/*.result'
- '**/*.example'
- '**/*.patch'
- '**/*.bzl'
- '.codecov.yml'
- 'Jenkinsfile'
- '.editorconfig'
- 'hooks/pre-commit'
- '**/go.mod'
- '**/go.sum'
- 'LICENSE'
- '.github/'
- 'parser/'
- 'dumpling/'
- 'tidb-binlog/driver/example'
- 'tidb-binlog/proto/go-binlog/secondary_binlog.pb.go'
- '**/*.sql'
- "docs/"
- "br/"
- ".gitignore"
- ".gitattributes"
- ".cilinter.yaml"
- ".golangci.yml"
- ".golangci_br.yml"
- "LICENSES/"
- "**/BUILD.bazel"
- "WORKSPACE"
- ".bazelrc"
- "**/*.key"
- "**/*.md"
- "**/*.json"
- "**/*.toml"
- "**/*.pem"
- "**/*.crt"
- "**/*.test"
- "**/*.result"
- "**/*.example"
- "**/*.patch"
- "**/*.bzl"
- ".codecov.yml"
- "Jenkinsfile"
- ".editorconfig"
- "hooks/pre-commit"
- "**/go.mod"
- "**/go.sum"
- "LICENSE"
- ".github/"
- "parser/"
- "dumpling/"
- "tidb-binlog/driver/example"
- "tidb-binlog/proto/go-binlog/secondary_binlog.pb.go"
- "**/*.sql"
comment: on-failure
81 changes: 40 additions & 41 deletions .github/workflows/integration-test-br-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ name: BR / Compatibility Test

on:
push:
# merged git action
# merged git action
branches:
- master
- 'release-[0-9].[0-9]*'
- "release-[0-9].[0-9]*"
paths:
- 'br/**'
- '!**.html'
- '!**.md'
- '!CNAME'
- '!LICENSE'
- '!br/docs/**'
- '!br/tests/**'
- '!br/docker/**'
- "br/**"
- "!**.html"
- "!**.md"
- "!CNAME"
- "!LICENSE"
- "!br/docs/**"
- "!br/tests/**"
- "!br/docker/**"
# disable pull request only keep the merge action since it is very costly to run those tests
# pull_request:

Expand All @@ -27,34 +27,33 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:

- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18

- name: Generate compatibility test backup data
timeout-minutes: 15
run: sh br/compatibility/prepare_backup.sh

- name: Start server
run: |
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml rm -s -v
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml build
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml up --remove-orphans -d
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml exec -T control go mod tidy
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml exec -T control make build_br
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml exec -T control br/tests/run_compatible.sh run
- name: Collect component log
if: ${{ failure() }}
run: |
tar czvf ${{ github.workspace }}/logs.tar.gz /tmp/br/docker/backup_logs/*
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: logs
path: ${{ github.workspace }}/logs.tar.gz
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'

- name: Generate compatibility test backup data
timeout-minutes: 15
run: sh br/compatibility/prepare_backup.sh

- name: Start server
run: |
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml rm -s -v
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml build
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml up --remove-orphans -d
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml exec -T control go mod tidy
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml exec -T control make build_br
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml exec -T control br/tests/run_compatible.sh run
- name: Collect component log
if: ${{ failure() }}
run: |
tar czvf ${{ github.workspace }}/logs.tar.gz /tmp/br/docker/backup_logs/*
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: logs
path: ${{ github.workspace }}/logs.tar.gz
48 changes: 24 additions & 24 deletions .github/workflows/integration-test-compile-br.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: BR & Lightning
name: BR & Lightning
on:
push:
branches:
- master
- 'release-[0-9].[0-9]*'
- "release-[0-9].[0-9]*"
paths:
- 'br/**'
- '!**.html'
- '!**.md'
- '!CNAME'
- '!LICENSE'
- '!br/docs/**'
- '!br/tests/**'
- '!br/docker/**'
#change trigger policy
- "br/**"
- "!**.html"
- "!**.md"
- "!CNAME"
- "!LICENSE"
- "!br/docs/**"
- "!br/tests/**"
- "!br/docker/**"
#change trigger policy
pull_request:
types:
- labeled # <--
- labeled # <--
branches:
- master
- 'release-[0-9].[0-9]*'
- "release-[0-9].[0-9]*"
paths:
- 'br/**'
- '!**.html'
- '!**.md'
- '!CNAME'
- '!LICENSE'
- '!br/docs/**'
- '!br/tests/**'
- '!br/docker/**'
- "br/**"
- "!**.html"
- "!**.md"
- "!CNAME"
- "!LICENSE"
- "!br/docs/**"
- "!br/tests/**"
- "!br/docker/**"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -45,13 +45,13 @@ jobs:
- uses: actions/checkout@v2.1.0

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version-file: 'go.mod'

- name: Run build
run: make build_tools

compile:
if: github.event_name == 'pull_request' && github.event.label.name == 'action/run-br-cross-platform-build'
name: Compile for ${{ matrix.os }} / ${{ matrix.target}}
Expand Down
63 changes: 0 additions & 63 deletions .github/workflows/integration-test-dumpling-common.yml

This file was deleted.

Loading

0 comments on commit 5f0c580

Please sign in to comment.