Skip to content

Commit

Permalink
ESIRuntime wheel build image
Browse files Browse the repository at this point in the history
  • Loading branch information
teqdruid committed Jul 29, 2024
1 parent fa119e6 commit 40aa020
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/esiruntime-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build and push ESI Runtime wheel build image

on:
workflow_dispatch:

jobs:
build-push-image:
name: Build and push
runs-on: ubuntu-latest
steps:
- 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 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
11 changes: 11 additions & 0 deletions esiruntime-wheel/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM quay.io/pypa/manylinux_2_28_x86_64

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
RUN /tmp/grpc.sh
RUN rm -r /tmp/grpc
25 changes: 25 additions & 0 deletions esiruntime-wheel/grpc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -e

# Installs gRPC from source.

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
cd grpc
mkdir -p cmake/build
cd cmake/build
cmake -S ../.. -B . \
-G Ninja \
-DgRPC_INSTALL=ON \
-DCMAKE_BUILD_TYPE=Release
ninja -j$(nproc)
ninja install

echo "Done."

0 comments on commit 40aa020

Please sign in to comment.