Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
773 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Benchmark | ||
on: | ||
push: | ||
schedule: | ||
- cron: '36 1 * * SUN' # M H d m w (Sundays at 01:36) | ||
jobs: | ||
asvfull: | ||
if: (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')) || github.event_name == 'schedule' | ||
name: Full | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install | ||
run: | | ||
pip install -U wheel | ||
pip install -U virtualenv asv | ||
asv machine --machine github-actions --yes | ||
git fetch --tags | ||
git fetch origin master:master | ||
- name: Restore previous results | ||
uses: actions/cache@v2 | ||
with: | ||
path: .asv | ||
key: asv-${{ runner.os }} | ||
restore-keys: | | ||
asv- | ||
- name: Benchmark | ||
run: | | ||
asv run -j 8 --interleave-processes --skip-existing v3.2.0..HEAD | ||
- name: Build pages | ||
run: | | ||
git config --global user.email "$GIT_AUTHOR_EMAIL" | ||
git config --global user.name "$GIT_AUTHOR_NAME" | ||
asv gh-pages --no-push | ||
git push -f origin gh-pages:gh-pages | ||
env: | ||
GIT_AUTHOR_NAME: ${{ github.actor }} | ||
GIT_AUTHOR_EMAIL: ${{ github.actor }}@users.noreply.github.com | ||
testasv: | ||
if: github.event_name == 'push' && ! startsWith(github.event.ref, 'refs/tags') | ||
name: Branch | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install | ||
run: | | ||
pip install -U wheel | ||
pip install -U virtualenv asv | ||
asv machine --machine github-actions --yes | ||
git fetch --tags | ||
git fetch origin master:master | ||
- name: Restore previous results | ||
uses: actions/cache@v2 | ||
with: | ||
path: .asv | ||
key: asv-${{ runner.os }} | ||
restore-keys: | | ||
asv- | ||
- name: Benchmark | ||
run: | | ||
asv continuous --interleave-processes --only-changed -f 1.25 master HEAD | ||
CHANGES="$(asv compare --only-changed -f 1.25 master HEAD)" | ||
echo "$CHANGES" | ||
[ -z "$CHANGES" ] || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Comment Bot | ||
on: | ||
issue_comment: | ||
types: [created, edited] | ||
pull_request_review_comment: | ||
types: [created, edited] | ||
|
||
jobs: | ||
tag: # /tag <tagname> <commit> | ||
if: startsWith(github.event.comment.body, '/tag ') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: React Seen | ||
uses: actions/github-script@v2 | ||
with: | ||
script: | | ||
const perm = await github.repos.getCollaboratorPermissionLevel({ | ||
owner: context.repo.owner, repo: context.repo.repo, | ||
username: context.payload.comment.user.login}) | ||
post = (context.eventName == "issue_comment" | ||
? github.reactions.createForIssueComment | ||
: github.reactions.createForPullRequestReviewComment) | ||
if (!["admin", "write"].includes(perm.data.permission)){ | ||
post({ | ||
owner: context.repo.owner, repo: context.repo.repo, | ||
comment_id: context.payload.comment.id, content: "laugh"}) | ||
throw "Permission denied for user " + context.payload.comment.user.login | ||
} | ||
post({ | ||
owner: context.repo.owner, repo: context.repo.repo, | ||
comment_id: context.payload.comment.id, content: "eyes"}) | ||
- name: Tag Commit | ||
run: | | ||
git clone https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} repo | ||
git -C repo tag $(echo "$BODY" | awk '{print $2" "$3}') | ||
git -C repo push --tags | ||
rm -rf repo | ||
env: | ||
BODY: ${{ github.event.comment.body }} | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
- name: React Success | ||
uses: actions/github-script@v2 | ||
with: | ||
script: | | ||
post = (context.eventName == "issue_comment" | ||
? github.reactions.createForIssueComment | ||
: github.reactions.createForPullRequestReviewComment) | ||
post({ | ||
owner: context.repo.owner, repo: context.repo.repo, | ||
comment_id: context.payload.comment.id, content: "rocket"}) | ||
always: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo prevent failure when other jobs are skipped |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Post Release | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
- name: Checkout wiki | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.repository }}.wiki | ||
path: wiki | ||
- name: Checkout docs | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.repository }}.github.io | ||
path: docs | ||
ref: src | ||
token: ${{ secrets.GH_TOKEN }} | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install | ||
run: | | ||
pip install -U wheel | ||
pip install -U -r ./docs/requirements.txt | ||
git config --global user.email "$GIT_AUTHOR_EMAIL" | ||
git config --global user.name "$GIT_AUTHOR_NAME" | ||
env: | ||
GIT_AUTHOR_NAME: ${{ github.event.sender.login }} | ||
GIT_AUTHOR_EMAIL: ${{ github.event.sender.login }}@users.noreply.github.com | ||
- name: Update Wiki Releases | ||
run: | | ||
pushd wiki | ||
make | ||
git commit -a -m "update release notes to ${GITHUB_REF#refs/tags/}" | ||
git push | ||
popd | ||
- name: Update Docs | ||
run: | | ||
pushd docs | ||
git fetch --depth=1 origin master:master | ||
git checkout master | ||
git push --set-upstream origin master | ||
git checkout - | ||
make deploy | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.