Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/esiruntime-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ jobs:
- name: Get CIRCT images repo
uses: actions/checkout@v4
- name: Build and push image
working-directory: ./esiruntime-wheel
run: |
TAG=$(date -u +%Y%m%d%H%M%S)
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker build . --tag ghcr.io/${{github.repository}}/esiruntime-wheel:$TAG
docker build . -f esiruntime-wheel.dockerfile --tag ghcr.io/${{github.repository}}/esiruntime-wheel:$TAG
docker push ghcr.io/${{github.repository}}/esiruntime-wheel:$TAG
docker tag ghcr.io/${{github.repository}}/esiruntime-wheel:$TAG ghcr.io/${{github.repository}}/esiruntime-wheel:latest
docker push ghcr.io/${{github.repository}}/esiruntime-wheel:latest
7 changes: 2 additions & 5 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Integration Test Image

on:
push:
branches: [trunk]
branches: [trunk, main]
paths:
- 'integration-test/**'
- '.github/workflows/integration-test.yml'
Expand All @@ -18,9 +18,6 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: integration-test
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -31,7 +28,7 @@ jobs:
echo "GHCR_TAG=ghcr.io/${{github.repository}}/circt-integration-test:$TAG" >> $GITHUB_ENV

- name: Build image
run: docker build . --tag $GHCR_TAG
run: docker build . -f integration-test.dockerfile --tag $GHCR_TAG

- name: Push image
if: ${{ github.event_name == 'release' }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pycde-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ jobs:
- name: Get CIRCT images repo
uses: actions/checkout@v4
- name: Build and push image
working-directory: ./pycde-build
run: |
TAG=$(date -u +%Y%m%d%H%M%S)
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker build . --tag ghcr.io/${{github.repository}}/pycde-build:$TAG
docker build . -f pycde-build.dockerfile --tag ghcr.io/${{github.repository}}/pycde-build:$TAG
docker push ghcr.io/${{github.repository}}/pycde-build:$TAG
docker tag ghcr.io/${{github.repository}}/pycde-build:$TAG ghcr.io/${{github.repository}}/pycde-build:latest
docker push ghcr.io/${{github.repository}}/pycde-build:latest
3 changes: 1 addition & 2 deletions .github/workflows/pycde-esi-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ jobs:
- name: Get CIRCT images repo
uses: actions/checkout@v4
- name: Build and push image
working-directory: ./pycde-esi-test
run: |
TAG=$(date -u +%Y%m%d%H%M%S)
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker build . --tag ghcr.io/${{github.repository}}/pycde-esi-test:$TAG
docker build . -f pycde-esi-test.dockerfile --tag ghcr.io/${{github.repository}}/pycde-esi-test:$TAG
docker push ghcr.io/${{github.repository}}/pycde-esi-test:$TAG
docker tag ghcr.io/${{github.repository}}/pycde-esi-test:$TAG ghcr.io/${{github.repository}}/pycde-esi-test:latest
docker push ghcr.io/${{github.repository}}/pycde-esi-test:latest
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ requires that the image definition and any files the definition needs to
testing) `cd` into the image directory and run `docker build . -t <tag>`
wherein tag is what you want the image to be called.

The `install` directory contains installation scripts shared by multiple images.

## Workflow

The publishing workflow for all the images is in
Expand Down
6 changes: 2 additions & 4 deletions esiruntime-wheel/Dockerfile → esiruntime-wheel.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ RUN yum install -y \
wget ninja-build autoconf bc bison flex flex-devel perl \
python3 python3-devel

COPY *.sh /tmp/

