Skip to content

Commit

Permalink
Update build + release. (#171)
Browse files Browse the repository at this point in the history
* Update build + release.

* Modify release script.

* Add maturin action.

* Update ci.

* Test automated build.

* Add test upload.

* Update release workflow.

* Update release workflow.

* Update release workflow.

* Remove space reclaim.

* Remove ppc64le build.

* Use nightly toolchain.

* Limit archs.

* Update release.

* Add artifacts.

* Update artifact name.

* Update download artifact.

* Add https.

* Update pyproject.toml

* Update pyproject.toml

* Test new pypi build.

* Test version bump.

* Add project metadata.

* Merge.

* Add release section.

* Comment out test release.

* Add 3.11.

* Update python versions.

* Update release.yaml.

* Disable windows.

* Change needs.

* Fix ci.
  • Loading branch information
benjaminrwilson authored May 10, 2023
1 parent 19fcb57 commit 912d286
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 7 deletions.
File renamed without changes.
File renamed without changes.
133 changes: 133 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: "[av2] Release"

on:
push:
branches:
- main
tags:
- '*'
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64, x86, aarch64]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: "true"
manylinux: auto
rust-toolchain: nightly
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

# windows:
# runs-on: windows-latest
# strategy:
# matrix:
# target: [x64, x86]
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: "3.10"
# architecture: ${{ matrix.target }}
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.target }}
# args: --release --out dist --find-interpreter
# sccache: "true"
# rust-toolchain: nightly
# - name: Upload wheels
# uses: actions/upload-artifact@v3
# with:
# name: wheels
# path: dist

macos:
runs-on: macos-latest
strategy:
matrix:
target: [x86_64, aarch64]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: "true"
rust-toolchain: nightly
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

# test_release:
# name: Test release.
# needs: [linux, windows, macos, sdist]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/download-artifact@v3
# with:
# name: wheels
# path: dist
# - name: Publish distribution 📦 to Test PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository-url: https://test.pypi.org/legacy/

release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, macos, sdist]
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --skip-existing *
27 changes: 22 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,30 @@ build-backend = "maturin"

[project]
name = "av2"
description = "Argoverse 2: Next generation datasets for self-driving perception and forecasting."
requires-python = ">=3.8"
license = { file = "LICENSE" }
keywords = [
"argoverse",
"argoverse2",
"autonomous-driving",
"av1",
"av2",
"3d-object-detection",
"3d-scene-flow",
"4d-occupancy-forecasting",
"e2e-forecasting",
"motion-forecasting",
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
]

dependencies = [
Expand All @@ -29,13 +49,10 @@ dependencies = [
"torch",
"tqdm",
"universal_pathlib",
"trackeval @ git+https://github.com/JonathonLuiten/TrackEval.git"
]

dynamic = [
"authors",
"description",
"license",
"version"
]

Expand All @@ -54,7 +71,7 @@ test = [
]

[project.urls]
homepage = "argoverse.org"
homepage = "https://argoverse.org"
repository = "https://github.com/argoverse/av2-api"

[tool.maturin]
Expand Down
2 changes: 0 additions & 2 deletions src/av2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# <Copyright 2022, Argo AI, LLC. Released under the MIT license.>

"""Argoverse 2 API."""

__version__ = "0.3.0"

0 comments on commit 912d286

Please sign in to comment.