Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8462c3397f | |||
| a4ac88f002 | |||
| 54d20eb154 | |||
| 8a17f1dde0 | |||
| 8da92ced57 | |||
| 518eb06591 | |||
| 52be015967 | |||
| 9f2e3f3f78 |
@@ -1,67 +1,50 @@
|
||||
name: Build and Release mxPIC Wheels
|
||||
name: Build Linux and Release mxPIC
|
||||
|
||||
# This tells GitHub to ONLY run this pipeline when you push a version tag (e.g., v1.0.0)
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
[published]
|
||||
|
||||
jobs:
|
||||
# --- JOB 1: THE COMPILER ---
|
||||
build-wheels:
|
||||
name: Build on ${{ matrix.os }}
|
||||
# The matrix allows us to build for Windows and Linux simultaneously!
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
python-version: ['3.10']
|
||||
build-and-release:
|
||||
name: Build Linux & Publish Release
|
||||
# This targets your Docker runner on the Synology NAS
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install Build Dependencies
|
||||
# Install the tools required by our custom build_wheel.py script
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install build wheel mypy Cython setuptools
|
||||
|
||||
- name: Run Auto-Builder (Compiles C-extensions & Injects .pyi)
|
||||
- name: Run Auto-Builder (Compiles Linux C-extensions & Injects .pyi)
|
||||
# This generates the linux_x86_64.whl inside the dist/ folder
|
||||
run: python build_wheel.py
|
||||
|
||||
- name: Temporarily Store the Built Wheel
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mxpic-wheels-${{ matrix.os }}
|
||||
path: dist/*.whl
|
||||
retention-days: 1
|
||||
|
||||
# --- JOB 2: THE RELEASER ---
|
||||
create-release:
|
||||
name: Publish to GitHub Releases
|
||||
needs: build-wheels # Waits for both Windows and Linux to finish
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write # Required to allow the bot to create a release page
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download all OS Wheels
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: mxpic-wheels-*
|
||||
path: dist
|
||||
merge-multiple: true
|
||||
|
||||
- name: Upload Assets to Gitea Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
- name: Export Technology Manifests
|
||||
run: python scripts/export_technology_manifests.py --dest exported_PDKs
|
||||
|
||||
- name: Inject Prebuilt Windows Wheel
|
||||
# This copies your locally-built Windows wheel into the dist/ folder
|
||||
# so they sit side-by-side right before the release is published.
|
||||
run: |
|
||||
if [ -d "prebuilt_wheels" ]; then
|
||||
cp prebuilt_wheels/*.whl dist/ || true
|
||||
echo "✅ Windows wheel staged for release."
|
||||
else
|
||||
echo "⚠️ No prebuilt_wheels directory found."
|
||||
fi
|
||||
|
||||
- name: Create Gitea Release
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
with:
|
||||
# This command scopes up everything currently sitting in the dist/ folder
|
||||
files: "dist/*.whl"
|
||||
api_key: ${{ secrets.GITEA_TOKEN }}
|
||||
@@ -7,6 +7,7 @@ This is the fast-track guide to contributing to **mxPIC**. Adherence to these ru
|
||||
### <span style="color: #ff57c7;">0. Installation dependencies</span>
|
||||
- python 3.10.1
|
||||
- nazca 0.5.13
|
||||
- build 1.4.4
|
||||
- gdstk 1.0.0
|
||||
- numpy 1.22.3
|
||||
- pandas 1.3.3
|
||||
@@ -16,15 +17,12 @@ This is the fast-track guide to contributing to **mxPIC**. Adherence to these ru
|
||||
- myst-parser 3.0.1
|
||||
- sphinx-rtd-theme 3.1.0
|
||||
|
||||
```
|
||||
pip install sphinx myst-parser sphinx-rtd-theme gdstk==1.0.0
|
||||
```
|
||||
|
||||
## <span style="color: #ff57c7;">1. File & architecture</span>
|
||||
The repository have an archtecture like this.
|
||||
|
||||
```
|
||||
mxpic_forge/
|
||||
mxpic/
|
||||
├── primitives/
|
||||
│ ├── edge_couplers/
|
||||
│ │ └── EC_dual_layer_px3.py
|
||||
@@ -42,10 +40,8 @@ mxpic_forge/
|
||||
├── others/
|
||||
├── structures/
|
||||
├── routing/
|
||||
├── foundries/
|
||||
└── docs/
|
||||
└── source/
|
||||
└── conf.py
|
||||
└── foundries/
|
||||
|
||||
```
|
||||
|
||||
## <span style="color: #ff57c7;">2. Annotation & Documentation</span>
|
||||
@@ -84,6 +80,7 @@ The devices are divided into four major types, which is <span style="color: #d2a
|
||||
In the definitial of classes, compulsary keys are required, including **name** , **show_pins** , all defaults are None.
|
||||
All classes are cored at the **cell** class of **nazca**, which is generated through an internal method named "generate_gds"
|
||||
|
||||
|
||||
``` python
|
||||
class GratingCoupler():
|
||||
def __init__(self,name:"str"=None,....,show_pins:bool=None)
|
||||
@@ -98,6 +95,12 @@ class GratingCoupler():
|
||||
|
||||
return C
|
||||
```
|
||||
Please not that each class can be directly generated without any argument input which requires all the arguements to have default values, example below :
|
||||
|
||||
``` python
|
||||
grating = GratingCoupler()
|
||||
```
|
||||
|
||||
---
|
||||
## <span style="color: #ff57c7;">4. Port information formatting</span>
|
||||
The basic routing algorthium is based the information between nodes, which is the **pin** attribute inside each file. The formatting of **pin** name will be important.
|
||||
|
||||
@@ -1,9 +1,20 @@
|
||||
# import mxpic as mx
|
||||
import mxpic_release.mxpic as mx
|
||||
import mxpic as mx
|
||||
import nazca as nd
|
||||
import numpy as np
|
||||
|
||||
EC = mx.EC_dual_layer_px3(name="xxx",w_in=0.5,L_in=10,Ltp1=10,Ltp2=10,Ltp3=10)
|
||||
w_teeth_SiN = 0.5*np.ones(30)
|
||||
gap_teeth_SiN = 0.5*np.ones(30)
|
||||
|
||||
# import uuid
|
||||
# mac = uuid.getnode()
|
||||
# mc_addr = ':'.join(("%012X" % mac)[i:i+2] for i in range(0, 12, 2))
|
||||
# print(mc_addr)
|
||||
w_teeth_Si = 0.45*np.ones(30)
|
||||
gap_teeth_Si = 0.45*np.ones(30)
|
||||
|
||||
|
||||
tapeout = mx.foundries.Silterra.EOM1_2ML_CU()
|
||||
|
||||
GC = mx.grating_couplers.GC_SiN_Si_Dual_Layer(name="test",
|
||||
w_teeth_SiN=w_teeth_SiN,gap_teeth_SiN=gap_teeth_SiN,
|
||||
w_teeth_Si=w_teeth_Si,gap_teeth_Si=gap_teeth_Si,
|
||||
layer_Si_teeth="WG_HM",layer_Si_slab="WG_HIGHRIB",
|
||||
layer_SiN_etch="SiN_Rib_WG",layer_SiN_slab="WG_N")
|
||||
|
||||
nd.export_gds(topcells=GC.cell,filename="..\\test.gds")
|
||||
@@ -56,7 +56,7 @@ def build_and_harvest():
|
||||
# shutil.copy2(file_path, target_dir / file)
|
||||
|
||||
# (Optional) Copy non-code assets like config files or templates
|
||||
elif file.endswith((".json", ".yaml", ".yml")):
|
||||
elif file.endswith((".csv", ".json", ".yaml", ".yml")):
|
||||
shutil.copy2(file_path, target_dir / file)
|
||||
|
||||
print("✨ Cleanup: Removing intermediate .c files from source...")
|
||||
|
||||
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 296 KiB |
|
After Width: | Height: | Size: 158 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 294 KiB |
|
After Width: | Height: | Size: 240 KiB |
|
After Width: | Height: | Size: 298 KiB |
|
After Width: | Height: | Size: 277 KiB |
|
After Width: | Height: | Size: 249 KiB |
|
After Width: | Height: | Size: 163 KiB |
|
After Width: | Height: | Size: 163 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 105 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 212 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 166 KiB |
|
After Width: | Height: | Size: 107 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 188 KiB |
|
After Width: | Height: | Size: 156 KiB |
|
After Width: | Height: | Size: 186 KiB |
|
After Width: | Height: | Size: 155 KiB |
|
After Width: | Height: | Size: 166 KiB |
|
After Width: | Height: | Size: 148 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 441 KiB |
|
After Width: | Height: | Size: 425 KiB |
|
After Width: | Height: | Size: 308 KiB |
|
After Width: | Height: | Size: 40 KiB |