-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* start some refactoring * Refactoring * refactoring * add netlist.py and associated tests * fix install * packaging in progress * WIP * remove job for the moment * remove loadSNL from python * switch to static naja core * switch to fPIC * more static libs * build settings * build settings * starting wheels * remove windows for the time being * packaging * update * update * WIP * WIP * version * another attempt * settings * cleaning * setup * setup * setup * install boost * boost * still looking for boost * boost again * boost again * boost again * boost on macos * only linux for the moment * set variables * print BOOST_ROOT * print env var * force boost root * new attempt * WIP * clean * clean * Update wheels.yml * add python * other version * another attempt * clean again * python version * attempt again * link with Python * install flex/bison * remove serialization * remove capnp unit tests for python package * install bison * clean commands * install wget * remove pyloader testing in python package * remove spdlog * install flex * don't build snippets * remove spdlog * clean spdlog * clean spdlog * remove a test * split verilog tests * change config * linux compile * package location * update setup * switch to verilog main * new attempt * upload * test upload * test package * typo * cleaning * bump version * same version * initiate README * rename to najaeda * try to upload * set urls * fix URL * missing '/' * fix * add verbose * fix * more support * test * start macos support * macos setting * macos again * attempt * test * new test * more version * Update wheels.yml * Update wheels.yml
- Loading branch information
Showing
26 changed files
with
343 additions
and
122 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,151 @@ | ||
# Workflow to build and test wheels | ||
name: najaeda Wheel builder | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
# Release branches | ||
#- "[0-9]+.[0-9]+.X" | ||
pull_request: | ||
branches: | ||
- main | ||
#- "[0-9]+.[0-9]+.X" | ||
# Manual run | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheel for cp${{ matrix.python }}-${{ matrix.platform_id }}-${{ matrix.manylinux_image }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
# Ensure that a wheel builder finishes even if another fails | ||
fail-fast: false | ||
matrix: | ||
include: | ||
# Linux 64 bit manylinux2014 | ||
- os: ubuntu-latest | ||
python: 39 | ||
platform_id: manylinux_x86_64 | ||
manylinux_image: manylinux2014 | ||
- os: ubuntu-latest | ||
python: 310 | ||
platform_id: manylinux_x86_64 | ||
manylinux_image: manylinux2014 | ||
- os: ubuntu-latest | ||
python: 311 | ||
platform_id: manylinux_x86_64 | ||
manylinux_image: manylinux2014 | ||
- os: ubuntu-latest | ||
python: 312 | ||
platform_id: manylinux_x86_64 | ||
manylinux_image: manylinux2014 | ||
- os: ubuntu-latest | ||
python: 313 | ||
platform_id: manylinux_x86_64 | ||
manylinux_image: manylinux2014 | ||
- os: ubuntu-latest | ||
python: 313t | ||
platform_id: manylinux_x86_64 | ||
manylinux_image: manylinux2014 | ||
free_threaded_support: True | ||
|
||
# MacOS arm64 | ||
- os: macos-14 | ||
python: 39 | ||
platform_id: macosx_arm64 | ||
- os: macos-14 | ||
python: 310 | ||
platform_id: macosx_arm64 | ||
- os: macos-14 | ||
python: 311 | ||
platform_id: macosx_arm64 | ||
- os: macos-14 | ||
python: 312 | ||
platform_id: macosx_arm64 | ||
- os: macos-14 | ||
python: 313 | ||
platform_id: macosx_arm64 | ||
- os: macos-14 | ||
python: 313t | ||
platform_id: macosx_arm64 | ||
free_threaded_support: True | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Configure macOS Environment | ||
if: runner.os == 'macOS' | ||
run: | | ||
export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 HOMEBREW_NO_ENV_HINTS=1 | ||
eval "$(brew shellenv)" | ||
brew install -q boost flex bison | ||
echo "/usr/local/opt/flex/bin" >> $GITHUB_PATH; echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH; | ||
echo "/opt/homebrew/opt/flex/bin" >> $GITHUB_PATH; echo "/opt/homebrew/opt/bison/bin" >> $GITHUB_PATH | ||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==2.22.0 | ||
|
||
- name: Build wheels | ||
env: | ||
CIBW_FREE_THREADED_SUPPORT: ${{ matrix.free_threaded_support }} | ||
CIBW_ENVIRONMENT: SKLEARN_SKIP_NETWORK_TESTS=1 | ||
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} | ||
CIBW_ARCHS: all | ||
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }} | ||
CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }} | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
|
||
#Reminder!!: actions/upload-artifact and actions/download-artifact | ||
#need to have same version | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-cp${{ matrix.python }}-${{ matrix.platform_id }} | ||
path: ./wheelhouse/*.whl | ||
|
||
test_upload_pypi: | ||
# TODO: create an sdist that can build without a custom environment | ||
needs: [build_wheels] | ||
runs-on: ubuntu-latest | ||
#environment: pypi | ||
permissions: | ||
id-token: write | ||
steps: | ||
#Reminder!!: actions/upload-artifact and actions/download-artifact | ||
#need to have same version | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: cibw-* | ||
path: dist | ||
merge-multiple: true | ||
|
||
- uses: pypa/[email protected] | ||
with: | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
repository-url: https://test.pypi.org/legacy/ | ||
skip-existing: true | ||
|
||
pypi-publish: | ||
needs: [test_upload_pypi] | ||
name: Upload release to PyPI | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: cibw-* | ||
path: dist | ||
merge-multiple: true | ||
|
||
- uses: pypa/[email protected] | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
skip-existing: true |
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
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 @@ | ||
Welcome to Naja Python package |
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 |
---|---|---|
|
@@ -3,22 +3,44 @@ | |
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
[build-system] | ||
requires = ["scikit-build-core", "setuptools", "wheel"] | ||
requires = ["scikit-build-core >=0.4.3"] | ||
build-backend = "scikit_build_core.build" | ||
|
||
[project] | ||
name = "naja" | ||
name = "najaeda" | ||
version = "0.1.0" | ||
description = "Naja Python package" | ||
description = "Naja EDA Python package" | ||
authors = [{name = "Naja Authors", email = "[email protected]"}] | ||
readme = "README.rst" | ||
requires-python = ">=3.8" | ||
license = {text = "Apache License 2.0"} | ||
#readme = "README.md" | ||
#keywords = ["naja", "python", "package"] | ||
|
||
#[tool.setuptools] | ||
#packages = ["naja"] | ||
#package_dir = {"" = "src/naja_python"} | ||
|
||
[tool.scikit-build.cmake.define] | ||
CMAKE_BUILD_TYPE="Release" | ||
BUILD_NAJA_PYTHON="ON" | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/najaeda/naja" | ||
|
||
[tool.cibuildwheel] | ||
build-verbosity = 1 | ||
|
||
[tool.cibuildwheel.linux] | ||
build-frontend = "build" | ||
before-all = ''' | ||
yum -y install wget boost-devel flex | ||
wget https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz | ||
tar -xvzf flex-2.6.4.tar.gz | ||
cd flex-2.6.4 | ||
./configure | ||
make | ||
make install | ||
cd .. | ||
wget http://ftp.gnu.org/gnu/bison/bison-3.8.tar.gz | ||
tar -xvzf bison-3.8.tar.gz | ||
cd bison-3.8 | ||
./configure | ||
make | ||
make install | ||
cd .. | ||
''' |
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
File renamed without changes.
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
Oops, something went wrong.