-
Notifications
You must be signed in to change notification settings - Fork 10
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
db82968
commit 7f10a50
Showing
5 changed files
with
209 additions
and
3 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,86 @@ | ||
name: main | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Build | ||
run: | | ||
python -m pip install build | ||
python -m build . | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Test | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ".[test]" | ||
pytest -v \ | ||
--junitxml=test-results/junit.xml \ | ||
--cov=pyodide-build \ | ||
pyodide_build | ||
- uses: codecov/codecov-action@v4 | ||
with: | ||
fail_ci_if_error: false | ||
|
||
publish: | ||
name: >- | ||
Publish Python 🐍 distribution 📦 to PyPI | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/pyodide-build | ||
permissions: | ||
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
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,30 @@ | ||
*.a | ||
*.o | ||
*.pyc | ||
*.gen.* | ||
*.out.* | ||
|
||
*.egg-info/ | ||
|
||
__pycache__ | ||
|
||
.docker_home | ||
.hypothesis | ||
.idea | ||
.mozilla | ||
.mypy_cache/ | ||
.pytest_cache/ | ||
.vscode | ||
.venv* | ||
|
||
build | ||
ccache | ||
dist*/ | ||
docs/_build/ | ||
emsdk/emsdk | ||
geckodriver.log | ||
node_modules | ||
dist/ | ||
pyodide-build/**/build.log | ||
xbuildenv/ | ||
.pyodide-xbuildenv* |
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,82 @@ | ||
default_language_version: | ||
python: "3.12" | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: "v4.6.0" | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-yaml | ||
exclude: .clang-format | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: "v0.3.5" | ||
hooks: | ||
- id: ruff | ||
args: [--fix] | ||
- id: ruff-format | ||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: "v1.10.0" | ||
hooks: | ||
- id: python-use-type-annotations | ||
- id: rst-backticks | ||
- id: rst-directive-colons | ||
- id: rst-inline-touching-normal | ||
|
||
- repo: https://github.com/shellcheck-py/shellcheck-py | ||
rev: "v0.10.0.1" | ||
hooks: | ||
- id: shellcheck | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: "v2.2.6" | ||
hooks: | ||
- id: codespell | ||
args: | ||
[ | ||
"--ignore-words-list", | ||
"ags,aray,asend,ba,classs,crate,falsy,feld,inflight,lits,nd,slowy,te,oint,conveniant", | ||
] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: "v1.10.0" | ||
hooks: | ||
- id: mypy | ||
files: ^(pyodide-build/pyodide_build) | ||
exclude: (.*test.*) | ||
args: [] | ||
additional_dependencies: &mypy-deps | ||
- packaging | ||
- types-docutils | ||
- types-pyyaml | ||
- types-setuptools | ||
- types-requests | ||
- numpy | ||
- build | ||
- pytest | ||
- pydantic>=2.0 | ||
- unearth | ||
- resolvelib | ||
- rich | ||
- auditwheel_emscripten | ||
- pyodide-lock==0.1.0a5 | ||
- id: mypy | ||
name: mypy-tests | ||
args: [--ignore-missing-imports] | ||
files: ^(conftest.py|src/tests|pyodide-build/pyodide_build/tests) | ||
additional_dependencies: *mypy-deps | ||
|
||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: "v4.0.0-alpha.8" | ||
hooks: | ||
- id: prettier | ||
|
||
ci: | ||
autoupdate_schedule: "quarterly" |
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,9 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## Unreleased | ||
|
||
- pyodide-build is now developed under https://github.com/pyodide/pyodide-build. |
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