Skip to content

Commit

Permalink
🎉 Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Feb 12, 2024
0 parents commit da52260
Show file tree
Hide file tree
Showing 38 changed files with 4,181 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .cmake-format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
line_width: 120
1 change: 1 addition & 0 deletions .cmakelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
filter=-whitespace/indent,-linelength,-readability/wonkycase
6 changes: 6 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
patreon: user?u=83975719
custom:
- "https://user-images.githubusercontent.com/32936898/199681341-1c5cfa61-4411-4b67-b268-7cd87c5867bb.png"
- "https://user-images.githubusercontent.com/32936898/199681363-1094a0be-85ca-49cf-a410-19b3d7965120.png"
- "https://user-images.githubusercontent.com/32936898/199681368-c34c2be7-e0d8-43ea-8c2c-d3e865da6aeb.png"
152 changes: 152 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
---
"on":
push:
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
workflow_dispatch:

# https://github.com/softprops/action-gh-release/issues/236
permissions:
contents: write

env:
CMAKE_GENERATOR: Ninja
PYTHONUTF8: "1"
python-version: 3.x
cache: pip

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: |
npm install
- name: Test
run: |
npm test
deploy-npm:
runs-on: ubuntu-latest
needs: test
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
registry-url: https://registry.npmjs.org
- name: Publish
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
run: |
npm publish
deploy-cargo:
runs-on: ubuntu-latest
needs: test
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- uses: ructions/toolchain@v1
with:
toolchain: nightly
- name: Publish
run: |
cargo publish --token ${{secrets.CARGO_TOKEN}}
build-wheels-and-test:
needs: test
strategy:
fail-fast: false
matrix:
include:
- runs-on: ubuntu-latest
CIBW_SKIP: "*-manylinux_*"
- runs-on: ubuntu-latest
CIBW_SKIP: "*-musllinux_*"
- runs-on: macos-latest
CIBW_SKIP: ""
- runs-on: windows-latest
CIBW_SKIP: ""
runs-on: ${{matrix.runs-on}}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
if: runner.os == 'Linux'
- uses: pypa/cibuildwheel@v2.16
env:
CIBW_SKIP: ${{matrix.CIBW_SKIP}}
- uses: actions/upload-artifact@v4
with:
name: artifact-${{matrix.runs-on}}-${{matrix.CIBW_SKIP}}
path: |
wheelhouse/*.whl
build:
needs:
- build-wheels-and-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{env.python-version}}
cache: ${{env.cache}}
- name: Install dependencies
run: |
pip install build
- name: Build sdist
run: python -m build -s
- uses: actions/upload-artifact@v4
if: "! startsWith(github.ref, 'refs/tags/')"
with:
name: artifact-sdist
path: |
dist/*
- uses: actions/download-artifact@v4
with:
pattern: artifact-*
merge-multiple: true
path: dist
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
# body_path: build/CHANGELOG.md
files: |
dist/*
- uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags/')
with:
password: ${{secrets.PYPI_API_TOKEN}}

deploy-aur:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: Freed-Wu/update-aur-package@v1.0.11
if: startsWith(github.ref, 'refs/tags/')
with:
package_name: python-tree-sitter-m3u
ssh_private_key: ${{secrets.AUR_SSH_PRIVATE_KEY}}

deploy-nur:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Trigger Workflow
run: >
curl -X POST -d '{"ref": "main"}'
-H "Accept: application/vnd.github.v3+json"
-H "Authorization: Bearer ${{secrets.GH_TOKEN}}"
https://api.github.com/repos/Freed-Wu/nur-packages/actions/workflows/version.yml/dispatches
232 changes: 232 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@
_version.py

# create by https://github.com/iamcco/coc-gitignore (Thu Nov 30 2023 16:50:01 GMT+0800 (China Standard Time))
# Node.gitignore:
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# create by https://github.com/iamcco/coc-gitignore (Thu Nov 30 2023 16:50:07 GMT+0800 (China Standard Time))
# Rust.gitignore:
# Generated by Cargo
# will have compiled files and executables
/target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# create by https://github.com/iamcco/coc-gitignore (Thu Nov 30 2023 22:48:58 GMT+0800 (China Standard Time))
# Python.gitignore:
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
Loading

0 comments on commit da52260

Please sign in to comment.