mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
move contributor check into Buildkite
This commit is contained in:
parent
89a9798b20
commit
f2db4f4996
3 changed files with 5 additions and 110 deletions
|
@ -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
|
|
@ -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
|
||||
|
|
107
.github/workflows/checks.yml
vendored
107
.github/workflows/checks.yml
vendored
|
@ -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
|
Loading…
Reference in a new issue