Skip to content

Commit f811917

Browse files
author
Terry Cojean
authored
Merge release 1.4.0 to master
Release 1.4.0 to master The Ginkgo team is proud to announce the new Ginkgo minor release 1.4.0. This release brings most of the Ginkgo functionality to the Intel DPC++ ecosystem which enables Intel-GPU and CPU execution. The only Ginkgo features which have not been ported yet are some preconditioners. Ginkgo's mixed-precision support is greatly enhanced thanks to: 1. The new Accessor concept, which allows writing kernels featuring on-the-fly memory compression, among other features. The accessor can be used as header-only, see the [accessor BLAS benchmarks repository](https://github.com/ginkgo-project/accessor-BLAS/tree/develop) as a usage example. 2. All LinOps now transparently support mixed-precision execution. By default, this is done through a temporary copy which may have a performance impact but already allows mixed-precision research. Native mixed-precision ELL kernels are implemented which do not see this cost. The accessor is also leveraged in a new CB-GMRES solver which allows for performance improvements by compressing the Krylov basis vectors. Many other features have been added to Ginkgo, such as reordering support, a new IDR solver, Incomplete Cholesky preconditioner, matrix assembly support (only CPU for now), machine topology information, and more! Supported systems and requirements: + For all platforms, cmake 3.13+ + C++14 compliant compiler + Linux and MacOS + gcc: 5.3+, 6.3+, 7.3+, all versions after 8.1+ + clang: 3.9+ + Intel compiler: 2018+ + Apple LLVM: 8.0+ + CUDA module: CUDA 9.0+ + HIP module: ROCm 3.5+ + DPC++ module: Intel OneAPI 2021.3. Set the CXX compiler to `dpcpp`. + Windows + MinGW and Cygwin: gcc 5.3+, 6.3+, 7.3+, all versions after 8.1+ + Microsoft Visual Studio: VS 2019 + CUDA module: CUDA 9.0+, Microsoft Visual Studio + OpenMP module: MinGW or Cygwin. Algorithm and important feature additions: + Add a new DPC++ Executor for SYCL execution and other base utilities [#648](#648), [#661](#661), [#757](#757), [#832](#832) + Port matrix formats, solvers and related kernels to DPC++. For some kernels, also make use of a shared kernel implementation for all executors (except Reference). [#710](#710), [#799](#799), [#779](#779), [#733](#733), [#844](#844), [#843](#843), [#789](#789), [#845](#845), [#849](#849), [#855](#855), [#856](#856) + Add accessors which allow multi-precision kernels, among other things. [#643](#643), [#708](#708) + Add support for mixed precision operations through apply in all LinOps. [#677](#677) + Add incomplete Cholesky factorizations and preconditioners as well as some improvements to ILU. [#672](#672), [#837](#837), [#846](#846) + Add an AMGX implementation and kernels on all devices but DPC++. [#528](#528), [#695](#695), [#860](#860) + Add a new mixed-precision capability solver, Compressed Basis GMRES (CB-GMRES). [#693](#693), [#763](#763) + Add the IDR(s) solver. [#620](#620) + Add a new fixed-size block CSR matrix format (for the Reference executor). [#671](#671), [#730](#730) + Add native mixed-precision support to the ELL format. [#717](#717), [#780](#780) + Add Reverse Cuthill-McKee reordering [#500](#500), [#649](#649) + Add matrix assembly support on CPUs. [#644](#644) + Extends ISAI from triangular to general and spd matrices. [#690](#690) Other additions: + Add the possibility to apply real matrices to complex vectors. [#655](#655), [#658](#658) + Add functions to compute the absolute of a matrix format. [#636](#636) + Add symmetric permutation and improve existing permutations. [#684](#684), [#657](#657), [#663](#663) + Add a MachineTopology class with HWLOC support [#554](#554), [#697](#697) + Add an implicit residual norm criterion. [#702](#702), [#818](#818), [#850](#850) + Row-major accessor is generalized to more than 2 dimensions and a new "block column-major" accessor has been added. [#707](#707) + Add an heat equation example. [#698](#698), [#706](#706) + Add ccache support in CMake and CI. [#725](#725), [#739](#739) + Allow tuning and benchmarking variables non intrusively. [#692](#692) + Add triangular solver benchmark [#664](#664) + Add benchmarks for BLAS operations [#772](#772), [#829](#829) + Add support for different precisions and consistent index types in benchmarks. [#675](#675), [#828](#828) + Add a Github bot system to facilitate development and PR management. [#667](#667), [#674](#674), [#689](#689), [#853](#853) + Add Intel (DPC++) CI support and enable CI on HPC systems. [#736](#736), [#751](#751), [#781](#781) + Add ssh debugging for Github Actions CI. [#749](#749) + Add pipeline segmentation for better CI speed. [#737](#737) Changes: + Add a Scalar Jacobi specialization and kernels. [#808](#808), [#834](#834), [#854](#854) + Add implicit residual log for solvers and benchmarks. [#714](#714) + Change handling of the conjugate in the dense dot product. [#755](#755) + Improved Dense stride handling. [#774](#774) + Multiple improvements to the OpenMP kernels performance, including COO, an exclusive prefix sum, and more. [#703](#703), [#765](#765), [#740](#740) + Allow specialization of submatrix and other dense creation functions in solvers. [#718](#718) + Improved Identity constructor and treatment of rectangular matrices. [#646](#646) + Allow CUDA/HIP executors to select allocation mode. [#758](#758) + Check if executors share the same memory. [#670](#670) + Improve test install and smoke testing support. [#721](#721) + Update the JOSS paper citation and add publications in the documentation. [#629](#629), [#724](#724) + Improve the version output. [#806](#806) + Add some utilities for dim and span. [#821](#821) + Improved solver and preconditioner benchmarks. [#660](#660) + Improve benchmark timing and output. [#669](#669), [#791](#791), [#801](#801), [#812](#812) Fixes: + Sorting fix for the Jacobi preconditioner. [#659](#659) + Also log the first residual norm in CGS [#735](#735) + Fix BiCG and HIP CSR to work with complex matrices. [#651](#651) + Fix Coo SpMV on strided vectors. [#807](#807) + Fix segfault of extract_diagonal, add short-and-fat test. [#769](#769) + Fix device_reset issue by moving counter/mutex to device. [#810](#810) + Fix `EnableLogging` superclass. [#841](#841) + Support ROCm 4.1.x and breaking HIP_PLATFORM changes. [#726](#726) + Decreased test size for a few device tests. [#742](#742) + Fix multiple issues with our CMake HIP and RPATH setup. [#712](#712), [#745](#745), [#709](#709) + Cleanup our CMake installation step. [#713](#713) + Various simplification and fixes to the Windows CMake setup. [#720](#720), [#785](#785) + Simplify third-party integration. [#786](#786) + Improve Ginkgo device arch flags management. [#696](#696) + Other fixes and improvements to the CMake setup. [#685](#685), [#792](#792), [#705](#705), [#836](#836) + Clarification of dense norm documentation [#784](#784) + Various development tools fixes and improvements [#738](#738), [#830](#830), [#840](#840) + Make multiple operators/constructors explicit. [#650](#650), [#761](#761) + Fix some issues, memory leaks and warnings found by MSVC. [#666](#666), [#731](#731) + Improved solver memory estimates and consistent iteration counts [#691](#691) + Various logger improvements and fixes [#728](#728), [#743](#743), [#754](#754) + Fix for ForwardIterator requirements in iterator_factory. [#665](#665) + Various benchmark fixes. [#647](#647), [#673](#673), [#722](#722) + Various CI fixes and improvements. [#642](#642), [#641](#641), [#795](#795), [#783](#783), [#793](#793), [#852](#852) Related PR: #866
2 parents 4678668 + 555f65e commit f811917

