-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
18 changed files
with
447 additions
and
22 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,63 @@ | ||
name: Numba cache setup | ||
description: "Tries to restore the numba cache and sets relevant environment variables for numba to use" | ||
|
||
inputs: | ||
cache_name: | ||
description: "The name of the cache" | ||
required: true | ||
runner_os: | ||
description: "The runner os" | ||
required: true | ||
python_version: | ||
description: "The python version" | ||
required: true | ||
restore_cache: | ||
description: "Whether to restore the cache" | ||
required: false | ||
default: "true" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
# Set the location for numba cache to exist | ||
- name: Set numba cache env | ||
run: echo "NUMBA_CACHE_DIR=${{ github.workspace }}/.numba_cache" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
# Sets the cpu name for numba to use | ||
- name: Set numba cpu env | ||
run: echo "NUMBA_CPU_NAME=generic" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
# Sets the cpu features for numba to use | ||
- name: Set numba cpu features env | ||
run: echo "NUMBA_CPU_FEATURES=+64bit +adx +aes +avx +avx2 -avx512bf16 -avx512bitalg -avx512bw -avx512cd -avx512dq -avx512er -avx512f -avx512ifma -avx512pf -avx512vbmi -avx512vbmi2 -avx512vl -avx512vnni -avx512vpopcntdq +bmi +bmi2 -cldemote -clflushopt -clwb -clzero +cmov +cx16 +cx8 -enqcmd +f16c +fma -fma4 +fsgsbase +fxsr -gfni +invpcid -lwp +lzcnt +mmx +movbe -movdir64b -movdiri -mwaitx +pclmul -pconfig -pku +popcnt -prefetchwt1 +prfchw -ptwrite -rdpid +rdrnd +rdseed +rtm +sahf -sgx -sha -shstk +sse +sse2 +sse3 +sse4.1 +sse4.2 -sse4a +ssse3 -tbm -vaes -vpclmulqdq -waitpkg -wbnoinvd -xop +xsave -xsavec +xsaveopt -xsaves" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
# Set the CICD_RUNNING env so that numba knows it is running in a CI environment | ||
- name: Set CICD_RUNNING env | ||
run: echo "CICD_RUNNING=1" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
# Get current date for cache restore | ||
- name: Get Current Date | ||
run: echo "CURRENT_DATE=$(date +'%d/%m/%Y')" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
# GNU tar on windows runs much faster than the default BSD tar | ||
- name: Use GNU tar instead BSD tar if Windows | ||
if: ${{ inputs.runner_os == 'Windows' }} | ||
shell: cmd | ||
run: echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%" | ||
|
||
# Restore cache if restore_cache is true | ||
- name: Restore cache | ||
uses: actions/cache/restore@v4 | ||
if: ${{ inputs.restore_cache == 'true' }} | ||
with: | ||
path: ${{ github.workspace }}/.numba_cache | ||
# Try restore using today's date | ||
key: numba-${{ inputs.cache_name }}-${{ inputs.runner_os }}-${{ inputs.python_version }}-${{ env.CURRENT_DATE }} | ||
# If cant restore with today's date try another cache (without date) | ||
restore-keys: | | ||
numba-${{ inputs.cache_name }}-${{ inputs.runner_os }}-${{ inputs.python_version }}- |
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,33 @@ | ||
name: Issue Comment Posted | ||
|
||
on: | ||
issue_comment: | ||
types: [edited] | ||
|
||
jobs: | ||
check-pr-labels: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: build_tools | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install PyGithub | ||
run: pip install -Uq PyGithub | ||
|
||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ vars.PR_APP_ID }} | ||
private-key: ${{ secrets.PR_APP_KEY }} | ||
|
||
- name: Assign issue | ||
run: python build_tools/comment_pr_labeler.py | ||
env: | ||
CONTEXT_GITHUB: ${{ toJson(github) }} | ||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} |
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,33 @@ | ||
name: Issue Comment Posted | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
self-assign: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: build_tools | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install PyGithub | ||
run: pip install -Uq PyGithub | ||
|
||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ vars.PR_APP_ID }} | ||
private-key: ${{ secrets.PR_APP_KEY }} | ||
|
||
- name: Assign issue | ||
run: python build_tools/issue_assign.py | ||
env: | ||
CONTEXT_GITHUB: ${{ toJson(github) }} | ||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} |
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,34 @@ | ||
name: GitHub Maintenance | ||
|
||
on: | ||
schedule: | ||
# Run on 1st and 15th of every month at 01:00 AM UTC | ||
- cron: "0 1 1,15 * * *" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
issues: write | ||
contents: write | ||
|
||
jobs: | ||
stale_branches: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ vars.PR_APP_ID }} | ||
private-key: ${{ secrets.PR_APP_KEY }} | ||
|
||
- name: Stale Branches | ||
uses: crs-k/[email protected] | ||
with: | ||
repo-token: ${{ steps.app-token.outputs.token }} | ||
days-before-stale: 365 | ||
days-before-delete: 99999 | ||
comment-updates: true | ||
tag-committer: true | ||
stale-branch-label: "stale branch" | ||
compare-branches: "info" | ||
pr-check: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,13 +17,22 @@ jobs: | |
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ vars.PR_APP_ID }} | ||
private-key: ${{ secrets.PR_APP_KEY }} | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
token: ${{ steps.app-token.outputs.token }} | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- uses: tj-actions/changed-files@v44.5.2 | ||
- uses: tj-actions/changed-files@v44 | ||
id: changed-files | ||
|
||
- name: List changed files | ||
|
@@ -40,5 +49,9 @@ jobs: | |
with: | ||
extra_args: --files ${{ steps.changed-files.outputs.all_changed_files }} | ||
|
||
- if: ${{ failure() && github.event_name == 'pull_request' && github.event.pull_request.draft == false }} | ||
uses: pre-commit-ci/[email protected] | ||
- if: ${{ failure() && github.event_name == 'pull_request' && github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'stop pre-commit fixes')}} | ||
name: Push pre-commit fixes | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: Automatic `pre-commit` fixes | ||
commit_user_name: tsml-actions-bot[bot] |
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.