Building from Source¶
yosys-bin is built inside a manylinux_2_34 Docker container so the resulting binaries work on any Linux system with glibc ≥ 2.34.
Prerequisites¶
Docker (any recent version)
gitwith the repository cloned including submodulesNetwork access (the build clones upstream repositories)
Build script¶
The entire build is driven by scripts/build.sh. Run it manually via
Docker:
docker run --rm \
--volume "$(pwd):/io" \
--workdir /io \
quay.io/pypa/manylinux_2_34_x86_64 \
/io/scripts/build.sh
The script performs the following steps in order:
System dependencies — installs build tools (
flex,bison,cmake,readline-devel,tcl-devel,python3-devel,glibc-static,gcc-c++) viadnf.Yosys — clones YosysHQ/yosys (if not already present), applies patches to make
libyosys.soversion-agnostic, then builds withmake ENABLE_PYOSYS=1.Multi-version pyosys — recompiles only the Python-binding object files for each of Python 3.10, 3.11, 3.12, and 3.13, producing a separate
libyosys.cpython-3XX-*.soper version.yosys-slang plugin — clones povik/yosys-slang, initialises its bundled
slangandfmtsubmodules, and buildsslang.sovia CMake with-DBUILD_AS_PLUGIN=ON.Boolector — clones Boolector/boolector and builds the SMT solver binary.
DV Flow integration — copies
src/dv_flow/libyosys/into the release tree and generates a releasepyproject.tomlwith the computed version.Smoke tests — runs the upstream Yosys Python test suite (
yosys/tests/pyosys/) against each Python version to verify the multi-version bindings.Tarball — packs the release directory into
release/yosys-bin-manylinux-x64-<version>.tar.gz.
Environment variables¶
Variable |
Description |
|---|---|
|
Set to |
|
Override the release version string (e.g. |
|
GitHub Actions run ID, appended to the version string for traceability. |
CI / GitHub Actions¶
The workflow in .github/workflows/ci.yml runs automatically on every
push and on a weekly schedule (Sunday 12:00 UTC).
Steps:
check_is_needed — queries the YosysHQ GitHub API for the latest Yosys release tag and constructs the build version string.
build — launches the Docker-based build described above.
Create Release — creates a GitHub Release with the version tag.
Upload Files — attaches the release tarball as a release asset.
Documentation is built separately and published to GitHub Pages whenever
main is updated (see .github/workflows/docs.yml).
Release layout¶
The unpacked release directory contains:
bin/
yosys
yosys-abc
yosys-config
boolector
lib/
share/
yosys/
plugins/
slang.so
techlibs/
…
pyosys/
libyosys.cpython-310-x86_64-linux-gnu.so
libyosys.cpython-311-x86_64-linux-gnu.so
libyosys.cpython-312-x86_64-linux-gnu.so
libyosys.cpython-313-x86_64-linux-gnu.so
yosys-abc
share/yosys/plugins/slang.so
dv_flow/
libyosys/
__init__.py
__ext__.py
synth.py
flow.dv
share/
pyproject.toml
ivpm.yaml
LICENSE