OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [do.py] - Blame information for rev 74

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 64 zero_gravi
#!/usr/bin/env python3
2
 
3
# doit
4
 
5
from sys import executable, argv as sys_argv, exit as sys_exit
6
from os import environ
7
from pathlib import Path
8
 
9
from doit.action import CmdAction
10
from doit.cmd_base import ModuleTaskLoader
11
from doit.doit_cmd import DoitMain
12
 
13
DOIT_CONFIG = {"verbosity": 2, "action_string_formatting": "both"}
14
 
15
ROOT = Path(__file__).parent
16
 
17
 
18
def task_BuildAndInstallSoftwareFrameworkTests():
19
    return {
20
        "actions": [
21
            # Check toolchain
22
            "make -C sw/example/processor_check check",
23
            # Generate executables for all example projects
24
            "make -C sw/example clean_all exe",
25
            # Compile and install bootloader
26
            "make -C sw/bootloader clean_all info bootloader",
27
            # Compile and install test application
28
            # Redirect UART0 TX to text.io simulation output via <UART0_SIM_MODE> user flag
29
            "echo 'Compiling and installing CPU (/Processor) test application'",
30 65 zero_gravi
            "make -C sw/example/processor_check clean_all USER_FLAGS+=-DRUN_CHECK USER_FLAGS+=-DUART0_SIM_MODE USER_FLAGS+=-DUART1_SIM_MODE MARCH=rv32imac info all",
31 64 zero_gravi
        ],
32
        "doc": "Build all sw/example/*; install bootloader and processor check",
33
    }
34
 
35
 
36
def task_Documentation():
37
    return {
38
        "actions": ["make -C docs {posargs}"],
39
        "doc": "Run a target in subdir 'doc'",
40
        "uptodate": [False],
41
        "pos_arg": "posargs",
42
    }
43
 
44
 
45
def task_DeployToGitHubPages():
46
    cwd = str(ROOT / "public")
47
    return {
48
        "actions": [
49
            CmdAction(cmd, cwd=cwd)
50
            for cmd in [
51
                "git init",
52
                "cp ../.git/config ./.git/config",
53
                "touch .nojekyll",
54
                "git add .",
55
                'git config --local user.email "push@gha"',
56
                'git config --local user.name "GHA"',
57
                "git commit -am '{posargs}'",
58
                "git push -u origin +HEAD:gh-pages",
59
            ]
60
        ],
61
        "doc": "Create a clean branch in subdir 'public' and push to branch 'gh-pages'",
62
        "pos_arg": "posargs",
63
    }
64
 
65
 
66
if __name__ == '__main__':
67
    sys_exit(DoitMain(ModuleTaskLoader(globals())).run(sys_argv[1:]))

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.