From ae515c5b1ab7758e4f17c2122d56632fc5bd0e0f Mon Sep 17 00:00:00 2001 From: stnolting Date: Fri, 11 Oct 2024 16:23:27 +0200 Subject: [PATCH] [ci] remove python doit (#1055) * Update Processor.yml * Update Documentation.yml * [ci] remove python doit --- .github/workflows/Documentation.yml | 20 ++++----- .github/workflows/Processor.yml | 8 ++-- .gitignore | 6 --- do.py | 63 ----------------------------- 4 files changed, 16 insertions(+), 81 deletions(-) delete mode 100755 do.py diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 5e8fced9a..d21e053d8 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -51,11 +51,8 @@ jobs: with: fetch-depth: 0 - - name: '🐍 Install doit' - run: pip install doit - - name: '📚 Build Datasheet and User Guide (PDF and HTML)' - run: ./do.py Documentation container + run: make -C docs container - name: '📤 Upload Artifact: HTML' uses: actions/upload-artifact@v4 @@ -80,7 +77,7 @@ jobs: - name: '📥 Download Artifacts' uses: actions/download-artifact@v4 - - name: '🛠️ Organise public subdir and create a tarball' + - name: '🛠️ Organize public subdir and create a tarball' run: | mv NEORV32 public mv public/pdf ./ @@ -98,8 +95,13 @@ jobs: run: | gh release upload nightly NEORV32-SITE-nightly.tar.gz pdf/NEORV32*nightly.pdf --clobber - - name: '🐍 Install doit' - run: pip install doit - - name: '🚀 Deploy to GitHub-Pages' - run: ./do.py DeployToGitHubPages "update ${{ github.sha }}" + run: | + git init + cp ../.git/config ./.git/config + touch .nojekyll + git add . + git config --local user.email "push@gha" + git config --local user.name "GHA" + git commit -am 'update ${{ github.sha }}' + git push -u origin +HEAD:gh-pages diff --git a/.github/workflows/Processor.yml b/.github/workflows/Processor.yml index 7728608fa..ec47a46f6 100644 --- a/.github/workflows/Processor.yml +++ b/.github/workflows/Processor.yml @@ -19,6 +19,7 @@ jobs: Software: runs-on: ubuntu-latest + container: ghcr.io/stnolting/neorv32/sim steps: @@ -26,9 +27,10 @@ jobs: uses: actions/checkout@v4 - name: '⚙️ Build Software Framework Tests' - uses: docker://ghcr.io/stnolting/neorv32/sim - with: - args: ./do.py SoftwareFrameworkTests + run: | + make -C sw/example/processor_check check + make -C sw/example clean_all exe + make -C sw/bootloader clean_all info bootloader Simple: diff --git a/.gitignore b/.gitignore index f2b46f035..633ad7921 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,3 @@ -# doit databases -/.doit.db.* - -# python -__pycache__ - # generated app files *.bin *.coe diff --git a/do.py b/do.py deleted file mode 100755 index 16d66468a..000000000 --- a/do.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env python3 - -# doit - -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 - -DOIT_CONFIG = {"verbosity": 2, "action_string_formatting": "both"} - -ROOT = Path(__file__).parent - - -def task_SoftwareFrameworkTests(): - return { - "actions": [ - # Check toolchain - "make -C sw/example/processor_check check", - # Generate executables for all example projects - "make -C sw/example clean_all exe", - # Compile and install bootloader - "make -C sw/bootloader clean_all info bootloader", - ], - "doc": "Build all sw/example/*; install bootloader", - } - - -def task_Documentation(): - return { - "actions": ["make -C docs {posargs}"], - "doc": "Run a target in subdir 'doc'", - "uptodate": [False], - "pos_arg": "posargs", - } - - -def task_DeployToGitHubPages(): - cwd = str(ROOT / "public") - return { - "actions": [ - CmdAction(cmd, cwd=cwd) - for cmd in [ - "git init", - "cp ../.git/config ./.git/config", - "touch .nojekyll", - "git add .", - 'git config --local user.email "push@gha"', - 'git config --local user.name "GHA"', - "git commit -am '{posargs}'", - "git push -u origin +HEAD:gh-pages", - ] - ], - "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:]))