Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Yu Chin Fabian Lim <[email protected]>
  • Loading branch information
fabianlim committed Jun 29, 2024
1 parent 49225b6 commit 67a2435
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 27 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
on:
# release:
# types: [published]
push:
branches: [ actions/pkg ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- setup: "3.10"
tox: "py310"
# - setup: "3.11"
# tox: "py311"
plugin_name:
- "framework"
# - "accelerated-peft"
- "fused-ops-and-kernels"

permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
plugins:
- 'plugins/${{ matrix.plugin_name }}'
- name: Set up Python ${{ matrix.python-version.setup }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version.setup }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Build and test with tox
run: tox -e ${{ matrix.python-version.tox }}

- name: Build and check wheel package
run: tox -e build,twinecheck

- name: "Remove sigstore signatures before uploading to PyPI"
run: |
rm ./dist/*.sigstore
- name: "Upload to PyPI"
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
with:
repository-url: https://test.pypi.org/legacy/
# repository-url: https://pypi.org/p/fms-acceleration-framework
28 changes: 14 additions & 14 deletions plugins/framework/tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py, lint
envlist = lint, fmt

[testenv]
deps =
Expand All @@ -23,16 +23,16 @@ commands =
black {posargs:.}
isort {posargs:.}

# [testenv:build]
# description = build wheel
# deps =
# build
# commands = python -m build -w
# skip_install = True
#
# [testenv:twinecheck]
# description = check wheel
# deps =
# twine
# commands = twine check dist/*
# skip_install = True
[testenv:build]
description = build wheel
deps =
build
commands = python -m build -w
skip_install = True

[testenv:twinecheck]
description = check wheel
deps =
twine
commands = twine check dist/*
skip_install = True
26 changes: 13 additions & 13 deletions plugins/fused-ops-and-kernels/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ commands =
black --exclude .*unsloth.* tests
isort .

# [testenv:build]
# description = build wheel
# deps =
# build
# commands = python -m build -w
# skip_install = True
#
# [testenv:twinecheck]
# description = check wheel
# deps =
# twine
# commands = twine check dist/*
# skip_install = True
[testenv:build]
description = build wheel
deps =
build
commands = python -m build -w
skip_install = True

[testenv:twinecheck]
description = check wheel
deps =
twine
commands = twine check dist/*
skip_install = True

0 comments on commit 67a2435

Please sign in to comment.