From f2db4f4996b9be6b021f750043aee56f0d32bf26 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 9 Dec 2020 21:01:11 +1000 Subject: [PATCH] move contributor check into Buildkite --- .../linux/check_contributors | 6 +- .buildkite/linux/entrypoint | 2 + .github/workflows/checks.yml | 107 ------------------ 3 files changed, 5 insertions(+), 110 deletions(-) rename .github/scripts/contrib.sh => .buildkite/linux/check_contributors (75%) delete mode 100644 .github/workflows/checks.yml diff --git a/.github/scripts/contrib.sh b/.buildkite/linux/check_contributors similarity index 75% rename from .github/scripts/contrib.sh rename to .buildkite/linux/check_contributors index 46da0954e..7604e3d51 100755 --- a/.github/scripts/contrib.sh +++ b/.buildkite/linux/check_contributors @@ -4,14 +4,14 @@ set -eu -o pipefail ${SHELLFLAGS} antispam=", at the domain " -echo "All contributors:" -git log --pretty=format:' - %ae' CONTRIBUTORS |sort |uniq |sort -f | sed "s/@/$antispam/" - headAuthor=$(git log -1 --pretty=format:'%ae') authorAt=$(echo "$headAuthor" | sed "s/@/$antispam/") if git log --pretty=format:'%ae' CONTRIBUTORS | grep -i "$headAuthor" > /dev/null; then echo "Author $authorAt found in CONTRIBUTORS" else + echo "All contributors:" + git log --pretty=format:' - %ae' CONTRIBUTORS |sort |uniq |sort -f | sed "s/@/$antispam/" + echo "Author $authorAt NOT found in list" exit 1 fi diff --git a/.buildkite/linux/entrypoint b/.buildkite/linux/entrypoint index ee605829c..63c4bec05 100755 --- a/.buildkite/linux/entrypoint +++ b/.buildkite/linux/entrypoint @@ -15,3 +15,5 @@ $BAZEL test $BUILDARGS ... # if tests succeed, back up node_modules folder mv ts/node_modules /state/ +# check author has added themselves to CONTRIBUTORS +.buildkite/linux/check_contributors diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml deleted file mode 100644 index aa94ed3e8..000000000 --- a/.github/workflows/checks.yml +++ /dev/null @@ -1,107 +0,0 @@ -name: GH - -on: [pull_request] - -jobs: - ################################ - # Contributor check - ################################ - - contrib: - name: Author in CONTRIBUTORS - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Check - run: | - set -x - .github/scripts/contrib.sh - - ################################ - # Tests - ################################ - - # tests: - # name: ${{ matrix.name }} ${{ matrix.python }} - # runs-on: ${{ matrix.os }} - # strategy: - # matrix: - # os: [macos-latest, ubuntu-20.04] - # python: [3.8] - # include: - # - os: macos-latest - # name: Mac - # SEP: / - # BAZEL_REPO: "~/.cache/bazelrepo" - # BAZEL_DISK: "~/.cache/bazeldisk" - # - os: ubuntu-20.04 - # name: Linux - # SEP: / - # BAZEL_REPO: "~/.cache/bazelrepo" - # BAZEL_DISK: "~/.cache/bazeldisk" - # fail-fast: false - - # steps: - # - uses: actions/checkout@v2 - - # - name: Set up python - # uses: actions/setup-python@v2 - # with: - # python-version: ${{ matrix.python }} - - # - name: Cache disk - # uses: actions/cache@v2 - # with: - # path: ${{ matrix.BAZEL_DISK }} - # key: ${{ runner.os }}-disk-2-${{ hashFiles('ts/yarn.lock') }}-${{ hashFiles('pip/requirements.txt') }}-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('**/BUILD.bazel') }}-${{ hashFiles('**/*.bzl') }} - - # - name: Cache repo - # uses: actions/cache@v2 - # with: - # path: ${{ matrix.BAZEL_REPO }} - # key: ${{ runner.os }}-repo-2-${{ hashFiles('ts/yarn.lock') }}-${{ hashFiles('pip/requirements.txt') }}-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('**/BUILD.bazel') }}-${{ hashFiles('**/*.bzl') }} - - # ################################ - # # Linux - # ################################ - - # - name: Linux - # if: matrix.os == 'ubuntu-20.04' - # run: | - # # disable command workflow processing - # echo "::stop-commands::`echo -n ${{ github.token }} | sha256sum | head -c 64`" - - # set -x - # sudo apt update - # sudo apt install portaudio19-dev - # curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.7.4/bazelisk-linux-amd64 -o ./bazel && \ - # chmod +x ./bazel - - # BAZEL="./bazel" - # ARGS="--show_timestamps --isatty=0 --color=yes --disk_cache=${{ matrix.BAZEL_DISK }} --repository_cache=${{ matrix.BAZEL_REPO }}" - # $BAZEL test ... $ARGS - # $BAZEL build qt:runanki $ARGS - # ANKI_IMPORT_ONLY=1 $BAZEL run qt:runanki - - # ################################ - # # Mac - # ################################ - - # - name: Mac - # if: matrix.os == 'macos-latest' - # run: | - # # disable command workflow processing - # echo "::stop-commands::`echo -n ${{ github.token }} | sha256sum | head -c 64`" - - # set -x - # brew install portaudio gnu-tar - # # gnu tar for cache issue - # echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH - - # BAZEL="bazel" - # ARGS="--show_timestamps --isatty=0 --color=yes --disk_cache=${{ matrix.BAZEL_DISK }} --repository_cache=${{ matrix.BAZEL_REPO }}" - # $BAZEL test ... $ARGS - # $BAZEL build qt:runanki $ARGS - # # the rsync workaround is not required in CI, as it's working - # # around a webengine issue - # ANKI_IMPORT_ONLY=1 $BAZEL run qt:runanki