From 5de9afcab0c1ea61f329bee951db09288c76bd95 Mon Sep 17 00:00:00 2001 From: Michal Czyz Date: Tue, 26 Mar 2024 14:50:11 +0100 Subject: [PATCH] test skimmer dockre Signed-off-by: Michal Czyz --- .devcontainer/ubuntu-gui/devcontainer.json | 2 +- .github/workflows/ci.yml | 38 +++++++++++++--------- Dockerfile-lxqt | 4 +++ Dockerfile-orfs | 6 ++++ scripts/install-lxqt.sh | 12 +++++++ scripts/install.sh | 28 ++++++++++++++++ 6 files changed, 74 insertions(+), 16 deletions(-) create mode 100644 Dockerfile-lxqt create mode 100644 Dockerfile-orfs create mode 100644 scripts/install-lxqt.sh create mode 100644 scripts/install.sh diff --git a/.devcontainer/ubuntu-gui/devcontainer.json b/.devcontainer/ubuntu-gui/devcontainer.json index 919cbce..e1ad6bb 100644 --- a/.devcontainer/ubuntu-gui/devcontainer.json +++ b/.devcontainer/ubuntu-gui/devcontainer.json @@ -1,5 +1,5 @@ { - "image": "ghcr.io/antmicro/openroad-flow-scripts/ubuntu22.04:latest", + "image": "ghcr.io/antmicro/orfs:latest", "features": { "ghcr.io/devcontainers/features/desktop-lite:1": {} }, diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a73e36..43d5573 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,20 +20,6 @@ jobs: with: ref: "mczyz/dev" - # - name: Pre-build dev container image - # uses: devcontainers/ci@v0.3 - # with: - # imageName: ghcr.io/openroad-codespace/test - # cacheFrom: ghcr.io/openroad-codespace/test - # push: always - # configFile: ./.devcontainer/ubuntu-gui/devcontainer.json - - - name: Devcontainer build - run: | - npm install -g @devcontainers/cli - devcontainer build --config .devcontainer/ubuntu-gui/devcontainer.json --workspace-folder . --push false --image-name test:latest - docker image tag test:latest ghcr.io/antmicro/openroad-codespace:test - - name: Login to GitHub Container Registry (GHCR) if: github.event_name != 'pull_request' && github.repository == 'antmicro/openroad-codespace' uses: docker/login-action@v2 @@ -42,6 +28,28 @@ jobs: username: gha password: ${{ github.token }} + - name: Docker build + run: | + docker build -t ghcr.io/antmicro/orfs:latest -f Dockerfile-orfs + + - name: Push container image to GitHub Container Registry (GHCR) + if: github.event_name != 'pull_request' && github.repository == 'antmicro/openroad-codespace' + run: docker push ghcr.io/antmicro/orfs:latest + + - name: Devcontainer build + run: | + npm install -g @devcontainers/cli + devcontainer build --config .devcontainer/ubuntu-gui/devcontainer.json --workspace-folder . --push false --image-name ghcr.io/antmicro/openroad-codespace:latest + # docker image tag test:latest ghcr.io/antmicro/openroad-codespace:test + + - name: Push container image to GitHub Container Registry (GHCR) + if: github.event_name != 'pull_request' && github.repository == 'antmicro/openroad-codespace' + run: docker push ghcr.io/antmicro/openroad-codespace:latest + + - name: Docker build + run: | + docker build -t ghcr.io/antmicro/lxqt -f Dockerfile-lxqt + - name: Push container image to GitHub Container Registry (GHCR) if: github.event_name != 'pull_request' && github.repository == 'antmicro/openroad-codespace' - run: docker push ghcr.io/antmicro/openroad-codespace:test + run: docker push ghcr.io/antmicro/lxqt:latest diff --git a/Dockerfile-lxqt b/Dockerfile-lxqt new file mode 100644 index 0000000..fd4eb96 --- /dev/null +++ b/Dockerfile-lxqt @@ -0,0 +1,4 @@ +FROM ghcr.io/antmicro/openroad-codespace:latest + +COPY scripts/install-lqxt.sh /usr/local/bin/install-lqxt.sh +RUN bash /usr/local/bin/install-lqxt.sh diff --git a/Dockerfile-orfs b/Dockerfile-orfs new file mode 100644 index 0000000..b8535a7 --- /dev/null +++ b/Dockerfile-orfs @@ -0,0 +1,6 @@ +FROM ubuntu:22.04 + +COPY scripts/install.sh /usr/local/bin/install.sh +RUN bash /usr/local/bin/install.sh + +ENV PATH="$PATH:/opt/oss-cad-suite/bin" diff --git a/scripts/install-lxqt.sh b/scripts/install-lxqt.sh new file mode 100644 index 0000000..951a48d --- /dev/null +++ b/scripts/install-lxqt.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +. ../common.sh + +# Create session config file +sudoIf apt-get -y --no-install-recommends install lxqt + +cat << EOF > ~/.config/lxqt/session.conf +[General] +__userfile__=true +window_manager=xfwm4 +EOF diff --git a/scripts/install.sh b/scripts/install.sh new file mode 100644 index 0000000..0d3666a --- /dev/null +++ b/scripts/install.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +export KLAYOUT_VER=${KLAYOUT_VER:-0.28.17-1} +export DEBIAN_FRONTEND=noninteractive + +apt-get -qqy update +apt-get install -qqy --no-install-recommends git wget ca-certificates + +update-ca-certificates +wget https://www.klayout.org/downloads/Ubuntu-22/klayout_${KLAYOUT_VER}_amd64.deb +apt-get install -qqy --no-install-recommends ./klayout_${KLAYOUT_VER}_amd64.deb +rm -rf ./klayout_${KLAYOUT_VER}_amd64.deb + +wget https://github.com/YosysHQ/oss-cad-suite-build/releases/download/2024-03-26/oss-cad-suite-linux-x64-20240326.tgz +tar -xvf oss-cad-suite-linux-x64-20240326.tgz +rm -rf oss-cad-suite-linux-x64-20240326.tgz +mkdir -p /opt +mv oss-cad-suite /opt/oss-cad-suite + +wget https://github.com/Precision-Innovations/OpenROAD/releases/download/2024-03-25/openroad_2.0_amd64-ubuntu22.04-2024-03-25.deb +apt-get install -qqy --no-install-recommends ./openroad_2.0_amd64-ubuntu22.04-2024-03-25.deb +rm -rf ./openroad_2.0_amd64-ubuntu22.04-2024-03-25.deb + +cd ~ +git clone https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts.git + +apt-get clean +apt-get autoclean