Skip to content

Commit

Permalink
Merge pull request #14 from NikLeberg/ghdl-yosys-plugin
Browse files Browse the repository at this point in the history
ghdl yosys plugin
  • Loading branch information
Readon authored Jun 20, 2024
2 parents e10704d + 0661d74 commit 9c72bcf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- master
tags:
- '*'
pull_request:

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -40,6 +41,6 @@ jobs:
with:
context: .
file: Dockerfile
push: true
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
25 changes: 23 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: GPL-3.0-only
#
# Author(s): Pavel Benacek <pavel.benacek@gmail.com>
# Leuenberger Niklaus <https://github.com/NikLeberg>

ARG UBUNTU_VERSION=22.04
FROM ubuntu:$UBUNTU_VERSION AS base
Expand All @@ -13,14 +14,14 @@ ARG SBT_OPTS_DEFAULT="-Dsbt.override.build.repos=true -Dsbt.boot.directory=/sbt/
ENV COURSIER_CACHE=$COURSIER_CACHE_DEFAULT
ENV SBT_OPTS=$SBT_OPTS_DEFAULT

ARG DEPS_RUNTIME="ca-certificates gnupg2 openjdk-17-jdk-headless ccache curl g++ gcc git libtcl8.6 python3 python3-pip python3-pip-whl libpython3-dev ssh locales make ghdl iverilog libboost1.74-dev"
ARG DEPS_RUNTIME="ca-certificates gnupg2 openjdk-17-jdk-headless ccache curl g++ gcc git libtcl8.6 python3 python3-pip python3-pip-whl libpython3-dev ssh locales make libgnat-10 iverilog libboost1.74-dev"
RUN apt-get update && \
apt-get install -y --no-install-recommends $DEPS_RUNTIME

FROM base AS build-symbiyosys

ENV PREFIX=/opt
ARG DEPS_YOSYS="autoconf build-essential clang cmake libffi-dev libreadline-dev pkg-config tcl-dev unzip flex bison"
ARG DEPS_YOSYS="autoconf build-essential clang cmake libffi-dev libreadline-dev pkg-config tcl-dev unzip flex bison gnat libz-dev"
RUN apt-get install -y --no-install-recommends $DEPS_YOSYS

ARG YOSYS_VERSION="yosys-0.28"
Expand Down Expand Up @@ -65,6 +66,26 @@ RUN git clone https://github.com/YosysHQ/sby.git SymbiYosys && \
cd .. && \
rm -Rf SymbiYosys

ARG GHDL_VERSION="v4.1.0"
RUN git clone https://github.com/ghdl/ghdl ghdl && \
cd ghdl && \
git checkout $GHDL_VERSION && \
mkdir build && \
cd build && \
../configure --prefix=$PREFIX && \
make && \
make install && \
cd ../.. && \
rm -Rf ghdl

ARG GHDL_PLUGIN_VERSION="0c4740a"
RUN git clone https://github.com/ghdl/ghdl-yosys-plugin.git ghdl-yosys-plugin && \
cd ghdl-yosys-plugin && \
git reset $GHDL_PLUGIN_VERSION --hard && \
make YOSYS_PREFIX=$PREFIX install && \
cd .. && \
rm -Rf ghdl-yosys-plugin

FROM base AS build-verilator

ENV PREFIX=/opt
Expand Down

0 comments on commit 9c72bcf

Please sign in to comment.