Skip to content

Commit

Permalink
[doit] rename dodo.py to do.py and make it executable
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Sep 18, 2021
1 parent ff0823e commit 076920e
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/sim.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
FROM gcr.io/hdl-containers/debian/buster/sim/osvb

RUN \
--mount=type=bind,src=dodo.py,target=/opt/dodo.py,rw=true \
--mount=type=bind,src=do.py,target=/opt/do.py,rw=true \
--mount=type=bind,src=tasks,target=/opt/tasks,rw=true \
apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
Expand All @@ -18,6 +18,6 @@ RUN \
&& pip3 install doit \
&& rm -rf ~/.cache \
&& cd /opt \
&& doit SetupRISCVGCC
&& ./do.py SetupRISCVGCC

ENV PATH $PATH:/opt/riscv/bin
4 changes: 2 additions & 2 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: pip install doit

- name: '📚 Build Datasheet and User Guide (PDF and HTML)'
run: doit Documentation container
run: ./do.py Documentation container

- name: '📤 Upload Artifact: HTML'
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -100,4 +100,4 @@ jobs:
run: pip install doit

- name: '🚀 Deploy to GitHub-Pages'
run: doit DeployToGitHubPages "update ${{ github.sha }}"
run: ./do.py DeployToGitHubPages "update ${{ github.sha }}"
4 changes: 2 additions & 2 deletions .github/workflows/Implementation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: '🔧 Generate examples matrix'
id: generate
run: doit GenerateExamplesJobMatrix
run: ./do.py GenerateExamplesJobMatrix


All-in-one:
Expand All @@ -51,7 +51,7 @@ jobs:
- name: '🚧 Generate ${{ matrix.board }} ${{ matrix.design }} bitstream'
uses: docker://ghcr.io/stnolting/neorv32/impl
with:
args: doit ex:${{ matrix.board }} -d ${{ matrix.design }} clean bit
args: ./do.py ex:${{ matrix.board }} -d ${{ matrix.design }} clean bit

- name: '📤 Upload Artifact: ${{ matrix.board }} ${{ matrix.design }} bitstream and reports'
uses: actions/upload-artifact@v2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/Processor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ jobs:
- name: '⚙️ Build Software Framework Tests'
uses: docker://ghcr.io/stnolting/neorv32/sim
with:
args: doit BuildAndInstallSoftwareFrameworkTests
args: ./do.py BuildAndInstallSoftwareFrameworkTests

- name: '🚧 Run Processor Hardware Tests with shell script'
uses: docker://ghcr.io/stnolting/neorv32/sim
with:
args: doit sim:Simple
args: ./do.py sim:Simple


VUnit-Container:
Expand All @@ -54,7 +54,7 @@ jobs:
- name: '⚙️ Build and install Processor Check software'
uses: docker://ghcr.io/stnolting/neorv32/sim
with:
args: doit BuildAndInstallCheckSoftware
args: ./do.py BuildAndInstallCheckSoftware

- name: '📤 Archive Processor Check application image'
uses: actions/upload-artifact@v2
Expand All @@ -65,4 +65,4 @@ jobs:
- name: '🚧 Run Processor Hardware Tests with VUnit'
uses: docker://ghcr.io/stnolting/neorv32/sim
with:
args: doit sim:VUnit
args: ./do.py sim:VUnit
8 changes: 4 additions & 4 deletions .github/workflows/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: '🔧 Generate examples matrix'
id: generate
run: doit GenerateExamplesJobMatrix
run: ./do.py GenerateExamplesJobMatrix


Implementation:
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
run: pip install doit

- name: '🚧 Generate ${{ matrix.board }} ${{ matrix.design }} bitstream'
run: doit ex:${{ matrix.board }} -d ${{ matrix.design }} clean bit
run: ./do.py ex:${{ matrix.board }} -d ${{ matrix.design }} clean bit


Processor:
Expand Down Expand Up @@ -99,9 +99,9 @@ jobs:
run: pip install doit vunit_hdl

- name: '⚙️ Build and install Processor Check software'
run: doit BuildAndInstallCheckSoftware
run: ./do.py BuildAndInstallCheckSoftware
env:
RISCV_PREFIX: riscv64-unknown-elf-

- name: '🚧 Run Processor Hardware Tests with VUnit'
run: doit sim:VUnit -a '--ci-mode -v'
run: ./do.py sim:VUnit -a '--ci-mode -v'
4 changes: 2 additions & 2 deletions .github/workflows/riscv-arch-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:
echo "$GITHUB_WORKSPACE/riscv/bin" >> $GITHUB_PATH
echo $GITHUB_WORKSPACE
pip install doit
doit SetupRISCVGCC
./do.py SetupRISCVGCC
- name: '🔧 Setup GHDL Simulator'
uses: ghdl/setup-ghdl-ci@nightly
with:
backend: gcc

- name: '🚧 Run RISC-V Architecture Tests'
run: doit RunRISCVArchitectureTests -s ${{ matrix.suite }}
run: ./do.py RunRISCVArchitectureTests -s ${{ matrix.suite }}
10 changes: 9 additions & 1 deletion dodo.py → do.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!/usr/bin/env python3

# doit

from sys import executable
from sys import executable, argv as sys_argv, exit as sys_exit
from os import environ
from pathlib import Path

from doit.action import CmdAction
from doit.cmd_base import ModuleTaskLoader
from doit.doit_cmd import DoitMain

from tasks.examples import Example, GenerateExamplesJobMatrix, PRJ

Expand Down Expand Up @@ -212,3 +216,7 @@ def task_DeployToGitHubPages():
"doc": "Create a clean branch in subdir 'public' and push to branch 'gh-pages'",
"pos_arg": "posargs",
}


if __name__ == '__main__':
sys_exit(DoitMain(ModuleTaskLoader(globals())).run(sys_argv[1:]))

0 comments on commit 076920e

Please sign in to comment.