From e635ff51edeef1aab779a5f5dcfe549874454441 Mon Sep 17 00:00:00 2001 From: Builder212 <93960938+builderdev212@users.noreply.github.com> Date: Sat, 1 Feb 2025 13:53:39 -0500 Subject: [PATCH 01/27] Update main.yml --- .github/workflows/main.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eb77eb0..6f5581a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,18 +9,3 @@ jobs: - uses: rickstaa/action-black@v1 with: black_args: ". --check" - -name: CI -on: - push: - branches: [ main ] -jobs: - container-test-job: - runs-on: debian:12-slim - container: - image: ghcr.io/builderdev212/cocotb-runner - volumes: - - ${PWD}:/usr/src/verilogbits - steps: - - name: Run testbenches - run: cd verilogbits && pytest -n 10 From 3ae3f761666a24534cfb713ee15b4a159e451b72 Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 13:55:03 -0500 Subject: [PATCH 02/27] restructure runners --- .github/workflows/{main.yml => black.yml} | 0 .github/workflows/cocotb.yml | 14 ++++++++++++++ 2 files changed, 14 insertions(+) rename .github/workflows/{main.yml => black.yml} (100%) create mode 100644 .github/workflows/cocotb.yml diff --git a/.github/workflows/main.yml b/.github/workflows/black.yml similarity index 100% rename from .github/workflows/main.yml rename to .github/workflows/black.yml diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml new file mode 100644 index 0000000..a084844 --- /dev/null +++ b/.github/workflows/cocotb.yml @@ -0,0 +1,14 @@ +name: pytest-cocotb +on: + push: + branches: [ main ] +jobs: + container-test-job: + runs-on: debian:12-slim + container: + image: ghcr.io/builderdev212/cocotb-runner + volumes: + - ${PWD}:/usr/src/verilogbits + steps: + - name: Run testbenches + run: cd verilogbits && pytest -n 10 \ No newline at end of file From 7dc58bc5a7de0364655d045ca41f3ad3051ee355 Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 13:58:53 -0500 Subject: [PATCH 03/27] fix formatting --- problems/getting-started/output-zero/tb/constant_zero.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/problems/getting-started/output-zero/tb/constant_zero.py b/problems/getting-started/output-zero/tb/constant_zero.py index b953983..1b45d94 100644 --- a/problems/getting-started/output-zero/tb/constant_zero.py +++ b/problems/getting-started/output-zero/tb/constant_zero.py @@ -21,4 +21,6 @@ def get_signals(self): async def zero_check(self): if int(self.zero.value) != 0: - raise DataError(f"Output should always be 0, got {self.zero.value} instead.") + raise DataError( + f"Output should always be 0, got {self.zero.value} instead." + ) From 162c3d96a4510f9a278def8c8f8429d43a216870 Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 14:09:47 -0500 Subject: [PATCH 04/27] fix only running on main branch --- .github/workflows/cocotb.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index a084844..600921f 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -1,7 +1,5 @@ name: pytest-cocotb -on: - push: - branches: [ main ] +on: [push, pull_request] jobs: container-test-job: runs-on: debian:12-slim From c3511aff632e5dcc0a7943239a81eae280474a25 Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 14:13:06 -0500 Subject: [PATCH 05/27] test --- .github/workflows/cocotb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index 600921f..d6fee3d 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -2,7 +2,7 @@ name: pytest-cocotb on: [push, pull_request] jobs: container-test-job: - runs-on: debian:12-slim + runs-on: debian-latest container: image: ghcr.io/builderdev212/cocotb-runner volumes: From 34d6d037e4e0cb3e82721d8b603d2b058e29ba2a Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 14:15:39 -0500 Subject: [PATCH 06/27] move back to ubuntu --- .github/workflows/cocotb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index d6fee3d..5e44cac 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -2,7 +2,7 @@ name: pytest-cocotb on: [push, pull_request] jobs: container-test-job: - runs-on: debian-latest + runs-on: ubuntu-latest container: image: ghcr.io/builderdev212/cocotb-runner volumes: From 1af55606b5830df0e297630b9e00b6a4202758b8 Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 14:26:44 -0500 Subject: [PATCH 07/27] remove volume specification --- .github/workflows/cocotb.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index 5e44cac..3646e46 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -5,8 +5,6 @@ jobs: runs-on: ubuntu-latest container: image: ghcr.io/builderdev212/cocotb-runner - volumes: - - ${PWD}:/usr/src/verilogbits steps: - name: Run testbenches - run: cd verilogbits && pytest -n 10 \ No newline at end of file + run: pytest -n 10 \ No newline at end of file From 8af9c9357d2e53e960e5244b0e25c4300abb1dda Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 14:41:46 -0500 Subject: [PATCH 08/27] restructure test --- .github/workflows/cocotb.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index 3646e46..00011b0 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -1,10 +1,13 @@ name: pytest-cocotb on: [push, pull_request] jobs: - container-test-job: + cocotb: runs-on: ubuntu-latest - container: - image: ghcr.io/builderdev212/cocotb-runner steps: - - name: Run testbenches - run: pytest -n 10 \ No newline at end of file + - name: Checkout code + uses: actions/checkout@v3 + - name: Run pytest + uses: addnab/docker-run-action@v3 + with: + image: ghcr.io/builderdev212/cocotb-runner:latest + run: pytest -n 10 \ No newline at end of file From 650fc30b1fe8fc200139a7216b10a995e3cbd0df Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 14:50:27 -0500 Subject: [PATCH 09/27] ahhh --- .github/workflows/cocotb.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index 00011b0..92f3851 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -1,13 +1,20 @@ name: pytest-cocotb on: [push, pull_request] jobs: - cocotb: + # cocotb: + # runs-on: ubuntu-latest + # steps: + # - name: Checkout code + # uses: actions/checkout@v3 + # - name: Run pytest + # uses: builderdev212/cocotb-runner + # run: pytest -n 10 + container-test-job: runs-on: ubuntu-latest + container: + image: builderdev212/cocotb-runner + volumes: + - my_docker_volume:/usr/src/verilogbits steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Run pytest - uses: addnab/docker-run-action@v3 - with: - image: ghcr.io/builderdev212/cocotb-runner:latest - run: pytest -n 10 \ No newline at end of file + - name: Check for dockerenv file + run: cd /usr/src/verilogbits && pytest \ No newline at end of file From b4c56896633e1357ebf619c52b2ec079641f63af Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 14:51:26 -0500 Subject: [PATCH 10/27] ahhh --- .github/workflows/cocotb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index 92f3851..fcb9889 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -12,7 +12,7 @@ jobs: container-test-job: runs-on: ubuntu-latest container: - image: builderdev212/cocotb-runner + image: ghcr.io/builderdev212/cocotb-runner volumes: - my_docker_volume:/usr/src/verilogbits steps: From 5d34120f3436e9f5682238939eb5cc77822494b7 Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 14:58:16 -0500 Subject: [PATCH 11/27] restructure --- .github/workflows/cocotb.yml | 42 ++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index fcb9889..025a005 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -1,6 +1,12 @@ name: pytest-cocotb on: [push, pull_request] jobs: + cocotb: + runs-on: ubuntu-latest + container: ghcr.io/builderdev212/cocotb-runner + steps: + - uses: actions/checkout@v4 + - run: pytest # cocotb: # runs-on: ubuntu-latest # steps: @@ -9,12 +15,30 @@ jobs: # - name: Run pytest # uses: builderdev212/cocotb-runner # run: pytest -n 10 - container-test-job: - runs-on: ubuntu-latest - container: - image: ghcr.io/builderdev212/cocotb-runner - volumes: - - my_docker_volume:/usr/src/verilogbits - steps: - - name: Check for dockerenv file - run: cd /usr/src/verilogbits && pytest \ No newline at end of file + # container-test-job: + # runs-on: ubuntu-latest + # container: + # image: ghcr.io/builderdev212/cocotb-runner + # volumes: + # - my_docker_volume:/usr/src/verilogbits + # steps: + # - name: Check for dockerenv file + # run: cd /usr/src/verilogbits && pytest + + +# .docker_tmpl: &container_job +# tags: +# - podman-runner +# image: cocotb-dev:latest + +# ex: +# <<: *container_job +# rules: +# - if: $CI_COMMIT_BRANCH +# changes: +# paths: +# stage: test +# script: +# - cd +# - pytest -n 10 --retries 2 + From 149a67e990b84ef436e4879f5bddc53b9e8397dc Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 15:11:09 -0500 Subject: [PATCH 12/27] banana --- .github/workflows/cocotb.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index 025a005..1b93838 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -3,7 +3,9 @@ on: [push, pull_request] jobs: cocotb: runs-on: ubuntu-latest - container: ghcr.io/builderdev212/cocotb-runner + container: + image: ghcr.io/builderdev212/cocotb-runner + options: --user root steps: - uses: actions/checkout@v4 - run: pytest From 7e9797e0152fc88eac9002818109d7143fe9281b Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 15:14:45 -0500 Subject: [PATCH 13/27] actor --- .github/workflows/cocotb.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index 1b93838..1bd97a0 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -5,9 +5,11 @@ jobs: runs-on: ubuntu-latest container: image: ghcr.io/builderdev212/cocotb-runner - options: --user root + env: + actor: ${{ github.actor }} steps: - uses: actions/checkout@v4 + - run: ls - run: pytest # cocotb: # runs-on: ubuntu-latest From b0a4a786886a2f8e006eeb49fa86e6864173730e Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 15:16:34 -0500 Subject: [PATCH 14/27] change commit --- .github/workflows/cocotb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index 1bd97a0..c2b0f68 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -8,7 +8,7 @@ jobs: env: actor: ${{ github.actor }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@main - run: ls - run: pytest # cocotb: From b9b247a58f671dc354c07bb227270ba940b0bceb Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 15:34:40 -0500 Subject: [PATCH 15/27] container work pls --- .github/workflows/cocotb.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index c2b0f68..12249de 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -3,13 +3,9 @@ on: [push, pull_request] jobs: cocotb: runs-on: ubuntu-latest - container: - image: ghcr.io/builderdev212/cocotb-runner - env: - actor: ${{ github.actor }} + container: ghcr.io/builderdev212/cocotb-runner steps: - - uses: actions/checkout@main - - run: ls + - run: git clone https://github.com/builderdev212/verilogbits - run: pytest # cocotb: # runs-on: ubuntu-latest From 306d1ac8dbd86de8d08a5a5dc5b4891f4829bde2 Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 15:42:25 -0500 Subject: [PATCH 16/27] change container --- .github/workflows/cocotb.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index 12249de..ac894bd 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -5,8 +5,9 @@ jobs: runs-on: ubuntu-latest container: ghcr.io/builderdev212/cocotb-runner steps: - - run: git clone https://github.com/builderdev212/verilogbits - - run: pytest + - use: ghcr.io/builderdev212/cocotb-runner + run: git clone https://github.com/builderdev212/verilogbits + run: pytest # cocotb: # runs-on: ubuntu-latest # steps: From 1f7a1aa68cf87bb77b14e8bcfc4190a7e10fa1c2 Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 15:43:06 -0500 Subject: [PATCH 17/27] fix runner --- .github/workflows/cocotb.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index ac894bd..76045fd 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -6,8 +6,7 @@ jobs: container: ghcr.io/builderdev212/cocotb-runner steps: - use: ghcr.io/builderdev212/cocotb-runner - run: git clone https://github.com/builderdev212/verilogbits - run: pytest + run: git clone https://github.com/builderdev212/verilogbits && pytest # cocotb: # runs-on: ubuntu-latest # steps: From 4527d21e1b516338214eebdfd01ca2add6269b03 Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 15:44:42 -0500 Subject: [PATCH 18/27] fix invalid file --- .github/workflows/cocotb.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index 76045fd..f86171f 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -5,8 +5,11 @@ jobs: runs-on: ubuntu-latest container: ghcr.io/builderdev212/cocotb-runner steps: - - use: ghcr.io/builderdev212/cocotb-runner - run: git clone https://github.com/builderdev212/verilogbits && pytest + - name: Run testbenches + uses: ghcr.io/builderdev212/cocotb-runner + run: | + git clone https://github.com/builderdev212/verilogbits + pytest # cocotb: # runs-on: ubuntu-latest # steps: From 6db87bec61a1627ce18f4b1eb4ec8244e7dbc9aa Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 15:46:30 -0500 Subject: [PATCH 19/27] pls work --- .github/workflows/cocotb.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index f86171f..b1d7fe4 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -3,13 +3,10 @@ on: [push, pull_request] jobs: cocotb: runs-on: ubuntu-latest - container: ghcr.io/builderdev212/cocotb-runner steps: - name: Run testbenches uses: ghcr.io/builderdev212/cocotb-runner - run: | - git clone https://github.com/builderdev212/verilogbits - pytest + run: git clone https://github.com/builderdev212/verilogbits && pytest # cocotb: # runs-on: ubuntu-latest # steps: From 05b71614b116e895bafd895ff5f58fdd8bee2383 Mon Sep 17 00:00:00 2001 From: Builder212 <93960938+builderdev212@users.noreply.github.com> Date: Sat, 1 Feb 2025 15:49:33 -0500 Subject: [PATCH 20/27] Update cocotb.yml --- .github/workflows/cocotb.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index b1d7fe4..51fac36 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -5,8 +5,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Run testbenches - uses: ghcr.io/builderdev212/cocotb-runner - run: git clone https://github.com/builderdev212/verilogbits && pytest + uses: builderdev212/cocotb-runner@latest + - run: git clone https://github.com/builderdev212/verilogbits && pytest # cocotb: # runs-on: ubuntu-latest # steps: From 6a402a961c47c93eec997ea630912718e5603c03 Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 15:50:42 -0500 Subject: [PATCH 21/27] ahhhhhh --- .github/workflows/cocotb.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index 51fac36..39854fe 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -3,9 +3,8 @@ on: [push, pull_request] jobs: cocotb: runs-on: ubuntu-latest + container: builderdev212/cocotb-runner:latest steps: - - name: Run testbenches - uses: builderdev212/cocotb-runner@latest - run: git clone https://github.com/builderdev212/verilogbits && pytest # cocotb: # runs-on: ubuntu-latest From c3f5832d418220079b4929ef18cdf1d4e3c42b39 Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 15:51:58 -0500 Subject: [PATCH 22/27] update container --- .github/workflows/cocotb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index 39854fe..6ba1f8a 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -3,7 +3,7 @@ on: [push, pull_request] jobs: cocotb: runs-on: ubuntu-latest - container: builderdev212/cocotb-runner:latest + container: ghcr.io/builderdev212/cocotb-runner:latest steps: - run: git clone https://github.com/builderdev212/verilogbits && pytest # cocotb: From 7085cb7eac8295a164b11bf1f92d79465d306740 Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 15:53:55 -0500 Subject: [PATCH 23/27] check container --- .github/workflows/cocotb.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index 6ba1f8a..66556dd 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -5,6 +5,8 @@ jobs: runs-on: ubuntu-latest container: ghcr.io/builderdev212/cocotb-runner:latest steps: + - name: Check for dockerenv file + run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv) - run: git clone https://github.com/builderdev212/verilogbits && pytest # cocotb: # runs-on: ubuntu-latest From 52e957157763a3cd40c39795112921622acb865e Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 16:00:12 -0500 Subject: [PATCH 24/27] use docker-run-action --- .github/workflows/black.yml | 22 +++++++++++----------- .github/workflows/cocotb.yml | 26 +++++++++++++++++++------- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index 6f5581a..02e0e36 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -1,11 +1,11 @@ -name: python-black -on: [push, pull_request] -jobs: - linter_name: - name: runner / black formatter - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: rickstaa/action-black@v1 - with: - black_args: ". --check" +# name: python-black +# on: [push, pull_request] +# jobs: +# linter_name: +# name: runner / black formatter +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: rickstaa/action-black@v1 +# with: +# black_args: ". --check" diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index 66556dd..ae0ade7 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -1,13 +1,25 @@ -name: pytest-cocotb -on: [push, pull_request] +name: cocotb +on: push jobs: - cocotb: + cocotb-container: runs-on: ubuntu-latest - container: ghcr.io/builderdev212/cocotb-runner:latest steps: - - name: Check for dockerenv file - run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv) - - run: git clone https://github.com/builderdev212/verilogbits && pytest + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run step in container + uses: addnab/docker-run-action@v3 + with: + image: ghcr.io/builderdev212/cocotb-runner:latest + run: | + pytest +# jobs: +# cocotb-container: +# runs-on: ubuntu-latest +# container: ghcr.io/builderdev212/cocotb-runner:latest +# steps: +# - run: git clone https://github.com/builderdev212/verilogbits +# - run: pytest # cocotb: # runs-on: ubuntu-latest # steps: From 209776cce8583ffe50712113a41467dea12996f8 Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 16:04:14 -0500 Subject: [PATCH 25/27] rah --- .github/workflows/cocotb.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index ae0ade7..759bc93 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -11,7 +11,10 @@ jobs: uses: addnab/docker-run-action@v3 with: image: ghcr.io/builderdev212/cocotb-runner:latest + options: -v ${{ github.workspace }}:/usr/src/verilogbits run: | + ls + cd verilogbits pytest # jobs: # cocotb-container: From a9a1598bf23b7dea1c119d080f6b9367491c72d1 Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 16:09:49 -0500 Subject: [PATCH 26/27] add entrypoint --- .github/workflows/cocotb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index 759bc93..631232f 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -13,7 +13,7 @@ jobs: image: ghcr.io/builderdev212/cocotb-runner:latest options: -v ${{ github.workspace }}:/usr/src/verilogbits run: | - ls + . .venv/bin/activate && /bin/bash cd verilogbits pytest # jobs: From 01766027b60f5435e151fa7ddab393e8973baf5f Mon Sep 17 00:00:00 2001 From: builderdev212 Date: Sat, 1 Feb 2025 16:16:08 -0500 Subject: [PATCH 27/27] finished runners --- .github/workflows/black.yml | 22 ++++++++--------- .github/workflows/cocotb.yml | 47 ++---------------------------------- 2 files changed, 13 insertions(+), 56 deletions(-) diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index 02e0e36..6f5581a 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -1,11 +1,11 @@ -# name: python-black -# on: [push, pull_request] -# jobs: -# linter_name: -# name: runner / black formatter -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - uses: rickstaa/action-black@v1 -# with: -# black_args: ". --check" +name: python-black +on: [push, pull_request] +jobs: + linter_name: + name: runner / black formatter + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: rickstaa/action-black@v1 + with: + black_args: ". --check" diff --git a/.github/workflows/cocotb.yml b/.github/workflows/cocotb.yml index 631232f..d44af32 100644 --- a/.github/workflows/cocotb.yml +++ b/.github/workflows/cocotb.yml @@ -1,13 +1,12 @@ name: cocotb -on: push +on: [push, pull_request] jobs: cocotb-container: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - - - name: Run step in container + - name: Run pytest in container uses: addnab/docker-run-action@v3 with: image: ghcr.io/builderdev212/cocotb-runner:latest @@ -16,45 +15,3 @@ jobs: . .venv/bin/activate && /bin/bash cd verilogbits pytest -# jobs: -# cocotb-container: -# runs-on: ubuntu-latest -# container: ghcr.io/builderdev212/cocotb-runner:latest -# steps: -# - run: git clone https://github.com/builderdev212/verilogbits -# - run: pytest - # cocotb: - # runs-on: ubuntu-latest - # steps: - # - name: Checkout code - # uses: actions/checkout@v3 - # - name: Run pytest - # uses: builderdev212/cocotb-runner - # run: pytest -n 10 - # container-test-job: - # runs-on: ubuntu-latest - # container: - # image: ghcr.io/builderdev212/cocotb-runner - # volumes: - # - my_docker_volume:/usr/src/verilogbits - # steps: - # - name: Check for dockerenv file - # run: cd /usr/src/verilogbits && pytest - - -# .docker_tmpl: &container_job -# tags: -# - podman-runner -# image: cocotb-dev:latest - -# ex: -# <<: *container_job -# rules: -# - if: $CI_COMMIT_BRANCH -# changes: -# paths: -# stage: test -# script: -# - cd -# - pytest -n 10 --retries 2 -