From 6461462cdd255f9eb3c23650e7e9b823f9efc73d Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Thu, 21 Sep 2023 22:18:05 -0300 Subject: [PATCH 01/32] Add desktop base build & push workflow --- .gitea/workflows/release.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .gitea/workflows/release.yml diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..ddaa538 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,29 @@ +name: release + +on: + push: + branches: [ main ] + +jobs: + dockerbuild: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Authentication + uses: docker/login-action@v2 + with: + registry: git.1159.cl + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build desktop base + uses: docker/build-push-action@v4 + env: + ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119 + with: + push: true + tags: git.1159.cl/mario1159/osicstacks-base-desktop:latest + context: . + file: ./base/desktop.Dockerfile \ No newline at end of file From 375ba8da2b6f520f0afb884f2e75856aa28654ce Mon Sep 17 00:00:00 2001 From: Mario Romero Date: Fri, 22 Sep 2023 01:20:42 +0000 Subject: [PATCH 02/32] Fix indentation --- .gitea/workflows/release.yml | 56 ++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index ddaa538..872591b 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -1,29 +1,29 @@ -name: release - -on: - push: - branches: [ main ] - -jobs: - dockerbuild: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Authentication - uses: docker/login-action@v2 - with: - registry: git.1159.cl - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build desktop base - uses: docker/build-push-action@v4 - env: - ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119 - with: - push: true - tags: git.1159.cl/mario1159/osicstacks-base-desktop:latest - context: . +name: release + +on: + push: + branches: [ main ] + +jobs: + dockerbuild: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Authentication + uses: docker/login-action@v2 + with: + registry: git.1159.cl + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build desktop base + uses: docker/build-push-action@v4 + env: + ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119 + with: + push: true + tags: git.1159.cl/mario1159/osicstacks-base-desktop:latest + context: . file: ./base/desktop.Dockerfile \ No newline at end of file From d2c7a2f794903c4b5de601d2bb8f2e4785db8c9c Mon Sep 17 00:00:00 2001 From: Mario Romero Date: Fri, 22 Sep 2023 01:28:17 +0000 Subject: [PATCH 03/32] Change on push baranch for testing --- .gitea/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 872591b..565682e 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -2,7 +2,7 @@ name: release on: push: - branches: [ main ] + branches: [ cicd ] jobs: dockerbuild: From 5efe16db4f218cf1e8b89b05d76af87277904e5b Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Thu, 21 Sep 2023 22:33:31 -0300 Subject: [PATCH 04/32] Setup buildx --- .gitea/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 565682e..ed2a9b9 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -11,6 +11,9 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v2 + - name: Authentication uses: docker/login-action@v2 with: From e3ad78c3fcec6df0cbecf0c2e699a7d6bde43ad7 Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Thu, 21 Sep 2023 23:10:32 -0300 Subject: [PATCH 05/32] Change container image --- .gitea/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index ed2a9b9..9aecb92 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -7,6 +7,8 @@ on: jobs: dockerbuild: runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest steps: - name: Checkout uses: actions/checkout@v3 From 5cccc23911f243737ca00b187d234b299770dfac Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Thu, 21 Sep 2023 23:14:44 -0300 Subject: [PATCH 06/32] Specify platform --- .gitea/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 9aecb92..8e93179 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -30,5 +30,6 @@ jobs: with: push: true tags: git.1159.cl/mario1159/osicstacks-base-desktop:latest + platforms: linux/amd64 context: . file: ./base/desktop.Dockerfile \ No newline at end of file From 72c2207599ea525953e9b0413b7e83a3243d4ba9 Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Fri, 22 Sep 2023 00:14:48 -0300 Subject: [PATCH 07/32] Add setup for QEMU --- .gitea/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 8e93179..6b6a712 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -16,6 +16,9 @@ jobs: - name: Set up Docker BuildX uses: docker/setup-buildx-action@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Authentication uses: docker/login-action@v2 with: From 1361f3b0d3cf27d675238a2499f194da035358ab Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Fri, 22 Sep 2023 00:47:34 -0300 Subject: [PATCH 08/32] Specify amd64 runner --- .gitea/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 6b6a712..1c6a11b 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -5,6 +5,7 @@ on: branches: [ cicd ] jobs: + runs-on: amd64 dockerbuild: runs-on: ubuntu-latest container: From 2ea47de1044386df3760eb67b64c95f7ff420f59 Mon Sep 17 00:00:00 2001 From: Mario Romero Date: Fri, 22 Sep 2023 03:48:52 +0000 Subject: [PATCH 09/32] Fix runs-on --- .gitea/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 1c6a11b..c0a91f8 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -5,9 +5,8 @@ on: branches: [ cicd ] jobs: - runs-on: amd64 dockerbuild: - runs-on: ubuntu-latest + runs-on: [ubuntu-latest, amd64] container: image: catthehacker/ubuntu:act-latest steps: From 50cde00ffcdc7ca21e9f7aaed173d4b4b3e1bbbd Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Fri, 22 Sep 2023 01:29:02 -0300 Subject: [PATCH 10/32] Add web base image to workflow --- .gitea/workflows/release.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 1c6a11b..07e25f4 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -36,4 +36,15 @@ jobs: tags: git.1159.cl/mario1159/osicstacks-base-desktop:latest platforms: linux/amd64 context: . - file: ./base/desktop.Dockerfile \ No newline at end of file + file: ./base/desktop.Dockerfile + + - name: Build web base + uses: docker/build-push-action@v4 + env: + ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119 + with: + push: true + tags: git.1159.cl/mario1159/osicstacks-base-web:latest + platforms: linux/amd64 + context: . + file: ./base/web.Dockerfile \ No newline at end of file From 290410dad31a641596adf057e6df7e0a0dc83cf7 Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Fri, 22 Sep 2023 01:45:52 -0300 Subject: [PATCH 11/32] Add local tag --- .gitea/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 782d873..2cec832 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -32,7 +32,9 @@ jobs: ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119 with: push: true - tags: git.1159.cl/mario1159/osicstacks-base-desktop:latest + tags: | + git.1159.cl/mario1159/osicstacks-base-desktop:latest + osicstacks-base-desktop:latest platforms: linux/amd64 context: . file: ./base/desktop.Dockerfile From f932fd2899906b3e0326e920b7125e8060e1716c Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Fri, 22 Sep 2023 02:10:48 -0300 Subject: [PATCH 12/32] Edit local tag names and build without push --- .gitea/workflows/release.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 2cec832..7b85acb 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -28,24 +28,18 @@ jobs: - name: Build desktop base uses: docker/build-push-action@v4 - env: - ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119 with: - push: true - tags: | - git.1159.cl/mario1159/osicstacks-base-desktop:latest - osicstacks-base-desktop:latest + push: false + tags: osicstacks-base-desktop platforms: linux/amd64 context: . file: ./base/desktop.Dockerfile - name: Build web base uses: docker/build-push-action@v4 - env: - ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119 with: - push: true - tags: git.1159.cl/mario1159/osicstacks-base-web:latest + push: false + tags: osicstacks-base-web platforms: linux/amd64 context: . file: ./base/web.Dockerfile \ No newline at end of file From 6cb701a3db2a2ca53f48784417853ffa68a15664 Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Fri, 22 Sep 2023 02:33:57 -0300 Subject: [PATCH 13/32] Set load to true --- .gitea/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 7b85acb..a9004a0 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -30,6 +30,7 @@ jobs: uses: docker/build-push-action@v4 with: push: false + load: true tags: osicstacks-base-desktop platforms: linux/amd64 context: . From e5905debb2877793228467944bcc530529ef0dde Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Fri, 22 Sep 2023 02:53:46 -0300 Subject: [PATCH 14/32] Change driver to docker for the derived image aswell --- .gitea/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a9004a0..1dccf7f 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -40,6 +40,7 @@ jobs: uses: docker/build-push-action@v4 with: push: false + load: true tags: osicstacks-base-web platforms: linux/amd64 context: . From c5047963de40d252e21b40988b16fc263f1f66a0 Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Sat, 23 Sep 2023 21:35:19 -0300 Subject: [PATCH 15/32] Use build-args for setting multi stage push tag --- .gitea/workflows/release.yml | 14 +++++--------- base/desktop.Dockerfile | 4 ++-- base/web.Dockerfile | 3 ++- stacks/analog-heavy.Dockerfile | 2 +- stacks/analog-xk.Dockerfile | 2 +- stacks/analog-xm.Dockerfile | 2 +- stacks/digital-ator.Dockerfile | 2 +- 7 files changed, 13 insertions(+), 16 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 1dccf7f..9a5b951 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -16,9 +16,6 @@ jobs: - name: Set up Docker BuildX uses: docker/setup-buildx-action@v2 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Authentication uses: docker/login-action@v2 with: @@ -29,9 +26,8 @@ jobs: - name: Build desktop base uses: docker/build-push-action@v4 with: - push: false - load: true - tags: osicstacks-base-desktop + push: true + tags: git.1159.cl/mario1159/osicstacks-base-desktop platforms: linux/amd64 context: . file: ./base/desktop.Dockerfile @@ -39,9 +35,9 @@ jobs: - name: Build web base uses: docker/build-push-action@v4 with: - push: false - load: true - tags: osicstacks-base-web + push: true + build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-desktop + tags: git.1159.cl/mario1159/osicstacks-base-web platforms: linux/amd64 context: . file: ./base/web.Dockerfile \ No newline at end of file diff --git a/base/desktop.Dockerfile b/base/desktop.Dockerfile index 08f7ce1..00c9dab 100644 --- a/base/desktop.Dockerfile +++ b/base/desktop.Dockerfile @@ -1,6 +1,6 @@ -# OSIC Stacks - osicstacks-base-arch +# OSIC Stacks - osicstacks-base-desktop # Base image for OSIC Stacks -FROM greyltc/archlinux-aur:paru +FROM greyltc/archlinux-aur:paru as osicstacks-base-desktop # Update packages RUN pacman -Syuq --noconfirm diff --git a/base/web.Dockerfile b/base/web.Dockerfile index dfb2e5f..a6974b5 100644 --- a/base/web.Dockerfile +++ b/base/web.Dockerfile @@ -1,6 +1,7 @@ # OSIC Stacks - osicstacks-base-web # Base image for OSIC Stacks -FROM osicstacks-base-desktop +ARG BASE_IMG=osicstacks-base-desktop +FROM $BASE_IMG as osicstacks-base-web # Update packages RUN sudo pacman -Syuq --noconfirm diff --git a/stacks/analog-heavy.Dockerfile b/stacks/analog-heavy.Dockerfile index 421e97d..80bebab 100644 --- a/stacks/analog-heavy.Dockerfile +++ b/stacks/analog-heavy.Dockerfile @@ -1,6 +1,6 @@ # OSIC Stacks - analog-heavy-arch # Dev enviroment for analog circuits development using xschem and klayout. -ARG BASE_IMG=osicstacks-base-native +ARG BASE_IMG=osicstacks-base-desktop FROM $BASE_IMG as analog-heavy # Update packages diff --git a/stacks/analog-xk.Dockerfile b/stacks/analog-xk.Dockerfile index c0962e5..54ac3c9 100644 --- a/stacks/analog-xk.Dockerfile +++ b/stacks/analog-xk.Dockerfile @@ -1,6 +1,6 @@ # OSIC Stacks - analog-xk # Dev enviroment for analog circuits development using xschem and klayout. -ARG BASE_IMG=osicstacks-base-native +ARG BASE_IMG=osicstacks-base-desktop FROM $BASE_IMG as analog-xk # Update packages diff --git a/stacks/analog-xm.Dockerfile b/stacks/analog-xm.Dockerfile index 6706ff7..7bcae85 100644 --- a/stacks/analog-xm.Dockerfile +++ b/stacks/analog-xm.Dockerfile @@ -1,6 +1,6 @@ # OSIC Stacks - analog-xm # Dev enviroment for analog circuits development using xschem and magic. -ARG BASE_IMG=osicstacks-base-native +ARG BASE_IMG=osicstacks-base-desktop FROM $BASE_IMG as analog-xm # Update packages diff --git a/stacks/digital-ator.Dockerfile b/stacks/digital-ator.Dockerfile index fab0739..b045908 100644 --- a/stacks/digital-ator.Dockerfile +++ b/stacks/digital-ator.Dockerfile @@ -1,6 +1,6 @@ # OSIC Stacks - analog-xk-arch # Dev enviroment for analog circuits development using xschem and klayout. -ARG BASE_IMG=osicstacks-base-native +ARG BASE_IMG=osicstacks-base-desktop FROM $BASE_IMG as digital-ator # Update packages From 3570eed8ac0eef25c18332682f0eb75a98a05406 Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Sat, 23 Sep 2023 22:49:36 -0300 Subject: [PATCH 16/32] Add the rest of the stacks to the workflow --- .gitea/workflows/release.yml | 82 +++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 9a5b951..983b220 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -40,4 +40,84 @@ jobs: tags: git.1159.cl/mario1159/osicstacks-base-web platforms: linux/amd64 context: . - file: ./base/web.Dockerfile \ No newline at end of file + file: ./base/web.Dockerfile + + - name: Build analog-xk desktop + uses: docker/build-push-action@v4 + with: + push: true + build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-desktop + tags: git.1159.cl/mario1159/analog-xk-desktop + platforms: linux/amd64 + context: . + file: ./stacks/analog-xk.Dockerfile + + - name: Build analog-xk web + uses: docker/build-push-action@v4 + with: + push: true + build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-web + tags: git.1159.cl/mario1159/analog-xk-web + platforms: linux/amd64 + context: . + file: ./stacks/analog-xk.Dockerfile + + - name: Build analog-xm desktop + uses: docker/build-push-action@v4 + with: + push: true + build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-desktop + tags: git.1159.cl/mario1159/analog-xm-desktop + platforms: linux/amd64 + context: . + file: ./stacks/analog-xm.Dockerfile + + - name: Build analog-xm web + uses: docker/build-push-action@v4 + with: + push: true + build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-web + tags: git.1159.cl/mario1159/analog-xm-web + platforms: linux/amd64 + context: . + file: ./stacks/analog-xm.Dockerfile + + - name: Build analog-heavy desktop + uses: docker/build-push-action@v4 + with: + push: true + build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-desktop + tags: git.1159.cl/mario1159/analog-heavy-desktop + platforms: linux/amd64 + context: . + file: ./stacks/analog-heavy.Dockerfile + + - name: Build analog-heavy web + uses: docker/build-push-action@v4 + with: + push: true + build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-web + tags: git.1159.cl/mario1159/analog-heavy-web + platforms: linux/amd64 + context: . + file: ./stacks/analog-heavy.Dockerfile + + - name: Build digital-ator desktop + uses: docker/build-push-action@v4 + with: + push: true + build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-web + tags: git.1159.cl/mario1159/analog-xm-web + platforms: linux/amd64 + context: . + file: ./stacks/digital-ator.Dockerfile + + - name: Build digital-ator web + uses: docker/build-push-action@v4 + with: + push: true + build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-web + tags: git.1159.cl/mario1159/analog-xm-web + platforms: linux/amd64 + context: . + file: ./stacks/digital-ator.Dockerfile \ No newline at end of file From 5d1ef94a04d7836be22e442e6deadc871a4d224c Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Sat, 23 Sep 2023 23:25:21 -0300 Subject: [PATCH 17/32] Fix tags --- .gitea/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 983b220..64930a6 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -106,8 +106,8 @@ jobs: uses: docker/build-push-action@v4 with: push: true - build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-web - tags: git.1159.cl/mario1159/analog-xm-web + build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-desktop + tags: git.1159.cl/mario1159/digital-ator-desktop platforms: linux/amd64 context: . file: ./stacks/digital-ator.Dockerfile @@ -117,7 +117,7 @@ jobs: with: push: true build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-web - tags: git.1159.cl/mario1159/analog-xm-web + tags: git.1159.cl/mario1159/digital-ator-web platforms: linux/amd64 context: . file: ./stacks/digital-ator.Dockerfile \ No newline at end of file From 418a65185d700e14027d0ae02e1c56a263e7e200 Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Sun, 24 Sep 2023 01:10:19 -0300 Subject: [PATCH 18/32] Change on push branch to main --- .gitea/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 64930a6..c5d6be3 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -2,7 +2,7 @@ name: release on: push: - branches: [ cicd ] + branches: [ main ] jobs: dockerbuild: From 7734f733a983d5434f26d41e719dd907a7293f0f Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Sun, 24 Sep 2023 05:13:38 -0300 Subject: [PATCH 19/32] Add execution mode option --- run.ps1 | 163 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 88 insertions(+), 75 deletions(-) diff --git a/run.ps1 b/run.ps1 index 4b9670a..34109a2 100644 --- a/run.ps1 +++ b/run.ps1 @@ -1,76 +1,89 @@ -param([switch] $remote = $false) - -Write-Host "OSIC-Stacks Container Creation" -ForegroundColor Green -Write-Host "Checking requirements and WSL updates" -ForegroundColor DarkGray - -Write-Host "" -wsl --install Ubuntu --no-launch -wsl --update -Write-Host "" - -Write-Host "Please select an image index:" - -$imageoptions = @( - 'analog-xk' - 'analog-xm' - 'analog-heavy' - 'digital-ator' - 'digital-icarus' - 'digital-heavy' - 'heavy' -) - -for($i = 0; $i -lt $imageoptions.Length; $i++) { - $imageoption = $imageoptions[$i] - Write-Host "$i - $imageoption" -ForegroundColor Cyan -} - -$imageindex = Read-Host -Prompt "Container image to initialize [0-$($imageoptions.Length-1)]" -$imagename = $imageoptions[$imageindex] -$containername = Read-Host -Prompt "Container instance name [default=$imagename]" -if (!$containername) { $containername = $imagename } - -$additionaloptions = '' -if($remote) { - $image = "git.1159.cl/mario1159/$imagename" - $additionaloptions = '--pull always ' -} else { - $image = $imagename -} - -$response = Read-Host "Do you want to bind the container home directory into a windows directory? [N/y]" - - -if ($response -eq 'y') { - $directory = Read-Host "Write the windows directory destination relative to WSL, for example `"/mnt/c/Users/Username/Desktop/ExampleFolder`"`n" - mkdir -Force $directory | Out-Null - $additionaloptions = -join($additionaloptions, "-v ${directory}:/home/designer/shared ") -} - -$response = Read-Host -Prompt "Do you want to set additional arguments for the container instantiation? [N/y]" - -if ($response -eq 'y') { - $response = Read-Host -Prompt "Write the additional arguments, for example -v :." - $additionaloptions = -join($additionaloptions, $response) -} - -Write-Host "" - -$dockercommand = ("docker run -d " + - "--name $containername " + - "-v /tmp/.X11-unix:/tmp/.X11-unix " + - "-v /mnt/wslg:/mnt/wsl " + - "-e WAYLAND_DISPLAY=`$WAYLAND_DISPLAY " + - "-e DISPLAY=`$DISPLAY " + - "-e XDG_RUNTIME_DIR=/mnt/wslg " + - "$additionaloptions "+ - $image) - -wsl -d Ubuntu bash -ic $dockercommand - -if ($?) { - Write-Host "Container created successfully!" -ForegroundColor Green - Write-Host "Enter the container with `"docker exec -it $containername bash`"" -ForegroundColor DarkGray -} else { - Write-Host "Container creation failed, see logs above" -ForegroundColor Red +param([switch] $remote = $false) + +Write-Host "OSIC-Stacks Container Creation" -ForegroundColor Green +Write-Host "Checking requirements and WSL updates" -ForegroundColor DarkGray + +Write-Host "" +wsl --install Ubuntu --no-launch +wsl --update +Write-Host "" + +Write-Host "Please select an image index:" + +$stacks_options = @( + 'analog-xk' + 'analog-xm' + 'analog-heavy' + 'digital-ator' + 'digital-icarus' + 'digital-heavy' + 'heavy' +) + +for($i = 0; $i -lt $stacks_options.Length; $i++) { + $stack_option = $stacks_options[$i] + Write-Host "[$($i+1)] - $stack_option" -ForegroundColor Cyan +} + +$stack_index = Read-Host -Prompt "Container image to initialize [1-$($stacks_options.Length)]" +$selected_stack = $stacks_options[$stack_index-1] +$container_name = Read-Host -Prompt "Container instance name [default=$selected_stack]" +if (!$container_name) { $container_name = $selected_stack } + +$execmode = '' +while(!$execmode) { + Write-Host "Please select an execution mode index" + Write-Host '[1] - desktop' -ForegroundColor Cyan + Write-Host '[2] - web' -ForegroundColor Cyan + $response = Read-Host "Execution mode [1-2]" + if ($response -eq '1') { + $execmode = 'desktop' + } elseif ($response -eq '2') { + $execmode = 'web' + } else { + Write-Host "Unexpected respose, please try again" -ForegroundColor Red + } +} + +$additional_options = '' +if($remote) { + $image = "git.1159.cl/mario1159/$selected_stack-$execmode" + $additional_options = '--pull always ' +} else { + $image = "$selected_stack-$execmode" +} + +$response = Read-Host "Do you want to bind the container home directory into a windows directory? [N/y]" + +if ($response -eq 'y') { + $directory = Read-Host "Write the windows directory destination relative to WSL, for example `"/mnt/c/Users/Username/Desktop/ExampleFolder`"`n" + $additionaloptions = -join($additionaloptions, "-v ${directory}:/home/designer/shared ") +} + +$response = Read-Host -Prompt "Do you want to set additional arguments for the container instantiation? [N/y]" + +if ($response -eq 'y') { + $response = Read-Host -Prompt "Write the additional arguments, for example -v :." + $additionaloptions = -join($additionaloptions, $response) +} + +Write-Host "" + +$dockercommand = ("docker run -d " + + "--name $container_name " + + "-v /tmp/.X11-unix:/tmp/.X11-unix " + + "-v /mnt/wslg:/mnt/wsl " + + "-e WAYLAND_DISPLAY=`$WAYLAND_DISPLAY " + + "-e DISPLAY=`$DISPLAY " + + "-e XDG_RUNTIME_DIR=/mnt/wslg " + + "$additional_options "+ + $image) + +wsl -d Ubuntu bash -ic $dockercommand + +if ($?) { + Write-Host "Container created successfully!" -ForegroundColor Green + Write-Host "Enter the container with `"docker exec -it $containername bash`"" -ForegroundColor DarkGray +} else { + Write-Host "Container creation failed, see logs above" -ForegroundColor Red } \ No newline at end of file From 2d81f28b9fc62d7cab25f5bc91ebd691c7b796d4 Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Sun, 24 Sep 2023 15:26:43 -0300 Subject: [PATCH 20/32] Add editor & terminal environment variables --- base/desktop.Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base/desktop.Dockerfile b/base/desktop.Dockerfile index 00c9dab..8ee8b44 100644 --- a/base/desktop.Dockerfile +++ b/base/desktop.Dockerfile @@ -6,7 +6,8 @@ FROM greyltc/archlinux-aur:paru as osicstacks-base-desktop RUN pacman -Syuq --noconfirm # Install packages -RUN aur-install sudo git git-lfs python python-pip python-pipx xz gnu-free-fonts vim ngspice gedit jupyter-notebook +RUN aur-install sudo git git-lfs python python-pip python-pipx xz gnu-free-fonts vim ngspice gedit jupyter-notebook xterm +ENV TERM=xterm EDITOR=gedit # Clean cache RUN pacman -Scc From 3c8afae43743ad95447f34ec341ff2d03721e1ef Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Sun, 24 Sep 2023 15:48:43 -0300 Subject: [PATCH 21/32] Add the rest of the stack list --- stacks/analog-xk.Dockerfile | 4 +++- stacks/analog-xm.Dockerfile | 6 +++++- stacks/digital-ator.Dockerfile | 6 +++++- stacks/digital-heavy.Dockerfile | 30 +++++++++++++++++++++++++++ stacks/digital-icarus.Dockerfile | 29 ++++++++++++++++++++++++++ stacks/heavy.Dockerfile | 35 ++++++++++++++++++++++++++++++++ 6 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 stacks/digital-heavy.Dockerfile create mode 100644 stacks/digital-icarus.Dockerfile create mode 100644 stacks/heavy.Dockerfile diff --git a/stacks/analog-xk.Dockerfile b/stacks/analog-xk.Dockerfile index 54ac3c9..643977d 100644 --- a/stacks/analog-xk.Dockerfile +++ b/stacks/analog-xk.Dockerfile @@ -7,7 +7,9 @@ FROM $BASE_IMG as analog-xk RUN sudo pacman -Syuq --noconfirm # Install packages -RUN sudo aur-install xschem klayout +RUN sudo aur-install \ + xschem \ + klayout RUN pip install gdsfactory --break-system-packages RUN pip install gf180 --upgrade --break-system-packages diff --git a/stacks/analog-xm.Dockerfile b/stacks/analog-xm.Dockerfile index 7bcae85..b7acfc4 100644 --- a/stacks/analog-xm.Dockerfile +++ b/stacks/analog-xm.Dockerfile @@ -7,7 +7,11 @@ FROM $BASE_IMG as analog-xm RUN sudo pacman -Syuq --noconfirm # Install packages -RUN sudo aur-install xschem glu magic-git +RUN sudo aur-install \ + xschem \ + glu \ + magic-git \ + netgen-lvs-git # Clean cache RUN sudo pacman -Scc diff --git a/stacks/digital-ator.Dockerfile b/stacks/digital-ator.Dockerfile index b045908..7fcecb2 100644 --- a/stacks/digital-ator.Dockerfile +++ b/stacks/digital-ator.Dockerfile @@ -7,7 +7,11 @@ FROM $BASE_IMG as digital-ator RUN sudo pacman -Syuq --noconfirm # Install packages -RUN sudo aur-install verilator gtkwave base-devel cmake +RUN sudo aur-install \ + verilator \ + gtkwave \ + base-devel \ + cmake # Clean cache RUN sudo pacman -Scc diff --git a/stacks/digital-heavy.Dockerfile b/stacks/digital-heavy.Dockerfile new file mode 100644 index 0000000..0b9b63a --- /dev/null +++ b/stacks/digital-heavy.Dockerfile @@ -0,0 +1,30 @@ +# OSIC Stacks - analog-xk-arch +# Dev enviroment for analog circuits development using xschem and klayout. +ARG BASE_IMG=osicstacks-base-desktop +FROM $BASE_IMG as digital-heavy + +# Update packages +RUN sudo pacman -Syuq --noconfirm + +# Install packages +RUN sudo aur-install \ + verilator \ + iverilog \ + gtkwave \ + base-devel \ + cmake + +# Clean cache +RUN sudo pacman -Scc + +# - Desktop build +FROM digital-heavy as digital-heavy-desktop + +# Initialize the environment keeping container alive +CMD ["sleep", "infinity"] + +# - Web build +FROM digital-heavy as digital-heavy-web + +# Run VNC server & desktop environment +CMD ["startserver"] diff --git a/stacks/digital-icarus.Dockerfile b/stacks/digital-icarus.Dockerfile new file mode 100644 index 0000000..56fbc1e --- /dev/null +++ b/stacks/digital-icarus.Dockerfile @@ -0,0 +1,29 @@ +# OSIC Stacks - analog-xk-arch +# Dev enviroment for analog circuits development using xschem and klayout. +ARG BASE_IMG=osicstacks-base-desktop +FROM $BASE_IMG as digital-icarus + +# Update packages +RUN sudo pacman -Syuq --noconfirm + +# Install packages +RUN sudo aur-install \ + iverilog \ + gtkwave \ + base-devel \ + cmake + +# Clean cache +RUN sudo pacman -Scc + +# - Desktop build +FROM digital-icarus as digital-icarus-desktop + +# Initialize the environment keeping container alive +CMD ["sleep", "infinity"] + +# - Web build +FROM digital-icarus as digital-icarus-web + +# Run VNC server & desktop environment +CMD ["startserver"] diff --git a/stacks/heavy.Dockerfile b/stacks/heavy.Dockerfile new file mode 100644 index 0000000..f683966 --- /dev/null +++ b/stacks/heavy.Dockerfile @@ -0,0 +1,35 @@ +# OSIC Stacks - analog-xk-arch +# Dev enviroment for analog circuits development using xschem and klayout. +ARG BASE_IMG=osicstacks-base-desktop +FROM $BASE_IMG as heavy + +# Update packages +RUN sudo pacman -Syuq --noconfirm + +# Install packages +RUN sudo aur-install \ + xschem \ + glu \ + magic-git \ + klayout \ + netgen-lvs-git \ + verilator \ + iverilog \ + gtkwave \ + base-devel \ + cmake + +# Clean cache +RUN sudo pacman -Scc + +# - Desktop build +FROM heavy as heavy-desktop + +# Initialize the environment keeping container alive +CMD ["sleep", "infinity"] + +# - Web build +FROM heavy as heavy-web + +# Run VNC server & desktop environment +CMD ["startserver"] From 0ef5368c78116546fd458a60202d7c59a69cd190 Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Sun, 24 Sep 2023 15:54:09 -0300 Subject: [PATCH 22/32] Fix header comments --- stacks/analog-heavy.Dockerfile | 11 ++++++++--- stacks/analog-xk.Dockerfile | 5 +++-- stacks/analog-xm.Dockerfile | 2 +- stacks/digital-ator.Dockerfile | 4 ++-- stacks/digital-heavy.Dockerfile | 4 ++-- stacks/digital-icarus.Dockerfile | 4 ++-- stacks/heavy.Dockerfile | 4 ++-- 7 files changed, 20 insertions(+), 14 deletions(-) diff --git a/stacks/analog-heavy.Dockerfile b/stacks/analog-heavy.Dockerfile index 80bebab..268c5de 100644 --- a/stacks/analog-heavy.Dockerfile +++ b/stacks/analog-heavy.Dockerfile @@ -1,5 +1,5 @@ -# OSIC Stacks - analog-heavy-arch -# Dev enviroment for analog circuits development using xschem and klayout. +# OSIC Stacks - analog-heavy +# Dev environment for analog design. ARG BASE_IMG=osicstacks-base-desktop FROM $BASE_IMG as analog-heavy @@ -7,7 +7,12 @@ FROM $BASE_IMG as analog-heavy RUN sudo pacman -Syuq --noconfirm # Install packages -RUN sudo aur-install xschem glu magic-git klayout +RUN sudo aur-install \ + xschem \ + glu \ + magic-git \ + klayout \ + netgen-lvs-git # Clean cache RUN sudo pacman -Scc diff --git a/stacks/analog-xk.Dockerfile b/stacks/analog-xk.Dockerfile index 643977d..0c60322 100644 --- a/stacks/analog-xk.Dockerfile +++ b/stacks/analog-xk.Dockerfile @@ -1,5 +1,5 @@ # OSIC Stacks - analog-xk -# Dev enviroment for analog circuits development using xschem and klayout. +# Dev environment for analog circuits development using xschem and klayout. ARG BASE_IMG=osicstacks-base-desktop FROM $BASE_IMG as analog-xk @@ -9,7 +9,8 @@ RUN sudo pacman -Syuq --noconfirm # Install packages RUN sudo aur-install \ xschem \ - klayout + klayout \ + netgen-lvs-git RUN pip install gdsfactory --break-system-packages RUN pip install gf180 --upgrade --break-system-packages diff --git a/stacks/analog-xm.Dockerfile b/stacks/analog-xm.Dockerfile index b7acfc4..e636291 100644 --- a/stacks/analog-xm.Dockerfile +++ b/stacks/analog-xm.Dockerfile @@ -1,5 +1,5 @@ # OSIC Stacks - analog-xm -# Dev enviroment for analog circuits development using xschem and magic. +# Dev environment for analog circuits development using xschem and magic. ARG BASE_IMG=osicstacks-base-desktop FROM $BASE_IMG as analog-xm diff --git a/stacks/digital-ator.Dockerfile b/stacks/digital-ator.Dockerfile index 7fcecb2..37a50c0 100644 --- a/stacks/digital-ator.Dockerfile +++ b/stacks/digital-ator.Dockerfile @@ -1,5 +1,5 @@ -# OSIC Stacks - analog-xk-arch -# Dev enviroment for analog circuits development using xschem and klayout. +# OSIC Stacks - digital-ator +# Dev environment for digital circuits development using verilator and yosys. ARG BASE_IMG=osicstacks-base-desktop FROM $BASE_IMG as digital-ator diff --git a/stacks/digital-heavy.Dockerfile b/stacks/digital-heavy.Dockerfile index 0b9b63a..15760f1 100644 --- a/stacks/digital-heavy.Dockerfile +++ b/stacks/digital-heavy.Dockerfile @@ -1,5 +1,5 @@ -# OSIC Stacks - analog-xk-arch -# Dev enviroment for analog circuits development using xschem and klayout. +# OSIC Stacks - digital-heavy +# Dev environment for digital design. ARG BASE_IMG=osicstacks-base-desktop FROM $BASE_IMG as digital-heavy diff --git a/stacks/digital-icarus.Dockerfile b/stacks/digital-icarus.Dockerfile index 56fbc1e..26e364c 100644 --- a/stacks/digital-icarus.Dockerfile +++ b/stacks/digital-icarus.Dockerfile @@ -1,5 +1,5 @@ -# OSIC Stacks - analog-xk-arch -# Dev enviroment for analog circuits development using xschem and klayout. +# OSIC Stacks - digital-icarus +# Dev environment for digital circuits development using icarus verilog and yosys. ARG BASE_IMG=osicstacks-base-desktop FROM $BASE_IMG as digital-icarus diff --git a/stacks/heavy.Dockerfile b/stacks/heavy.Dockerfile index f683966..cd0a0de 100644 --- a/stacks/heavy.Dockerfile +++ b/stacks/heavy.Dockerfile @@ -1,5 +1,5 @@ -# OSIC Stacks - analog-xk-arch -# Dev enviroment for analog circuits development using xschem and klayout. +# OSIC Stacks - heavy +# Dev environment for ic design. ARG BASE_IMG=osicstacks-base-desktop FROM $BASE_IMG as heavy From 35262c235f52fba75e92cb1194d4e5e272fe4324 Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Sun, 24 Sep 2023 15:56:48 -0300 Subject: [PATCH 23/32] Specify file endings --- .gitattributes | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitattributes b/.gitattributes index 2d83761..c139350 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,11 @@ +# Auto detect text files and perform LF normalization +* text=auto .png filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.sh text eol=lf +*.bat text eol=crlf +desktopinit text eol=lf +klayout text eol=lf +setwallpaper text eol=lf +startserver text eol=lf +*.desktop text eol=lf \ No newline at end of file From 476604e88ecf396f7b2a2d4621327aafc7dad991 Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Sun, 24 Sep 2023 16:15:46 -0300 Subject: [PATCH 24/32] Add digital-icarus digital-heavy & heavy to the CI workflow --- .gitea/workflows/release.yml | 62 +++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index c5d6be3..61456ff 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -120,4 +120,64 @@ jobs: tags: git.1159.cl/mario1159/digital-ator-web platforms: linux/amd64 context: . - file: ./stacks/digital-ator.Dockerfile \ No newline at end of file + file: ./stacks/digital-ator.Dockerfile + + - name: Build digital-icarus desktop + uses: docker/build-push-action@v4 + with: + push: true + build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-desktop + tags: git.1159.cl/mario1159/digital-icarus-desktop + platforms: linux/amd64 + context: . + file: ./stacks/digital-icarus.Dockerfile + + - name: Build digital-icarus web + uses: docker/build-push-action@v4 + with: + push: true + build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-icarus + tags: git.1159.cl/mario1159/digital-icarus-web + platforms: linux/amd64 + context: . + file: ./stacks/digital-icarus.Dockerfile + + - name: Build digital-heavy desktop + uses: docker/build-push-action@v4 + with: + push: true + build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-desktop + tags: git.1159.cl/mario1159/digital-heavy-desktop + platforms: linux/amd64 + context: . + file: ./stacks/digital-heavy.Dockerfile + + - name: Build digital-heavy web + uses: docker/build-push-action@v4 + with: + push: true + build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-web + tags: git.1159.cl/mario1159/digital-heavy-web + platforms: linux/amd64 + context: . + file: ./stacks/digital-heavy.Dockerfile + + - name: Build heavy desktop + uses: docker/build-push-action@v4 + with: + push: true + build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-desktop + tags: git.1159.cl/mario1159/heavy-desktop + platforms: linux/amd64 + context: . + file: ./stacks/heavy.Dockerfile + + - name: Build heavy web + uses: docker/build-push-action@v4 + with: + push: true + build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-web + tags: git.1159.cl/mario1159/heavy-web + platforms: linux/amd64 + context: . + file: ./stacks/heavy.Dockerfile \ No newline at end of file From 78b53daa6958dcf06ca78fbc28024be13db00813 Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Sun, 24 Sep 2023 17:28:15 -0300 Subject: [PATCH 25/32] Fix icarus web build arg --- .gitea/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 61456ff..0a7ea80 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -136,7 +136,7 @@ jobs: uses: docker/build-push-action@v4 with: push: true - build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-icarus + build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-web tags: git.1159.cl/mario1159/digital-icarus-web platforms: linux/amd64 context: . From eef34201dea5b5171c4c94d3cafa3c24c55a4a6b Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Sun, 24 Sep 2023 18:26:07 -0300 Subject: [PATCH 26/32] Parallelize CI jobs --- .gitea/workflows/release.yml | 134 ++++++++++++++++++++++++++++++++++- 1 file changed, 133 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 0a7ea80..5eadff6 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -5,7 +5,7 @@ on: branches: [ main ] jobs: - dockerbuild: + build-base: runs-on: [ubuntu-latest, amd64] container: image: catthehacker/ubuntu:act-latest @@ -42,6 +42,25 @@ jobs: context: . file: ./base/web.Dockerfile + build-analog-xk: + needs: build-base + runs-on: [ubuntu-latest, amd64] + container: + image: catthehacker/ubuntu:act-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v2 + + - name: Authentication + uses: docker/login-action@v2 + with: + registry: git.1159.cl + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build analog-xk desktop uses: docker/build-push-action@v4 with: @@ -62,6 +81,24 @@ jobs: context: . file: ./stacks/analog-xk.Dockerfile + build-analog-xm: + needs: build-base + runs-on: [ubuntu-latest, amd64] + container: + image: catthehacker/ubuntu:act-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v2 + + - name: Authentication + uses: docker/login-action@v2 + with: + registry: git.1159.cl + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Build analog-xm desktop uses: docker/build-push-action@v4 with: @@ -82,6 +119,25 @@ jobs: context: . file: ./stacks/analog-xm.Dockerfile + build-analog-heavy: + needs: build-base + runs-on: [ubuntu-latest, amd64] + container: + image: catthehacker/ubuntu:act-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v2 + + - name: Authentication + uses: docker/login-action@v2 + with: + registry: git.1159.cl + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build analog-heavy desktop uses: docker/build-push-action@v4 with: @@ -102,6 +158,25 @@ jobs: context: . file: ./stacks/analog-heavy.Dockerfile + build-digital-ator: + needs: build-base + runs-on: [ubuntu-latest, amd64] + container: + image: catthehacker/ubuntu:act-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v2 + + - name: Authentication + uses: docker/login-action@v2 + with: + registry: git.1159.cl + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build digital-ator desktop uses: docker/build-push-action@v4 with: @@ -122,6 +197,25 @@ jobs: context: . file: ./stacks/digital-ator.Dockerfile + build-digital-icarus: + needs: build-base + runs-on: [ubuntu-latest, amd64] + container: + image: catthehacker/ubuntu:act-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v2 + + - name: Authentication + uses: docker/login-action@v2 + with: + registry: git.1159.cl + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build digital-icarus desktop uses: docker/build-push-action@v4 with: @@ -142,6 +236,25 @@ jobs: context: . file: ./stacks/digital-icarus.Dockerfile + build-digital-heavy: + needs: build-base + runs-on: [ubuntu-latest, amd64] + container: + image: catthehacker/ubuntu:act-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v2 + + - name: Authentication + uses: docker/login-action@v2 + with: + registry: git.1159.cl + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build digital-heavy desktop uses: docker/build-push-action@v4 with: @@ -162,6 +275,25 @@ jobs: context: . file: ./stacks/digital-heavy.Dockerfile + build-heavy: + needs: build-base + runs-on: [ubuntu-latest, amd64] + container: + image: catthehacker/ubuntu:act-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v2 + + - name: Authentication + uses: docker/login-action@v2 + with: + registry: git.1159.cl + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build heavy desktop uses: docker/build-push-action@v4 with: From 701a6d29557147e46dc0d37501a42758faaba340 Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Sun, 24 Sep 2023 19:36:58 -0300 Subject: [PATCH 27/32] Update README --- README.md | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 8637df4..38f2a4e 100644 --- a/README.md +++ b/README.md @@ -32,43 +32,55 @@ include_toc: true Follow these 3 steps to get your container ready. -### 1. Starting a container with graphics output +### 1. Starting a container + +There are two ways to start your container. You can choose (a) to start your container in your actual **desktop** environment and launch the applications from your integrated terminal or (b) you can launch a whole linux desktop environment that can be accessed through a **web** browser. + +> Before following the next steps make sure you have docker running. + +#### 1a. Starting a container in your **desktop** with native graphics output Scripts are provided for creating the containers in both Windows and Linux. These scripts automate the binding of graphics environment variables to the container in order to enable graphics inside the docker container. -#### Windows +##### Windows -Execute the next script in powershell. +Execute the next script in powershell and follow the container initialization prompt. ```pwsh & ([scriptblock]::Create((irm https://git.1159.cl/Mario1159/osic-stacks/raw/branch/main/run.ps1))) -remote ``` - This script will run the container inside wsl and bind the enviroments variables for [wslg](https://github.com/microsoft/wslg/blob/main/samples/container/Containers.md). + This script will run the container inside WSL and bind the enviroments variables for [WSLg](https://github.com/microsoft/wslg/blob/main/samples/container/Containers.md). -#### Linux -Execute the next script in your terminal replacing `` and ``. +##### Linux +Execute the next script in your terminal replacing `` by any name and `` by an stack from the previous [stack list](#user-content-stacks). ```sh -docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --name +docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --name git.1159.cl/mario1159/-desktop ``` > For Wayland compositors make sure you have XWayland installed -#### macOS / OS X +##### macOS / OS X Install `Xquartz` and run the linux previous command. +#### 1b. Starting a container with a **Web** VNC client +If you prefer running the container in your web browser instead of in your integrated terminal, you can select the web flavor of any stack. In this case, it is not necessary to bind extra environment variables for enabling native graphics output. +```sh +docker run -it --name -p 8444:8444 git.1159.cl/mario1159/-web +``` + ### 2. Connecting to the container -#### Desktop +#### 2a. Desktop After creating and starting the container, enter to it executing a shell with docker. ```sh docker exec -it bash ``` -#### Web +#### 2b. Web -Connect from the web to the VNC client at `localhost:8444`. +Connect from the web to the VNC client at `https://localhost:8444`. ### 3. Configure Volare From b4db18c3624155cbfacbdb69bd35b3a0a6dc27dd Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Sun, 24 Sep 2023 19:38:01 -0300 Subject: [PATCH 28/32] Update README --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 38f2a4e..c23bb99 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,11 @@ include_toc: true ## Highlights -- Simple by design, intended for ease to use. +- Intended for ease to use, have your tools integrate tightly with your PDK. - IC design tools evolve quickly, a rolling release distribution allows you to have the latest version of your tool set. - Docker images can be heavy, thus these images are distributed in stacks, choose the best fit for your task. - Flexible, these containers doesn't restrict you to extend your development environment, feel free to install your own packages. +- Choose between running your applications in a custom linux environment in your web browser or natively in your current desktop environment. ## Stacks @@ -28,6 +29,8 @@ include_toc: true - **digital-heavy**: Workflow with all the digital tools - **heavy**: Workflow with all the previous tools +> Flavors: web / desktop + ## Usage Follow these 3 steps to get your container ready. @@ -73,14 +76,15 @@ docker run -it --name -p 8444:8444 git.1159.cl/mario1159/ bash ``` #### 2b. Web -Connect from the web to the VNC client at `https://localhost:8444`. +Access from the web to the VNC client at `https://localhost:8444`. ### 3. Configure Volare @@ -105,11 +109,11 @@ After you have set up the PDK, you can finally start developing your own designs ## Installing additional packages -For the arch based images you can install packages from the official arch repository using `pacman`. +For the arch based images you can install packages from the [official arch repository](https://archlinux.org/packages/) using `pacman`. ```pacman -S ``` -or you can also install packages from the AUR using paru. +or you can also install packages from the [AUR](https://aur.archlinux.org/) using paru. ```paru ``` From 4db81df985acfdb78c5f878d82f0fd6aa4c5fa3f Mon Sep 17 00:00:00 2001 From: Mario Romero Date: Mon, 25 Sep 2023 00:15:33 +0000 Subject: [PATCH 29/32] Fix README link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c23bb99..f6f1530 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Execute the next script in powershell and follow the container initialization pr This script will run the container inside WSL and bind the enviroments variables for [WSLg](https://github.com/microsoft/wslg/blob/main/samples/container/Containers.md). ##### Linux -Execute the next script in your terminal replacing `` by any name and `` by an stack from the previous [stack list](#user-content-stacks). +Execute the next script in your terminal replacing `` by any name and `` by an stack from the previous [stack list](#stacks). ```sh docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --name git.1159.cl/mario1159/-desktop ``` From 38957d1da3c41f5a33250beed4b1f9caccb62abb Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Mon, 25 Sep 2023 03:36:31 -0300 Subject: [PATCH 30/32] Fix container name variable name --- run.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.ps1 b/run.ps1 index 34109a2..cc32f34 100644 --- a/run.ps1 +++ b/run.ps1 @@ -83,7 +83,7 @@ wsl -d Ubuntu bash -ic $dockercommand if ($?) { Write-Host "Container created successfully!" -ForegroundColor Green - Write-Host "Enter the container with `"docker exec -it $containername bash`"" -ForegroundColor DarkGray + Write-Host "Enter the container with `"docker exec -it $container_name bash`"" -ForegroundColor DarkGray } else { Write-Host "Container creation failed, see logs above" -ForegroundColor Red } \ No newline at end of file From ad84480c104e88e686ca8067de4d5f515bf49354 Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Mon, 25 Sep 2023 19:49:37 -0300 Subject: [PATCH 31/32] Fix race condition --- base/web.Dockerfile | 1 + scripts/startserver | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/base/web.Dockerfile b/base/web.Dockerfile index a6974b5..c812d5a 100644 --- a/base/web.Dockerfile +++ b/base/web.Dockerfile @@ -8,6 +8,7 @@ RUN sudo pacman -Syuq --noconfirm # Install KASM VNC server RUN paru -S --noconfirm kasmvncserver-bin +ENV DISPLAY=:1 # KASM requires the hostname binary to start RUN sudo pacman -S --noconfirm inetutils diff --git a/scripts/startserver b/scripts/startserver index 5932175..4b4380a 100644 --- a/scripts/startserver +++ b/scripts/startserver @@ -2,12 +2,18 @@ cd /home/designer # Run VNC server -export DISPLAY=:1 eval $(vncserver -dry-run) & echo -e "password\npassword\n" | vncpasswd -u designer -w -r # Wait for VNC server to start -sleep 1 +sleep 2 +while ! xset q &>/dev/null; +do +echo "XServer not responsive, retrying..." +sleep 2 +done + +echo "XServer has been found, running desktop environment" # Run desktop environment (XFCE) xfce4-session --display=$DISPLAY From b033c24143b5c73bd6a5cbb9469860dc007adbe1 Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Mon, 25 Sep 2023 19:55:05 -0300 Subject: [PATCH 32/32] Fix command argument order --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c23bb99..595b88b 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ Install `Xquartz` and run the linux previous command. #### 1b. Starting a container with a **Web** VNC client If you prefer running the container in your web browser instead of in your integrated terminal, you can select the web flavor of any stack. In this case, it is not necessary to bind extra environment variables for enabling native graphics output. ```sh -docker run -it --name -p 8444:8444 git.1159.cl/mario1159/-web +docker run -it -p 8444:8444 --name git.1159.cl/mario1159/-web ``` ### 2. Connecting to the container