1,163 files changed

Lines changed: 256370 additions & 17426 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/bot-base.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
API_HEADER="Accept: application/vnd.github.v3+json"
6+
AUTH_HEADER="Authorization: token $GITHUB_TOKEN"
7+
8+
api_get() {
9+
curl -X GET -s -H "${AUTH_HEADER}" -H "${API_HEADER}" "$1"
10+
}
11+
12+
api_post() {
13+
curl -X POST -s -H "${AUTH_HEADER}" -H "${API_HEADER}" "$1" -d "$2"
14+
}
15+
16+
api_patch() {
17+
curl -X PATCH -s -H "${AUTH_HEADER}" -H "${API_HEADER}" "$1" -d "$2"
18+
}
19+
20+
api_delete() {
21+
curl -X DELETE -s -H "${AUTH_HEADER}" -H "${API_HEADER}" "$1"
22+
}

.github/bot-pr-base.sh

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
#!/bin/bash
2+
3+
source .github/bot-base.sh
4+
5+
echo -n "Collecting information on triggering PR"
6+
PR_URL=$(jq -r .pull_request.url "$GITHUB_EVENT_PATH")
7+
if [[ "$PR_URL" == "null" ]]; then
8+
# if this was triggered by an issue comment: get PR and commenter
9+
echo -n .............
10+
PR_URL=$(jq -er .issue.pull_request.url "$GITHUB_EVENT_PATH")
11+
echo -n .
12+
USER_LOGIN=$(jq -er ".comment.user.login" "$GITHUB_EVENT_PATH")
13+
echo -n .
14+
USER_URL=$(jq -er ".comment.user.url" "$GITHUB_EVENT_PATH")
15+
echo -n .
16+
else
17+
# else it was triggered by a PR sync: get PR creator
18+
USER_LOGIN=$(jq -er ".pull_request.user.login" "$GITHUB_EVENT_PATH")
19+
echo -n .
20+
USER_URL=$(jq -er ".pull_request.user.url" "$GITHUB_EVENT_PATH")
21+
echo -n .
22+
fi
23+
echo -n .
24+
PR_JSON=$(api_get $PR_URL)
25+
echo -n .
26+
PR_MERGED=$(echo "$PR_JSON" | jq -r .merged)
27+
echo -n .
28+
ISSUE_URL=$(echo "$PR_JSON" | jq -er ".issue_url")
29+
echo -n .
30+
BASE_REPO=$(echo "$PR_JSON" | jq -er .base.repo.full_name)
31+
echo -n .
32+
BASE_BRANCH=$(echo "$PR_JSON" | jq -er .base.ref)
33+
echo -n .
34+
HEAD_REPO=$(echo "$PR_JSON" | jq -er .head.repo.full_name)
35+
echo -n .
36+
HEAD_BRANCH=$(echo "$PR_JSON" | jq -er .head.ref)
37+
echo .
38+
39+
BASE_URL="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/$BASE_REPO"
40+
HEAD_URL="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/$HEAD_REPO"
41+
42+
JOB_URL="https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
43+
44+
bot_delete_comments_matching() {
45+
local search_matching="$1"
46+
COMMENTS=$(api_get "$ISSUE_URL/comments" | jq -r '.[] | select((.user.login == "ginkgo-bot") and (.body | startswith('"\"$search_matching\""'))) | .url')
47+
for URL in $COMMENTS; do
48+
api_delete "$URL" > /dev/null
49+
done
50+
}
51+
52+
bot_comment() {
53+
api_post "$ISSUE_URL/comments" "{\"body\":\"$1\"}" > /dev/null
54+
}
55+
56+
bot_error() {
57+
echo "$1"
58+
bot_comment "Error: $1"
59+
exit 1
60+
}
61+
62+
bot_get_all_changed_files() {
63+
local pr_url="$1"
64+
local pr_files=""
65+
local page="1"
66+
while true; do
67+
# this api allows 100 items per page
68+
# github action uses `bash -e`. The last empty page will leads jq error, use `|| :` to ignore the error.
69+
local pr_page_files=$(api_get "$pr_url/files?&per_page=100&page=${page}" | jq -er '.[] | select(.status != "removed") | .filename' || :)
70+
if [ "${pr_page_files}" = "" ]; then
71+
break
72+
fi
73+
if [ ! "${pr_files}" = "" ]; then
74+
# add the same new line format as jq output
75+
pr_files="${pr_files}"$'\n'
76+
fi
77+
pr_files="${pr_files}${pr_page_files}"
78+
page=$(( page + 1 ))
79+
done
80+
echo "${pr_files}"
81+
}
82+
83+
# collect info on the user that invoked the bot
84+
echo -n "Collecting information on triggering user"
85+
USER_JSON=$(api_get $USER_URL)
86+
echo .
87+
88+
USER_NAME=$(echo "$USER_JSON" | jq -r ".name")
89+
if [[ "$USER_NAME" == "null" ]]; then
90+
USER_NAME=$USER_LOGIN
91+
fi
92+
USER_EMAIL=$(echo "$USER_JSON" | jq -r ".email")
93+
if [[ "$USER_EMAIL" == "null" ]]; then
94+
USER_EMAIL="$USER_LOGIN@users.noreply.github.com"
95+
fi
96+
USER_COMBINED="$USER_NAME <$USER_EMAIL>"
97+
98+
if [[ "$PR_MERGED" == "true" ]]; then
99+
bot_error "PR already merged!"
100+
fi

