Skip to content

Commit

Permalink
update config
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidham3 committed Dec 20, 2024
1 parent 3d24584 commit 54c7ca0
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 33 deletions.
90 changes: 90 additions & 0 deletions .github/workflows/build_wheels_for_vtag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Test TrajDL on tag v

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v4

- uses: pypa/[email protected]

- name: Check wheels
run: |
ls wheelhouse
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist-${{ github.ref_name }}-${{ github.sha }}-wheel
path: wheelhouse/*.whl
retention-days: 1
overwrite: true

test_wheels:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
name: dist-${{ github.ref_name }}-${{ github.sha }}-wheel
path: dist

- name: Install TrajDL
run: |
python -m pip install --upgrade pip
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
PYTHON_VERSION=${{ matrix.python-version }}
PYTHON_VERSION_NO_DOT="${PYTHON_VERSION/./}"
python -m pip install "dist/trajdl-0.1.0-cp${PYTHON_VERSION_NO_DOT}-cp${PYTHON_VERSION_NO_DOT}-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
- name: Cache datasets
id: cache-datasets
uses: actions/cache@v3
with:
path: ~/.cache/trajdl
key: trajdl-cache-datasets

- name: Test with pytest
run: |
autoflake -j 0 --remove-all-unused-imports --in-place --recursive --ignore-init-module-imports .
isort -j -1 .
black .
pytest -s
- name: Build SDist
run: |
if [ "${{ matrix.python-version }}" = "3.12" ]; then
python -m build --sdist
fi
- name: Upload artifacts
if: matrix.python-version == '3.12'
uses: actions/upload-artifact@v4
with:
name: dist-${{ github.ref_name }}-${{ github.sha }}-${{ matrix.python-version }}
path: dist/
retention-days: 1
overwrite: true
33 changes: 0 additions & 33 deletions .github/workflows/test_trajdl_vtag.yml

This file was deleted.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ wheel.expand-macos-universal-tags = true

[tool.cibuildwheel]
build-frontend = "build[uv]"
build = "cp310-manylinux_x86_64 cp311-manylinux_x86_64 cp312-manylinux_x86_64"

[tool.cibuildwheel.pyodide]
build-frontend = {name = "build", args = ["--exports", "whole_archive"]}

0 comments on commit 54c7ca0

Please sign in to comment.