Instructions to rebuild the Docker container & Python wheels used in the Tiny Tapeout GitHub actions.
Run nix-shell. This will rebuild if necessary, then drop you into a shell with the openlane2 and its dependencies available via nix. Exit the shell when done testing.
IMAGE_PATH=$(nix build --extra-experimental-features "flakes nix-command" --print-out-paths --no-link --accept-flake-config --option system x86_64-linux --extra-platforms x86_64-linux '.#packages.x86_64-linux.openlane-docker')
cat $IMAGE_PATH | docker load
(libparse-python doesn't change often, so you might reuse the wheels from the last TinyTapeout/libparse-python release.)
Clone https://github.com/TinyTapeout/libparse-python and change into the repo directory.
Build & install for the current python version:
pip install .
Use cibuildwheel to build a manylinux wheel:
-
pip install cibuildwheel, if necessary -
CIBW_SKIP="pp*" python -m cibuildwheel --output-dir wheelhouse
Built wheels are in the wheelhouse directory.
Return to the openlane2 directory.
Update the version in pyproject.toml.
Build & install openlane2 for the current python version:
pip install .
Make a redistributable wheel:
-
Make a
wheelhousesubdirectory and copy the contents of thelibparse-python/wheelhouse(or the wheels downloaded from the github release) into it. -
pip wheel -w wheelhouse -f wheelhouse .
Run OPENLANE_IMAGE_OVERRIDE=openlane:tmp-x86_64-linux openlane --dockerized.
If libparse-python was changed, create a new tag & relase under TinyTapeout/libparse-python and upload all the wheels in the libparse-python/wheelhouse directory.
Create a new tag & relase under TinyTapeout/openlane2. Upload the newly created openlane-<version>.whl file from openlane2/wheelhouse. There will be other wheels for the dependencies (and possibly older versions of openlane2 built earlier), ignore those.
docker tag openlane:tmp-x86_64-linux ghcr.io/tinytapeout/openlane2:<version>
docker push ghcr.io/tinytapeout/openlane2:<version>
Edit action.yml in TinyTapeout/tt-gds-action to change:
-
Container version in
OPENLANE_IMAGE_OVERRIDE -
Wheel versions in
pip install <whatever>.whllines
Check if an example project hardens successfully.