.github/bot-pr-format-base.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
source .github/bot-pr-base.sh
4+
5+
EXTENSION_REGEX='\.(cuh?|hpp|hpp\.inc?|cpp)$'
6+
FORMAT_HEADER_REGEX='^(benchmark|core|cuda|hip|include/ginkgo/core|omp|reference|dpcpp)/'
7+
FORMAT_REGEX='^(common|examples|test)/'
8+
9+
echo "Retrieving PR file list"
10+
PR_FILES=$(bot_get_all_changed_files ${PR_URL})
11+
NUM=$(echo "${PR_FILES}" | wc -l)
12+
echo "PR has ${NUM} changed files"
13+
14+
TO_FORMAT="$(echo "$PR_FILES" | grep -E $EXTENSION_REGEX || true)"
15+
16+
git remote add fork "$HEAD_URL"
17+
git fetch fork "$HEAD_BRANCH"
18+
19+
git config user.email "ginkgo.library@gmail.com"
20+
git config user.name "ginkgo-bot"
21+
22+
# save scripts from develop
23+
pushd dev_tools/scripts
24+
cp add_license.sh format_header.sh update_ginkgo_header.sh /tmp
25+
popd
26+
27+
# checkout current PR head
28+
LOCAL_BRANCH=format-tmp-$HEAD_BRANCH
29+
git checkout -b $LOCAL_BRANCH fork/$HEAD_BRANCH
30+
31+
# restore files from develop
32+
cp /tmp/add_license.sh dev_tools/scripts/
33+
cp /tmp/format_header.sh dev_tools/scripts/
34+
cp /tmp/update_ginkgo_header.sh dev_tools/scripts/
35+
36+
# format files
37+
CLANG_FORMAT=clang-format-9
38+
dev_tools/scripts/add_license.sh
39+
dev_tools/scripts/update_ginkgo_header.sh
40+
for f in $(echo "$TO_FORMAT" | grep -E $FORMAT_HEADER_REGEX); do dev_tools/scripts/format_header.sh "$f"; done
41+
for f in $(echo "$TO_FORMAT" | grep -E $FORMAT_REGEX); do "$CLANG_FORMAT" -i -style=file "$f"; done
42+
43+
# restore formatting scripts so they don't appear in the diff
44+
git checkout -- dev_tools/scripts/*.sh

.github/check-format.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
cp .github/bot-pr-format-base.sh /tmp
4+
source /tmp/bot-pr-format-base.sh
5+
6+
# check for changed files, replace newlines by \n
7+
LIST_FILES=$(git diff --name-only | sed '$!s/$/\\n/' | tr -d '\n')
8+
9+
git diff > /tmp/format.patch
10+
mv /tmp/format.patch .
11+
12+
bot_delete_comments_matching "Error: The following files need to be formatted"
13+
14+
if [[ "$LIST_FILES" != "" ]]; then
15+
MESSAGE="The following files need to be formatted:\n"'```'"\n$LIST_FILES\n"'```'
16+
MESSAGE="$MESSAGE\nYou can find a formatting patch under **Artifacts** [here]"
17+
MESSAGE="$MESSAGE($JOB_URL) or run "'`format!` if you have write access to Ginkgo'
18+
bot_error "$MESSAGE"
19+
fi

.github/format.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
cp .github/bot-pr-format-base.sh /tmp
4+
source /tmp/bot-pr-format-base.sh
5+
6+
# check for changed files, replace newlines by \n
7+
LIST_FILES=$(git diff --name-only | sed '$!s/$/\\n/' | tr -d '\n')
8+
9+
# commit changes if necessary
10+
if [[ "$LIST_FILES" != "" ]]; then
11+
git commit -a -m "Format files
12+
13+
Co-authored-by: $USER_COMBINED"
14+
git push fork $LOCAL_BRANCH:$HEAD_BRANCH 2>&1 || bot_error "Cannot push formatted branch, are edits for maintainers allowed?"
15+
fi

.github/label.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/bash
2+
3+
source .github/bot-pr-base.sh
4+
5+
echo "Retrieving PR file list"
6+
PR_FILES=$(bot_get_all_changed_files ${PR_URL})
7+
NUM=$(echo "${PR_FILES}" | wc -l)
8+
echo "PR has ${NUM} changed files"
9+
10+
echo "Retrieving PR label list"
11+
OLD_LABELS=$(api_get "$ISSUE_URL" | jq -er '[.labels | .[] | .name]')
12+
13+
14+
label_match() {
15+
if echo "$PR_FILES" | grep -qE "$2"; then
16+
echo "+[\"$1\"]"
17+
fi
18+
}
19+
20+
LABELS="[]"
21+
LABELS=$LABELS$(label_match mod:core '(^core/|^include/)')
22+
LABELS=$LABELS$(label_match mod:reference '^reference/')
23+
LABELS=$LABELS$(label_match mod:openmp '^omp/')
24+
LABELS=$LABELS$(label_match mod:cuda '(^cuda/|^common/)')
25+
LABELS=$LABELS$(label_match mod:hip '(^hip/|^common/)')
26+
LABELS=$LABELS$(label_match mod:dpcpp '^dpcpp/')
27+
LABELS=$LABELS$(label_match reg:benchmarking '^benchmark/')
28+
LABELS=$LABELS$(label_match reg:example '^examples/')
29+
LABELS=$LABELS$(label_match reg:build '(cm|CM)ake')
30+
LABELS=$LABELS$(label_match reg:ci-cd '(^\.github/|\.yml$)')
31+
LABELS=$LABELS$(label_match reg:documentation '^doc/|\.md$')
32+
LABELS=$LABELS$(label_match reg:testing /test/)
33+
LABELS=$LABELS$(label_match reg:helper-scripts '^dev_tools/')
34+
LABELS=$LABELS$(label_match type:factorization /factorization/)
35+
LABELS=$LABELS$(label_match type:matrix-format /matrix/)
36+
LABELS=$LABELS$(label_match type:multigrid /multigrid/)
37+
LABELS=$LABELS$(label_match type:preconditioner /preconditioner/)
38+
LABELS=$LABELS$(label_match type:reordering /reorder/)
39+
LABELS=$LABELS$(label_match type:solver /solver/)
40+
LABELS=$LABELS$(label_match type:stopping-criteria /stop/)
41+
42+
# if all mod: labels present: replace by mod:all
43+
LABELS=$(echo "$LABELS" | sed 's/.*mod:.*mod:.*mod:.*mod:.*mod:.*mod:[^"]*"\]/[]+["mod:all"]/')
44+
45+
PATCH_BODY=$(jq -rn "{labels:($OLD_LABELS + $LABELS | unique)}")
46+
api_patch "$ISSUE_URL" "$PATCH_BODY" > /dev/null

.github/rebase.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
source .github/bot-pr-base.sh
4+
5+
git remote add base "$BASE_URL"
6+
git remote add fork "$HEAD_URL"
7+
8+
git fetch base $BASE_BRANCH
9+
git fetch fork $HEAD_BRANCH
10+
11+
git config user.email "$USER_EMAIL"
12+
git config user.name "$USER_NAME"
13+
14+
LOCAL_BRANCH=rebase-tmp-$HEAD_BRANCH
15+
git checkout -b $LOCAL_BRANCH fork/$HEAD_BRANCH
16+
17+
bot_delete_comments_matching "Error: Rebase failed"
18+
19+
# do the rebase
20+
git rebase base/$BASE_BRANCH 2>&1 || bot_error "Rebase failed, see the related [Action]($JOB_URL) for details"
21+
22+
# push back
23+
git push --force-with-lease fork $LOCAL_BRANCH:$HEAD_BRANCH 2>&1 || bot_error "Cannot push rebased branch, are edits for maintainers allowed?"
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
on:
2+
issue_comment:
3+
types: [created]
4+
name: OnCommentPR
5+
jobs:
6+
label:
7+
runs-on: ubuntu-latest
8+
if: github.event.issue.pull_request != '' && github.event.comment.body == 'label!' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER')
9+
steps:
10+
- name: Checkout the latest code (shallow clone)
11+
uses: actions/checkout@v2
12+
with:
13+
ref: develop
14+
- name: Add appropriate labels
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
17+
run: cp .github/label.sh /tmp && /tmp/label.sh
18+
check_format:
19+
name: check-format
20+
runs-on: ubuntu-18.04
21+
if: github.event.issue.pull_request != '' && github.event.comment.body == 'check-format!' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER')
22+
steps:
23+
- name: Checkout the latest code (shallow clone)
24+
uses: actions/checkout@v2
25+
with:
26+
ref: develop
27+
- name: Check for formatting changes
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
30+
run: cp .github/check-format.sh /tmp && /tmp/check-format.sh
31+
- name: Upload code formatting patch
32+
if: failure()
33+
uses: actions/upload-artifact@v2
34+
with:
35+
name: patch
36+
path: format.patch
37+
format:
38+
name: format
39+
runs-on: ubuntu-18.04
40+
if: github.event.issue.pull_request != '' && github.event.comment.body == 'format!' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER')
41+
steps:
42+
- name: Checkout the latest code (shallow clone)
43+
uses: actions/checkout@v2
44+
with:
45+
ref: develop
46+
persist-credentials: false
47+
- name: Commit formatting changes
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
50+
run: cp .github/format.sh /tmp && /tmp/format.sh
51+
rebase:
52+
name: rebase
53+
if: github.event.issue.pull_request != '' && github.event.comment.body == 'rebase!' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER')
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: Checkout the latest code
57+
uses: actions/checkout@v2
58+
with:
59+
ref: develop
60+
fetch-depth: 0
61+
persist-credentials: false
62+
- name: Automatic Rebase
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
65+
run: cp .github/rebase.sh /tmp && /tmp/rebase.sh
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
on:
2+
pull_request_target:
3+
types: [opened]
4+
5+
name: OnNewPR
6+
jobs:
7+
label:
8+
runs-on: ubuntu-latest
9+
if: github.event.pull_request.author_association == 'COLLABORATOR' || github.event.pull_request.author_association == 'MEMBER' || github.event.pull_request.author_association == 'OWNER'
10+
steps:
11+
- name: Checkout the latest code (shallow clone)
12+
uses: actions/checkout@v2
13+
with:
14+
ref: develop
15+
- name: Add appropriate labels
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
18+
run: .github/label.sh
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
pull_request_target:
3+
types: [opened,synchronize]
4+
5+
name: OnSyncPR
6+
jobs:
7+
check-format:
8+
runs-on: ubuntu-18.04
9+
if: github.event.pull_request.author_association == 'COLLABORATOR' || github.event.pull_request.author_association == 'MEMBER' || github.event.pull_request.author_association == 'OWNER'
10+
steps:
11+
- name: Checkout the latest code (shallow clone)
12+
uses: actions/checkout@v2
13+
with:
14+
ref: develop
15+
- name: Check for formatting changes
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
18+
run: cp .github/check-format.sh /tmp && /tmp/check-format.sh
19+
- name: Upload code formatting patch
20+
if: failure()
21+
uses: actions/upload-artifact@v2
22+
with:
23+
name: patch
24+
path: format.patch

0 commit comments

Comments
 (0)