Skip to content

Commit 55b498d

Browse files
committed
[#61664] codespace: Dockerfile-lxqt: Update base image
Updates the base image for the `lxqt` to use latest ORFS from docker registries. Replaces manual docker build invocation with appropriate action in the workflow. Signed-off-by: Illia Vysochyn <[email protected]>
1 parent 03dbe33 commit 55b498d

File tree

6 files changed

+40
-104
lines changed

6 files changed

+40
-104
lines changed

.devcontainer/ubuntu-gui-full/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
{
5-
"image": "ghcr.io/antmicro/openroad-flow-scripts:lxqt",
5+
"image": "ghcr.io/the-openroad-project/openroad-flow-scripts:lxqt",
66
"forwardPorts": [6080],
77
"portsAttributes": {
88
"6080": {

.github/workflows/github-actions-publish-docker-images.yml

Lines changed: 35 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
- flow/Makefile
1111
- docker/Dockerfile.dev
1212
- docker/Dockerfile.builder
13+
- tools/codespace/scripts/**
14+
- tools/codespace/Dockerfile-lxqt
1315
pull_request:
1416
paths:
1517
- etc/DependencyInstaller.sh
@@ -20,6 +22,8 @@ on:
2022
- flow/Makefile
2123
- docker/Dockerfile.dev
2224
- docker/Dockerfile.builder
25+
- tools/codespace/scripts/**
26+
- tools/codespace/Dockerfile-lxqt
2327

2428
jobs:
2529
buildCodespaceImage:
@@ -28,29 +32,29 @@ jobs:
2832
steps:
2933
- uses: actions/checkout@v4
3034

35+
- name: Set environment variables
36+
run: echo "IMAGE=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
37+
38+
- name: Set up Docker Buildx
39+
uses: docker/setup-buildx-action@v3
40+
3141
- name: Login to GitHub Container Registry (GHCR)
32-
if: github.event_name != 'pull_request' && github.repository == 'antmicro/openroad-flow-scripts'
42+
if: github.event_name != 'pull_request'
3343
uses: docker/login-action@v3
3444
with:
3545
registry: ghcr.io
3646
username: gha
3747
password: ${{ github.token }}
3848

39-
- name: Build ORFS
40-
run: |
41-
docker build -t ghcr.io/antmicro/openroad-flow-scripts:orfs -f tools/codespace/Dockerfile-orfs .
42-
43-
- name: Push container image to GitHub Container Registry (GHCR)
44-
if: github.event_name != 'pull_request' && github.repository == 'antmicro/openroad-flow-scripts'
45-
run: docker push ghcr.io/antmicro/openroad-flow-scripts:orfs
46-
47-
- name: Build LXQt
48-
run: |
49-
docker build -t ghcr.io/antmicro/openroad-flow-scripts:lxqt -f tools/codespace/Dockerfile-lxqt .
50-
51-
- name: Push container image to GitHub Container Registry (GHCR)
52-
if: github.event_name != 'pull_request' && github.repository == 'antmicro/openroad-flow-scripts'
53-
run: docker push ghcr.io/antmicro/openroad-flow-scripts:lxqt
49+
- name: Build and export codespaces image
50+
uses: docker/build-push-action@v6
51+
with:
52+
context: .
53+
push: true
54+
tags: ${{ env.IMAGE }}:lxqt
55+
file: tools/codespace/Dockerfile-lxqt
56+
cache-from: type=registry,ref=${{ env.IMAGE }}:lxqtbuildcache
57+
cache-to: type=registry,ref=${{ env.IMAGE }}:lxqtbuildcache
5458

5559
buildDependenciesImage:
5660
strategy:
@@ -60,7 +64,7 @@ jobs:
6064
runs-on: ubuntu-latest
6165
steps:
6266
- name: Check out repository code
63-
uses: actions/checkout@v3
67+
uses: actions/checkout@v4
6468
with:
6569
fetch-depth: 1
6670
submodules: recursive
@@ -92,7 +96,6 @@ jobs:
9296
file: docker/Dockerfile.dev
9397
build-args: |
9498
fromImage=${{ matrix.os[1] }}
95-
numThreads=$(nproc)
9699
cache-from: type=registry,ref=${{ env.IMAGE_DEPS }}:buildcache
97100
cache-to: type=registry,ref=${{ env.IMAGE_DEPS }}:buildcache,mode=max
98101

@@ -110,7 +113,7 @@ jobs:
110113
tool-cache: false
111114

112115
- name: Check out repository code
113-
uses: actions/checkout@v3
116+
uses: actions/checkout@v4
114117
with:
115118
fetch-depth: 1
116119
submodules: recursive
@@ -119,27 +122,11 @@ jobs:
119122
run: |
120123
echo "IMAGE=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')/${{ matrix.os }}" >> $GITHUB_ENV
121124
echo "IMAGE_DEPS=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')-dev/${{ matrix.os }}" >> $GITHUB_ENV
125+
echo "NUM_THREADS=$(nproc)" >> $GITHUB_ENV
122126
123127
- name: Set up Docker Buildx
124128
uses: docker/setup-buildx-action@v3
125129

126-
# We don't use the build-push-action here because it hangs
127-
- name: Build ORFS image
128-
run: |
129-
docker buildx build \
130-
--load \
131-
--build-arg fromImage=${{ env.IMAGE_DEPS }}:latest \
132-
--build-arg numThreads=$(nproc) \
133-
--cache-from type=registry,ref=${{ env.IMAGE }}:buildcache \
134-
--tag ${{ env.IMAGE }}:latest \
135-
--file docker/Dockerfile.builder \
136-
.
137-
138-
- name: Test build
139-
run: |
140-
cmd="source ./env.sh && yosys -help && openroad -help && make -C flow ;"
141-
docker run ${{ env.IMAGE }}:latest /bin/bash -c "${cmd}"
142-
143130
- name: Login to GitHub Container Registry (GHCR)
144131
if: github.event_name != 'pull_request'
145132
uses: docker/login-action@v2
@@ -148,14 +135,15 @@ jobs:
148135
username: gha
149136
password: ${{ github.token }}
150137

151-
- name: Export ORFS image
152-
run: |
153-
docker buildx build \
154-
--build-arg fromImage=${{ env.IMAGE_DEPS }}:latest \
155-
--build-arg numThreads=$(nproc) \
156-
--cache-from type=registry,ref=${{ env.IMAGE }}:buildcache \
157-
--cache-to type=registry,ref=${{ env.IMAGE }}:buildcache,mode=max \
158-
--tag ${{ env.IMAGE }}:latest \
159-
--file docker/Dockerfile.builder \
160-
--push \
161-
.
138+
- name: Build and export ORFS image
139+
uses: docker/build-push-action@v6
140+
with:
141+
context: .
142+
push: true
143+
tags: ${{ env.IMAGE }}:latest
144+
file: docker/Dockerfile.builder
145+
build-args: |
146+
fromImage=${{ env.IMAGE_DEPS }}
147+
numThreads=${{ env.NUM_THREADS }}
148+
cache-from: type=registry,ref=${{ env.IMAGE }}:buildcache
149+
cache-to: type=registry,ref=${{ env.IMAGE }}:buildcache,mode=max

tools/codespace/Dockerfile-lxqt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) 2024 Antmicro <www.antmicro.com>
22
# SPDX-License-Identifier: Apache-2.0
33

4-
FROM ghcr.io/antmicro/openroad-flow-scripts:orfs
4+
FROM openroad/orfs:latest
55

66
COPY ./tools/codespace/scripts/common.sh /usr/local/bin/common.sh
77
COPY ./tools/codespace/scripts/install-desktop-deps.sh /usr/local/bin/install-desktop-deps.sh

tools/codespace/Dockerfile-orfs

Lines changed: 0 additions & 13 deletions
This file was deleted.

tools/codespace/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ First time Codespace users are encouraged to read the tutorial [creating a codes
2020

2121
### OpenROAD GUI
2222

23-
At the bottom, there should be tab `PORTS`, where you will find the `Forwarded Address`. A link labelled `Desktop (6080) is provided, which you can follow to open the OpenROAD GUI.
23+
At the bottom, there should be tab `PORTS`, where you will find the `Forwarded Address`. A link labelled `Desktop (6080)` is provided, which you can follow to open the OpenROAD GUI.
2424

2525
![open](../../docs/images/open_vnc.gif)
2626

2727
Test that the ORFS flow works by running the following commands:
2828

2929
```
30-
cd ~/OpenROAD-flow-scripts/flow
31-
. ../env.sh
30+
cd /OpenROAD-flow-scripts/flow
31+
source ../env.sh
3232
make
3333
make gui_final
3434
```

tools/codespace/scripts/install-orfs.sh

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)