# Compile, install, then cleanup gRPC
# Install tools
COPY install/*.sh /tmp/
RUN /tmp/grpc.sh
RUN rm -r /tmp/grpc
8 changes: 6 additions & 2 deletions pycde-esi-test/cmake.sh → install/cmake.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
# Download and install a modern release of CMake into "/usr".
#!/bin/bash -xe

CMAKE_VER=3.23.2

Expand All @@ -15,4 +14,9 @@ cd /tmp
wget https://github.com/Kitware/CMake/releases/download/v$CMAKE_VER/$INSTALL_SCRIPT
chmod +x $INSTALL_SCRIPT
./$INSTALL_SCRIPT --skip-license --prefix=/usr

# Cleanup
rm $INSTALL_SCRIPT

# Sanity check
cmake --version | grep "cmake version $CMAKE_VER"
14 changes: 6 additions & 8 deletions esiruntime-wheel/grpc.sh → install/grpc.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
#!/usr/bin/env bash
set -e
#!/bin/bash -xe

# Installs gRPC from source.
GRPC_VER=1.54.2
# v1.54.2 is the version in Ubuntu 22.04

cd /tmp

# v1.54.2 is the version in Ubuntu 22.04
GRPC_VER=1.54.2
echo "Installing gRPC..."

if [ ! -d grpc ]; then
git clone --recurse-submodules -b v$GRPC_VER https://github.com/grpc/grpc
fi
Expand All @@ -23,4 +19,6 @@ cmake -S ../.. -B . \
ninja -j$(nproc)
ninja install

echo "Done."
# Cleanup
cd /tmp
rm -r grpc
12 changes: 7 additions & 5 deletions integration-test/or-tools.sh → install/or-tools.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash
# Downloads, compiles, and installs OR-Tools into /usr

set -e
#!/bin/bash -xe
# Downloads, compiles, and installs OR-Tools

OR_TOOLS_VER=9.5

Expand All @@ -13,7 +11,6 @@ OR_TOOLS_VER=9.5
cd /tmp
wget https://github.com/google/or-tools/archive/v$OR_TOOLS_VER.tar.gz
tar -zxf v$OR_TOOLS_VER.tar.gz
rm v$OR_TOOLS_VER.tar.gz
cd or-tools-$OR_TOOLS_VER
cmake -S . -B build \
-GNinja \
Expand All @@ -26,3 +23,8 @@ cmake -S . -B build \

cmake --build build --parallel $(nproc)
cmake --install build --prefix /usr

# Cleanup
cd /tmp
rm v$OR_TOOLS_VER.tar.gz
rm -r or-tools-$OR_TOOLS_VER
4 changes: 3 additions & 1 deletion integration-test/sby.sh → install/sby.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ tar -zxf yosys-$YOSYS_VER.tar.gz
rm yosys-$YOSYS_VER.tar.gz
cd sby-yosys-$YOSYS_VER
make PREFIX=/usr install
cd ..

# Cleanup
cd /tmp
rm -r sby-yosys-$YOSYS_VER

# Perform a sanity check.
Expand Down
12 changes: 9 additions & 3 deletions pycde-esi-test/verilator.sh → install/verilator.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
#!/bin/bash -e
# Downloads, compiles, and installs Verilator into $/ext
#!/bin/bash -xe

VERILATOR_VER=5.040

cd /tmp
wget https://github.com/verilator/verilator/archive/v$VERILATOR_VER.tar.gz
tar -zxf v$VERILATOR_VER.tar.gz
rm v$VERILATOR_VER.tar.gz
cd verilator-$VERILATOR_VER
autoconf
./configure --prefix=/usr
make -j$(nproc)
make install

# Cleanup
cd /tmp
rm v$VERILATOR_VER.tar.gz
rm -r verilator-$VERILATOR_VER

# Sanity check
verilator --version | grep "Verilator $VERILATOR_VER"
2 changes: 2 additions & 0 deletions integration-test/yosys.sh → install/yosys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export PREFIX=/usr
make config-clang
make -j$(nproc)
make install

# Cleanup
cd /tmp
rm -r /tmp/yosys

Expand Down
File renamed without changes.
22 changes: 3 additions & 19 deletions integration-test/Dockerfile → integration-test.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ RUN apt-get update && apt-get install -y \
gawk \
git \
gperf \
help2man \
iverilog \
libffi-dev \
libfl-dev \
Expand Down Expand Up @@ -67,30 +68,13 @@ RUN ln -s /usr/bin/clang-17 /usr/bin/clang; \
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt install -y g++-11

COPY *.sh /tmp/

# Install modern release of CMake
# Install tools
COPY install/*.sh /tmp/
RUN /tmp/cmake.sh

# Compile, install, then cleanup Verilator
RUN /tmp/verilator.sh
RUN rm -r /tmp/verilator-*

# Compile, install, then cleanup gRPC
# RUN /tmp/grpc.sh
# RUN rm -r /tmp/grpc

# Compile, install, then cleanup OR-Tools
RUN /tmp/or-tools.sh
RUN rm -r /tmp/or-tools-*

# Install a modern release of Z3
RUN /tmp/z3.sh

# Install Yosys.
RUN /tmp/yosys.sh

# Install SymbiYosys.
RUN /tmp/sby.sh

# Create manylinux compatible directory structure.
Expand Down
18 changes: 0 additions & 18 deletions integration-test/cmake.sh

This file was deleted.

26 changes: 0 additions & 26 deletions integration-test/grpc.sh

This file was deleted.

14 changes: 0 additions & 14 deletions integration-test/verilator.sh

This file was deleted.

8 changes: 2 additions & 6 deletions pycde-build/Dockerfile → pycde-build.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ RUN yum install -y \
wget ninja-build autoconf bc bison flex flex-devel perl \
python3 python3-devel

COPY *.sh /tmp/

# Install tools
COPY install/*.sh /tmp/
RUN /tmp/verilator.sh
RUN rm -r /tmp/verilator-*

# Compile, install, then cleanup gRPC
RUN /tmp/grpc.sh
RUN rm -r /tmp/grpc

# Install sccache
ENV sccache_version=0.5.4
Expand Down
27 changes: 0 additions & 27 deletions pycde-build/grpc.sh

This file was deleted.

14 changes: 0 additions & 14 deletions pycde-build/verilator.sh

This file was deleted.

11 changes: 2 additions & 9 deletions pycde-esi-test/Dockerfile → pycde-esi-test.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,11 @@ RUN ln -s /usr/bin/clang-17 /usr/bin/clang; \
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt install -y g++-11

COPY *.sh /tmp/

# Install modern release of CMake
# Install tools
COPY install/*.sh /tmp/
RUN /tmp/cmake.sh

# Compile, install, then cleanup Verilator
RUN /tmp/verilator.sh
RUN rm -r /tmp/verilator-*

# Compile, install, then cleanup gRPC
RUN /tmp/grpc.sh
RUN rm -r /tmp/grpc

# Create manylinux compatible directory structure.
RUN mkdir -p /opt/python/cp312-cp312/bin; \
Expand Down
Loading