Skip to content

Commit

Permalink
debian: add standalone gtkwave image (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Oct 31, 2021
1 parent ec67a3c commit 95dfe3f
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/gtkwave.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,18 @@ jobs:
steps:

- uses: actions/checkout@v2
with:
submodules: recursive

- run: ./utils/setup.sh

- run: >-
dockerBuild -c ${{ matrix.os }} -d
pkg/gtkwave
gtkwave
- run: dockerTestPkg ${{ matrix.os }} gtkwave
- run: dockerTest ${{ matrix.os }} gtkwave

- name: Login to container registries
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
Expand All @@ -77,3 +81,4 @@ jobs:
run: >-
dockerPush ${{ matrix.os }}
pkg/gtkwave
gtkwave
19 changes: 18 additions & 1 deletion debian-bullseye/gtkwave.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,22 @@ RUN apt-get update -qq \

#---

FROM scratch
FROM scratch AS pkg
COPY --from=build /opt/gtkwave /gtkwave

#---

FROM $REGISTRY/build/base

RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
graphviz \
libgtk-3-bin \
libtcl8.6 \
libtk8.6 \
xdot \
&& apt-get autoclean -y && apt-get clean -y && apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

COPY --from=build /opt/gtkwave /
CMD ["gtkwave"]
19 changes: 18 additions & 1 deletion debian-buster/gtkwave.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,22 @@ RUN apt-get update -qq \

#---

FROM scratch
FROM scratch AS pkg
COPY --from=build /opt/gtkwave /gtkwave

#---

FROM $REGISTRY/build/base

RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
graphviz \
libgtk-3-bin \
libtcl8.6 \
libtk8.6 \
xdot \
&& apt-get autoclean -y && apt-get clean -y && apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

COPY --from=build /opt/gtkwave /
CMD ["gtkwave"]
2 changes: 2 additions & 0 deletions doc/main/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ gtkwave:
url: 'https://hdl.github.io/awesome/items/gtkwave'
pkg:
- 'gtkwave'
use:
- 'gtkwave'

#---

Expand Down
6 changes: 4 additions & 2 deletions graph/graph.dot
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ digraph G {
"ghdl"
"ghdl/llvm"
"ghdl/yosys"
"gtkwave"
"icestorm"
"iverilog"
"klayout"
Expand Down Expand Up @@ -188,14 +189,15 @@ digraph G {
subgraph cluster_sim {
label = "Sim";
m_sim -> {
"gtkwave"
"iverilog"
"verilator"
"sim"
"sim/osvb"
"sim/scipy-slim"
"sim/scipy"
"sim/octave-slim"
"sim/octave"
"iverilog"
"verilator"
"pkg/osvb"
"pkg/iverilog"
"pkg/verilator"
Expand Down
11 changes: 10 additions & 1 deletion graph/sim.dot
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ digraph G {
"iverilog"
"verilator"
"ghdl/llvm"
"gtkwave"
"xyce"
}
{ node [color=mediumblue, fontcolor=mediumblue]
Expand Down Expand Up @@ -82,13 +83,19 @@ digraph G {
{ rank=same
node [shape=cylinder, color=grey, fontcolor=grey]
"p_gtkwave_build/build" [label="build/build"]
"p_gtkwave_build/base" [label="build/base"]
"p_gtkwave_scratch" [label="scratch"]
}

d_gtkwave -> "pkg/gtkwave" [style=dotted];
d_gtkwave -> {
"gtkwave"
"pkg/gtkwave"
} [style=dotted];

"t_gtkwave" [shape=folder, color=red, fontcolor=red, label="gtkwave"];
"t_pkg/gtkwave" [shape=folder, color=red, fontcolor=red, label="gtkwave.pkg"];

"gtkwave" -> "t_gtkwave";
"pkg/gtkwave" -> "t_pkg/gtkwave";
}

Expand Down Expand Up @@ -215,6 +222,7 @@ digraph G {
# Dockerfile dependencies

"build/build" -> "p_gtkwave_build/build" -> d_gtkwave;
"build/base" -> "p_gtkwave_build/base" -> d_gtkwave;
"scratch" -> "p_gtkwave_scratch" -> d_gtkwave;

"build/build" -> "p_iverilog_build/build" -> d_iverilog;
Expand All @@ -236,6 +244,7 @@ digraph G {
# Image dependencies

{ edge [style=dashed]
"p_gtkwave_build/base" -> "gtkwave";
"p_gtkwave_scratch" -> "pkg/gtkwave";

"p_iverilog_build/base" -> "iverilog";
Expand Down
30 changes: 30 additions & 0 deletions test/gtkwave.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env sh

# Authors:
# Unai Martinez-Corral
#
# Copyright 2020-2021 Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

set -e

cd $(dirname "$0")

./_env.sh

./smoke-tests/gtkwave.sh

./_todo.sh
5 changes: 0 additions & 5 deletions test/sim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@ cd $(dirname "$0")
./_env.sh

./ghdl.sh
cat ghdl.log

./verilator.sh
cat verilator.log

./iverilog.sh
cat iverilog.log

./_todo.sh
3 changes: 2 additions & 1 deletion utils/pyHDLC/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"pkg/ghdl/llvm": ["ghdl", "pkg-llvm", None],
"ghdl": ["ghdl", "mcode", None],
"ghdl/llvm": ["ghdl", "llvm", None],
"pkg/gtkwave": ["gtkwave", None, None],
"pkg/gtkwave": ["gtkwave", "pkg", None],
"gtkwave": ["gtkwave", None, None],
"pkg/icestorm": ["icestorm", "pkg", None],
"icestorm": ["icestorm", None, None],
"build/impl": ["impl", "base", None],
Expand Down

0 comments on commit 95dfe3f

Please sign in to comment.