-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
988c779
commit 1735782
Showing
10 changed files
with
191 additions
and
45 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,29 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
paths: | ||
- '**.py' | ||
- '**.yml' | ||
- '**.toml' | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '**.py' | ||
- '**.yml' | ||
- '**.toml' | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install | ||
run: | | ||
pip install hatch | ||
pip install ruff | ||
- name: lint | ||
run: | | ||
make lint |
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,25 @@ | ||
name: Release on Pypi | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
pypi-publish: | ||
name: Upload release to PyPI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
- name: Install pypa | ||
run: >- | ||
pip install hatch | ||
- name: Pulish | ||
run: | | ||
hatch build | ||
hatch publish -u '__token__' -a '${{ secrets.HATCH_INDEX_AUTH }}' |
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
target | ||
cgo-demo | ||
dist | ||
README.md |
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,18 @@ | ||
build: clean readme | ||
hatch build | ||
|
||
clean: | ||
rm -rf build dist shgpt.egg-info | ||
|
||
fix: | ||
ruff check --fix | ||
ruff format | ||
|
||
lint: | ||
ruff check | ||
ruff format --check | ||
|
||
readme: | ||
pandoc -f org -t markdown README.org -o README.md | ||
|
||
.PHONY: build clean fix lint readme |
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "zigcc" | ||
dynamic = ["version"] | ||
authors = [{name = "Jiacai Liu", email="dev@liujiacai.net"}] | ||
description = "A util script that aims to ease use `zig cc` to compile C/C++/Rust/Go programs." | ||
readme = "README.md" | ||
keywords = ["zig", "compile", "rust", "cross-compile"] | ||
license = "GPL-3.0" | ||
requires-python = ">=3.0.0" | ||
dependencies = [ | ||
] | ||
classifiers = [ | ||
"Operating System :: OS Independent", | ||
"Topic :: Software Development", | ||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", | ||
"Intended Audience :: Information Technology", | ||
"Intended Audience :: System Administrators", | ||
"Intended Audience :: Developers", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
] | ||
|
||
[project.urls] | ||
Repository = "https://github.com/jiacai2050/zigcc" | ||
Issues = "https://github.com/jiacai2050/zigcc/issues" | ||
|
||
[project.scripts] | ||
zigcc = "zigcc:main" | ||
zigcxx = "zigcc:main" | ||
zigcargo = "zigcc:main" | ||
|
||
[tool.hatch.version] | ||
path = "zigcc/__init__.py" | ||
|
||
[tool.hatch.build.targets.sdist] | ||
include = [ | ||
"zigcc", | ||
"pyproject.toml", | ||
] | ||
|
||
[tool.hatch.build.targets.wheel] | ||
include = [ | ||
"zigcc" | ||
] | ||
|
||
# https://github.com/astral-sh/ruff?tab=readme-ov-file#configuration | ||
[tool.ruff.lint] | ||
fixable = ["ALL"] | ||
|
||
[tool.ruff.format] | ||
quote-style = "single" |
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