PCILeechFWGenerator 0.5.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pcileechfwgenerator-0.5.7/.coveragerc +28 -0
- pcileechfwgenerator-0.5.7/.dockerignore +137 -0
- pcileechfwgenerator-0.5.7/.github/ISSUE_TEMPLATE/bug_report.md +45 -0
- pcileechfwgenerator-0.5.7/.github/ISSUE_TEMPLATE/device_report.md +71 -0
- pcileechfwgenerator-0.5.7/.github/dependabot.yml +62 -0
- pcileechfwgenerator-0.5.7/.github/workflows/ci.yml +95 -0
- pcileechfwgenerator-0.5.7/.github/workflows/datadog.yml +36 -0
- pcileechfwgenerator-0.5.7/.github/workflows/jekyll-gh-pages.yml +49 -0
- pcileechfwgenerator-0.5.7/.github/workflows/release.yml +133 -0
- pcileechfwgenerator-0.5.7/.gitignore +54 -0
- pcileechfwgenerator-0.5.7/.pre-commit-config.yaml +107 -0
- pcileechfwgenerator-0.5.7/.readthedocs.yml +27 -0
- pcileechfwgenerator-0.5.7/.vscode/settings.json +8 -0
- pcileechfwgenerator-0.5.7/AUTHORS.rst +5 -0
- pcileechfwgenerator-0.5.7/CHANGELOG.rst +262 -0
- pcileechfwgenerator-0.5.7/CODE_OF_CONDUCT.md +128 -0
- pcileechfwgenerator-0.5.7/CONTRIBUTING.rst +408 -0
- pcileechfwgenerator-0.5.7/Containerfile +71 -0
- pcileechfwgenerator-0.5.7/LICENSE.txt +21 -0
- pcileechfwgenerator-0.5.7/MANIFEST.in +49 -0
- pcileechfwgenerator-0.5.7/Makefile +162 -0
- pcileechfwgenerator-0.5.7/PCILeechFWGenerator.code-workspace +11 -0
- pcileechfwgenerator-0.5.7/PKG-INFO +21 -0
- pcileechfwgenerator-0.5.7/README.md +588 -0
- pcileechfwgenerator-0.5.7/SECURITY.md +13 -0
- pcileechfwgenerator-0.5.7/boards/pcileech_100t484_x1.yaml +17 -0
- pcileechfwgenerator-0.5.7/boards/pcileech_35t325_x4.yaml +16 -0
- pcileechfwgenerator-0.5.7/boards/pcileech_75t484_x1.yaml +23 -0
- pcileechfwgenerator-0.5.7/build_vfio_constants.sh +223 -0
- pcileechfwgenerator-0.5.7/configs/devices/audio_controller.yaml +31 -0
- pcileechfwgenerator-0.5.7/configs/devices/network_card.yaml +31 -0
- pcileechfwgenerator-0.5.7/docs/CONFIG_SPACE_SHADOW.md +85 -0
- pcileechfwgenerator-0.5.7/docs/DEVELOPMENT.md +119 -0
- pcileechfwgenerator-0.5.7/docs/MANUAL_DONOR_DUMP.md +278 -0
- pcileechfwgenerator-0.5.7/docs/Makefile +29 -0
- pcileechfwgenerator-0.5.7/docs/TUI_README.md +457 -0
- pcileechfwgenerator-0.5.7/docs/_static/.gitignore +1 -0
- pcileechfwgenerator-0.5.7/docs/authors.rst +2 -0
- pcileechfwgenerator-0.5.7/docs/changelog.rst +2 -0
- pcileechfwgenerator-0.5.7/docs/conf.py +289 -0
- pcileechfwgenerator-0.5.7/docs/contributing.rst +1 -0
- pcileechfwgenerator-0.5.7/docs/index.rst +61 -0
- pcileechfwgenerator-0.5.7/docs/license.rst +7 -0
- pcileechfwgenerator-0.5.7/docs/readme.rst +2 -0
- pcileechfwgenerator-0.5.7/docs/requirements.txt +5 -0
- pcileechfwgenerator-0.5.7/entrypoint.sh +79 -0
- pcileechfwgenerator-0.5.7/examples/pcileech_generation_example.py +295 -0
- pcileechfwgenerator-0.5.7/force_vfio_binds.sh +105 -0
- pcileechfwgenerator-0.5.7/generate.py +20 -0
- pcileechfwgenerator-0.5.7/install-sudo-wrapper.sh +45 -0
- pcileechfwgenerator-0.5.7/junit-unit.xml +34 -0
- pcileechfwgenerator-0.5.7/mypy_dev.ini +11 -0
- pcileechfwgenerator-0.5.7/patch_vfio_constants.py +172 -0
- pcileechfwgenerator-0.5.7/pcileech/bar_layout_pkg.svh +270 -0
- pcileechfwgenerator-0.5.7/pcileech/rtl/bar_dispatcher.sv +542 -0
- pcileechfwgenerator-0.5.7/pcileech/rtl/region_data_buffer.sv +536 -0
- pcileechfwgenerator-0.5.7/pcileech/rtl/region_device_ctrl.sv +455 -0
- pcileechfwgenerator-0.5.7/pcileech/rtl/region_status.sv +507 -0
- pcileechfwgenerator-0.5.7/pcileech/rtl/tlp_frontend.sv +363 -0
- pcileechfwgenerator-0.5.7/pcileech/rtl/tlps128_bar_top.sv +630 -0
- pcileechfwgenerator-0.5.7/pcileech/sim/debug_tasks.svh +419 -0
- pcileechfwgenerator-0.5.7/pcileech/tlp_pkg.svh +341 -0
- pcileechfwgenerator-0.5.7/pcileech-build-sudo +25 -0
- pcileechfwgenerator-0.5.7/pcileech-tui-sudo +18 -0
- pcileechfwgenerator-0.5.7/pcileech_fw_generator.egg-info/PKG-INFO +495 -0
- pcileechfwgenerator-0.5.7/pcileech_fw_generator.egg-info/SOURCES.txt +67 -0
- pcileechfwgenerator-0.5.7/pcileech_fw_generator.egg-info/dependency_links.txt +1 -0
- pcileechfwgenerator-0.5.7/pcileech_fw_generator.egg-info/entry_points.txt +4 -0
- pcileechfwgenerator-0.5.7/pcileech_fw_generator.egg-info/requires.txt +24 -0
- pcileechfwgenerator-0.5.7/pcileech_fw_generator.egg-info/top_level.txt +1 -0
- pcileechfwgenerator-0.5.7/pcileech_generate.py +325 -0
- pcileechfwgenerator-0.5.7/pyproject.toml +9 -0
- pcileechfwgenerator-0.5.7/pytest.ini +30 -0
- pcileechfwgenerator-0.5.7/requirements-dev.txt +41 -0
- pcileechfwgenerator-0.5.7/requirements-test.txt +44 -0
- pcileechfwgenerator-0.5.7/requirements-tui.txt +17 -0
- pcileechfwgenerator-0.5.7/requirements.txt +20 -0
- pcileechfwgenerator-0.5.7/scripts/build_container.sh +281 -0
- pcileechfwgenerator-0.5.7/scripts/build_release.sh +325 -0
- pcileechfwgenerator-0.5.7/scripts/generate_pypi_package.py +753 -0
- pcileechfwgenerator-0.5.7/scripts/pypi_build.sh +21 -0
- pcileechfwgenerator-0.5.7/scripts/release.py +290 -0
- pcileechfwgenerator-0.5.7/scripts/test_capability_pruning.py +243 -0
- pcileechfwgenerator-0.5.7/scripts/test_package_build.py +78 -0
- pcileechfwgenerator-0.5.7/scripts/validate_constraints.py +238 -0
- pcileechfwgenerator-0.5.7/scripts/validate_production_config.py +232 -0
- pcileechfwgenerator-0.5.7/setup.cfg +78 -0
- pcileechfwgenerator-0.5.7/setup.py +22 -0
- pcileechfwgenerator-0.5.7/src/PCILeechFWGenerator.egg-info/PKG-INFO +21 -0
- pcileechfwgenerator-0.5.7/src/PCILeechFWGenerator.egg-info/SOURCES.txt +292 -0
- pcileechfwgenerator-0.5.7/src/PCILeechFWGenerator.egg-info/dependency_links.txt +1 -0
- pcileechfwgenerator-0.5.7/src/PCILeechFWGenerator.egg-info/entry_points.txt +6 -0
- pcileechfwgenerator-0.5.7/src/PCILeechFWGenerator.egg-info/not-zip-safe +1 -0
- pcileechfwgenerator-0.5.7/src/PCILeechFWGenerator.egg-info/requires.txt +8 -0
- pcileechfwgenerator-0.5.7/src/PCILeechFWGenerator.egg-info/top_level.txt +10 -0
- pcileechfwgenerator-0.5.7/src/__init__.py +88 -0
- pcileechfwgenerator-0.5.7/src/__version__.py +16 -0
- pcileechfwgenerator-0.5.7/src/build.py +537 -0
- pcileechfwgenerator-0.5.7/src/build_cli.py +62 -0
- pcileechfwgenerator-0.5.7/src/build_helpers.py +164 -0
- pcileechfwgenerator-0.5.7/src/cli/__init__.py +17 -0
- pcileechfwgenerator-0.5.7/src/cli/build_wrapper.py +41 -0
- pcileechfwgenerator-0.5.7/src/cli/cli.py +222 -0
- pcileechfwgenerator-0.5.7/src/cli/config.py +66 -0
- pcileechfwgenerator-0.5.7/src/cli/container.py +322 -0
- pcileechfwgenerator-0.5.7/src/cli/device_prioritizer.py +91 -0
- pcileechfwgenerator-0.5.7/src/cli/flash.py +116 -0
- pcileechfwgenerator-0.5.7/src/cli/vfio.py +87 -0
- pcileechfwgenerator-0.5.7/src/cli/vfio_constants.py +160 -0
- pcileechfwgenerator-0.5.7/src/cli/vfio_diagnostics.py +889 -0
- pcileechfwgenerator-0.5.7/src/cli/vfio_handler.py +852 -0
- pcileechfwgenerator-0.5.7/src/cli/vfio_helpers.py +524 -0
- pcileechfwgenerator-0.5.7/src/device_clone/__init__.py +95 -0
- pcileechfwgenerator-0.5.7/src/device_clone/behavior_profiler.py +1634 -0
- pcileechfwgenerator-0.5.7/src/device_clone/board_config.py +310 -0
- pcileechfwgenerator-0.5.7/src/device_clone/config_space_manager.py +1057 -0
- pcileechfwgenerator-0.5.7/src/device_clone/constants.py +92 -0
- pcileechfwgenerator-0.5.7/src/device_clone/device_config.py +504 -0
- pcileechfwgenerator-0.5.7/src/device_clone/fallback_manager.py +182 -0
- pcileechfwgenerator-0.5.7/src/device_clone/manufacturing_variance.py +761 -0
- pcileechfwgenerator-0.5.7/src/device_clone/msix_capability.py +521 -0
- pcileechfwgenerator-0.5.7/src/device_clone/pcileech_context.py +1986 -0
- pcileechfwgenerator-0.5.7/src/device_clone/pcileech_generator.py +1047 -0
- pcileechfwgenerator-0.5.7/src/device_clone/string_utils.py +33 -0
- pcileechfwgenerator-0.5.7/src/device_clone/variance_manager.py +212 -0
- pcileechfwgenerator-0.5.7/src/donor_dump/Makefile +99 -0
- pcileechfwgenerator-0.5.7/src/donor_dump/donor_dump.c +416 -0
- pcileechfwgenerator-0.5.7/src/error_utils.py +68 -0
- pcileechfwgenerator-0.5.7/src/exceptions.py +132 -0
- pcileechfwgenerator-0.5.7/src/file_management/__init__.py +23 -0
- pcileechfwgenerator-0.5.7/src/file_management/donor_dump_manager.py +1295 -0
- pcileechfwgenerator-0.5.7/src/file_management/file_manager.py +810 -0
- pcileechfwgenerator-0.5.7/src/file_management/option_rom_manager.py +525 -0
- pcileechfwgenerator-0.5.7/src/file_management/repo_manager.py +346 -0
- pcileechfwgenerator-0.5.7/src/flash_fpga.py +38 -0
- pcileechfwgenerator-0.5.7/src/generate_cli.py +55 -0
- pcileechfwgenerator-0.5.7/src/import_utils.py +107 -0
- pcileechfwgenerator-0.5.7/src/log_config.py +111 -0
- pcileechfwgenerator-0.5.7/src/pci_capability/__init__.py +79 -0
- pcileechfwgenerator-0.5.7/src/pci_capability/_pruning.py +382 -0
- pcileechfwgenerator-0.5.7/src/pci_capability/compat.py +465 -0
- pcileechfwgenerator-0.5.7/src/pci_capability/constants.py +131 -0
- pcileechfwgenerator-0.5.7/src/pci_capability/core.py +469 -0
- pcileechfwgenerator-0.5.7/src/pci_capability/msix.py +432 -0
- pcileechfwgenerator-0.5.7/src/pci_capability/patches.py +536 -0
- pcileechfwgenerator-0.5.7/src/pci_capability/processor.py +595 -0
- pcileechfwgenerator-0.5.7/src/pci_capability/rules.py +482 -0
- pcileechfwgenerator-0.5.7/src/pci_capability/types.py +134 -0
- pcileechfwgenerator-0.5.7/src/pci_capability/utils.py +261 -0
- pcileechfwgenerator-0.5.7/src/scripts/__init__.py +8 -0
- pcileechfwgenerator-0.5.7/src/scripts/driver_scrape.py +682 -0
- pcileechfwgenerator-0.5.7/src/scripts/kernel_utils.py +312 -0
- pcileechfwgenerator-0.5.7/src/scripts/state_machine_extractor.py +851 -0
- pcileechfwgenerator-0.5.7/src/shell.py +96 -0
- pcileechfwgenerator-0.5.7/src/string_utils.py +741 -0
- pcileechfwgenerator-0.5.7/src/templates/README.md +95 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/advanced_controller.sv.j2 +80 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/bar_controller.sv.j2 +211 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/basic_bar_controller.sv.j2 +52 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/cfg_shadow.sv.j2 +255 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/clock_crossing.sv.j2 +50 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/clock_domain_logic.sv.j2 +20 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/device_config.sv.j2 +31 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/device_specific_ports.sv.j2 +25 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/error_counters.sv.j2 +14 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/error_declarations.sv.j2 +26 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/error_detection.sv.j2 +64 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/error_handling.sv.j2 +128 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/error_handling_complete.sv.j2 +14 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/error_injection.sv.j2 +24 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/error_logging.sv.j2 +22 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/error_outputs.sv.j2 +14 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/error_state_machine.sv.j2 +83 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/interrupt_logic.sv.j2 +38 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/main_module.sv.j2 +257 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/msix_capability_registers.sv.j2 +120 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/msix_implementation.sv.j2 +130 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/msix_table.sv.j2 +242 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/option_rom_bar_window.sv.j2 +128 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/option_rom_spi_flash.sv.j2 +527 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/pcileech_cfgspace.coe.j2 +242 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/pcileech_fifo.sv.j2 +297 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/pcileech_tlps128_bar_controller.sv.j2 +867 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/performance_counters.sv.j2 +333 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/pmcsr_stub.sv.j2 +94 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/power_declarations.sv.j2 +19 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/power_integration.sv.j2 +56 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/power_management.sv.j2 +95 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/read_logic.sv.j2 +35 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/register_declarations.sv.j2 +97 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/register_logic.sv.j2 +59 -0
- pcileechfwgenerator-0.5.7/src/templates/sv/top_level_wrapper.sv.j2 +200 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/bitstream.j2 +161 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/common/header.j2 +25 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/constraints.j2 +130 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/device_setup.j2 +229 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/header.j2 +25 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/implementation.j2 +48 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/ip_config.j2 +93 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/ip_config_axi_pcie.j2 +33 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/ip_config_pcie7x.j2 +57 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/ip_config_ultrascale.j2 +46 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/master_build.j2 +329 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/pcileech_build.j2 +271 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/pcileech_build_script.tcl.j2 +90 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/pcileech_constraints.j2 +109 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/pcileech_generate_project.j2 +230 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/pcileech_implementation.j2 +102 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/pcileech_project_setup.j2 +68 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/pcileech_sources.j2 +118 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/project_setup.j2 +41 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/sources.j2 +64 -0
- pcileechfwgenerator-0.5.7/src/templates/tcl/synthesis.j2 +71 -0
- pcileechfwgenerator-0.5.7/src/templates/template_mapping.py +116 -0
- pcileechfwgenerator-0.5.7/src/templating/__init__.py +50 -0
- pcileechfwgenerator-0.5.7/src/templating/advanced_sv_error.py +123 -0
- pcileechfwgenerator-0.5.7/src/templating/advanced_sv_features.py +274 -0
- pcileechfwgenerator-0.5.7/src/templating/advanced_sv_generator.py +276 -0
- pcileechfwgenerator-0.5.7/src/templating/advanced_sv_perf.py +423 -0
- pcileechfwgenerator-0.5.7/src/templating/advanced_sv_power.py +167 -0
- pcileechfwgenerator-0.5.7/src/templating/systemverilog_generator.py +912 -0
- pcileechfwgenerator-0.5.7/src/templating/tcl_builder.py +876 -0
- pcileechfwgenerator-0.5.7/src/templating/template_renderer.py +411 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/python/build_integration.py.j2 +90 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/python/pcileech_build_integration.py.j2 +228 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/advanced/advanced_controller.sv.j2 +80 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/advanced/clock_crossing.sv.j2 +50 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/advanced/error_counters.sv.j2 +14 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/advanced/error_declarations.sv.j2 +26 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/advanced/error_detection.sv.j2 +64 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/advanced/error_handling.sv.j2 +128 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/advanced/error_handling_complete.sv.j2 +14 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/advanced/error_injection.sv.j2 +24 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/advanced/error_logging.sv.j2 +22 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/advanced/error_outputs.sv.j2 +14 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/advanced/error_state_machine.sv.j2 +83 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/advanced/main_module.sv.j2 +257 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/advanced/performance_counters.sv.j2 +333 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/advanced/power_management.sv.j2 +95 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/bar_controller.sv.j2 +211 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/basic_bar_controller.sv.j2 +52 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/cfg_shadow.sv.j2 +255 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/components/clock_domain_logic.sv.j2 +20 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/components/device_specific_ports.sv.j2 +25 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/components/interrupt_logic.sv.j2 +38 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/components/power_declarations.sv.j2 +19 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/components/power_integration.sv.j2 +56 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/components/read_logic.sv.j2 +35 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/components/register_declarations.sv.j2 +97 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/components/register_logic.sv.j2 +59 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/device_config.sv.j2 +31 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/modules/pmcsr_stub.sv.j2 +94 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/msix_capability_registers.sv.j2 +120 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/msix_implementation.sv.j2 +130 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/msix_table.sv.j2 +242 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/option_rom_bar_window.sv.j2 +128 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/option_rom_spi_flash.sv.j2 +527 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/pcileech_cfgspace.coe.j2 +242 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/pcileech_fifo.sv.j2 +297 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/pcileech_tlps128_bar_controller.sv.j2 +867 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/systemverilog/top_level_wrapper.sv.j2 +200 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/tcl/pcileech_build.j2 +271 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/tcl/pcileech_build_script.tcl.j2 +90 -0
- pcileechfwgenerator-0.5.7/src/templating/templates/tcl/pcileech_generate_project.j2 +230 -0
- pcileechfwgenerator-0.5.7/src/tui/__init__.py +13 -0
- pcileechfwgenerator-0.5.7/src/tui/core/__init__.py +13 -0
- pcileechfwgenerator-0.5.7/src/tui/core/build_orchestrator.py +1031 -0
- pcileechfwgenerator-0.5.7/src/tui/core/config_manager.py +616 -0
- pcileechfwgenerator-0.5.7/src/tui/core/device_manager.py +574 -0
- pcileechfwgenerator-0.5.7/src/tui/core/status_monitor.py +404 -0
- pcileechfwgenerator-0.5.7/src/tui/main.py +1233 -0
- pcileechfwgenerator-0.5.7/src/tui/models/__init__.py +18 -0
- pcileechfwgenerator-0.5.7/src/tui/models/config.py +268 -0
- pcileechfwgenerator-0.5.7/src/tui/models/device.py +136 -0
- pcileechfwgenerator-0.5.7/src/tui/models/error.py +190 -0
- pcileechfwgenerator-0.5.7/src/tui/models/progress.py +126 -0
- pcileechfwgenerator-0.5.7/src/tui/styles/main.tcss +290 -0
- pcileechfwgenerator-0.5.7/src/tui_cli.py +74 -0
- pcileechfwgenerator-0.5.7/src/vivado_handling/__init__.py +28 -0
- pcileechfwgenerator-0.5.7/src/vivado_handling/vivado_build_with_errors.py +132 -0
- pcileechfwgenerator-0.5.7/src/vivado_handling/vivado_error_reporter.py +916 -0
- pcileechfwgenerator-0.5.7/src/vivado_handling/vivado_utils.py +293 -0
- pcileechfwgenerator-0.5.7/test.tcl +4 -0
- pcileechfwgenerator-0.5.7/tests/conftest.py +10 -0
- pcileechfwgenerator-0.5.7/tests/run_unit_tests.py +318 -0
- pcileechfwgenerator-0.5.7/tests/test_config_space_manager.py +287 -0
- pcileechfwgenerator-0.5.7/tests/test_device_config.py +426 -0
- pcileechfwgenerator-0.5.7/tests/test_manufacturing_variance.py +908 -0
- pcileechfwgenerator-0.5.7/tests/test_template_renderer.py +249 -0
- pcileechfwgenerator-0.5.7/tox.ini +79 -0
- pcileechfwgenerator-0.5.7/tui_generate.py +143 -0
- pcileechfwgenerator-0.5.7/vfio_check.py +123 -0
- pcileechfwgenerator-0.5.7/vfio_helper.c +72 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# .coveragerc to control coverage.py
|
|
2
|
+
[run]
|
|
3
|
+
branch = True
|
|
4
|
+
source = pcileechfwgenerator
|
|
5
|
+
# omit = bad_file.py
|
|
6
|
+
|
|
7
|
+
[paths]
|
|
8
|
+
source =
|
|
9
|
+
src/
|
|
10
|
+
*/site-packages/
|
|
11
|
+
|
|
12
|
+
[report]
|
|
13
|
+
# Regexes for lines to exclude from consideration
|
|
14
|
+
exclude_lines =
|
|
15
|
+
# Have to re-enable the standard pragma
|
|
16
|
+
pragma: no cover
|
|
17
|
+
|
|
18
|
+
# Don't complain about missing debug-only code:
|
|
19
|
+
def __repr__
|
|
20
|
+
if self\.debug
|
|
21
|
+
|
|
22
|
+
# Don't complain if tests don't hit defensive assertion code:
|
|
23
|
+
raise AssertionError
|
|
24
|
+
raise NotImplementedError
|
|
25
|
+
|
|
26
|
+
# Don't complain if non-runnable code isn't run:
|
|
27
|
+
if 0:
|
|
28
|
+
if __name__ == .__main__.:
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Git files and version control
|
|
2
|
+
.git/
|
|
3
|
+
.gitignore
|
|
4
|
+
.gitattributes
|
|
5
|
+
.gitmodules
|
|
6
|
+
|
|
7
|
+
# Documentation and markdown files
|
|
8
|
+
README.md
|
|
9
|
+
*.md
|
|
10
|
+
docs/
|
|
11
|
+
CHANGELOG*
|
|
12
|
+
CONTRIBUTING*
|
|
13
|
+
AUTHORS*
|
|
14
|
+
|
|
15
|
+
# Build artifacts and output
|
|
16
|
+
output/
|
|
17
|
+
build/
|
|
18
|
+
!src/build.py
|
|
19
|
+
dist/
|
|
20
|
+
*.bin
|
|
21
|
+
*.bit
|
|
22
|
+
*.log
|
|
23
|
+
*.out
|
|
24
|
+
*.exe
|
|
25
|
+
*.dll
|
|
26
|
+
*.dylib
|
|
27
|
+
*.a
|
|
28
|
+
*.lib
|
|
29
|
+
|
|
30
|
+
# Python cache and bytecode
|
|
31
|
+
__pycache__/
|
|
32
|
+
*.pyc
|
|
33
|
+
*.pyo
|
|
34
|
+
*.pyd
|
|
35
|
+
.Python
|
|
36
|
+
*.so
|
|
37
|
+
*.egg-info/
|
|
38
|
+
.pytest_cache/
|
|
39
|
+
.coverage
|
|
40
|
+
.tox/
|
|
41
|
+
.mypy_cache/
|
|
42
|
+
.dmypy.json
|
|
43
|
+
dmypy.json
|
|
44
|
+
|
|
45
|
+
# IDE and editor files
|
|
46
|
+
.vscode/
|
|
47
|
+
.idea/
|
|
48
|
+
*.swp
|
|
49
|
+
*.swo
|
|
50
|
+
*~
|
|
51
|
+
.vim/
|
|
52
|
+
.emacs.d/
|
|
53
|
+
*.sublime-*
|
|
54
|
+
|
|
55
|
+
# OS-specific files
|
|
56
|
+
.DS_Store
|
|
57
|
+
.DS_Store?
|
|
58
|
+
._*
|
|
59
|
+
.Spotlight-V100
|
|
60
|
+
.Trashes
|
|
61
|
+
ehthumbs.db
|
|
62
|
+
Thumbs.db
|
|
63
|
+
desktop.ini
|
|
64
|
+
|
|
65
|
+
# Temporary and cache files
|
|
66
|
+
*.tmp
|
|
67
|
+
*.temp
|
|
68
|
+
*.cache
|
|
69
|
+
/tmp/
|
|
70
|
+
.cache/
|
|
71
|
+
node_modules/
|
|
72
|
+
|
|
73
|
+
# Container and deployment files
|
|
74
|
+
Containerfile
|
|
75
|
+
Dockerfile*
|
|
76
|
+
.dockerignore
|
|
77
|
+
docker-compose*.yml
|
|
78
|
+
.env
|
|
79
|
+
.env.*
|
|
80
|
+
|
|
81
|
+
# Installation and setup scripts (not needed in container)
|
|
82
|
+
install.sh
|
|
83
|
+
setup.sh
|
|
84
|
+
configure.sh
|
|
85
|
+
|
|
86
|
+
# License and legal files (not needed for runtime)
|
|
87
|
+
LICENSE*
|
|
88
|
+
COPYING*
|
|
89
|
+
COPYRIGHT*
|
|
90
|
+
|
|
91
|
+
# Test files and directories
|
|
92
|
+
tests/
|
|
93
|
+
test/
|
|
94
|
+
*_test.py
|
|
95
|
+
test_*.py
|
|
96
|
+
*.test
|
|
97
|
+
|
|
98
|
+
# Configuration files that shouldn't be in container
|
|
99
|
+
.editorconfig
|
|
100
|
+
.pre-commit-config.yaml
|
|
101
|
+
pyproject.toml
|
|
102
|
+
setup.cfg
|
|
103
|
+
tox.ini
|
|
104
|
+
|
|
105
|
+
# Backup files
|
|
106
|
+
*.bak
|
|
107
|
+
*.backup
|
|
108
|
+
*.orig
|
|
109
|
+
*.rej
|
|
110
|
+
|
|
111
|
+
# Archive files
|
|
112
|
+
*.tar
|
|
113
|
+
*.tar.gz
|
|
114
|
+
*.tar.bz2
|
|
115
|
+
*.tar.xz
|
|
116
|
+
*.zip
|
|
117
|
+
*.rar
|
|
118
|
+
*.7z
|
|
119
|
+
|
|
120
|
+
# Security and secrets (extra safety)
|
|
121
|
+
*.key
|
|
122
|
+
*.pem
|
|
123
|
+
*.crt
|
|
124
|
+
*.p12
|
|
125
|
+
secrets/
|
|
126
|
+
.secrets/
|
|
127
|
+
|
|
128
|
+
flash_fpga.py
|
|
129
|
+
.github/
|
|
130
|
+
.pytest_cache/
|
|
131
|
+
.benchmarks/
|
|
132
|
+
|
|
133
|
+
# Include VFIO constants build files
|
|
134
|
+
!vfio_helper.c
|
|
135
|
+
!patch_vfio_constants.py
|
|
136
|
+
!build_vfio_constants.sh
|
|
137
|
+
!VFIO_CONSTANTS_README.md
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: 'bug'
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
*Please no uuids in this*
|
|
10
|
+
|
|
11
|
+
## 📦 Environment
|
|
12
|
+
|
|
13
|
+
Host OS:
|
|
14
|
+
e.g., Ubuntu 22.04 / Windows 11 WSL / Arch Linux
|
|
15
|
+
Python Version:
|
|
16
|
+
e.g., 3.11.8
|
|
17
|
+
Vivado Version:
|
|
18
|
+
e.g., 2022.2
|
|
19
|
+
Board Target:
|
|
20
|
+
e.g., pcileech_35t325_x4 or pcileech_75t
|
|
21
|
+
Device type
|
|
22
|
+
Audio Network etc
|
|
23
|
+
|
|
24
|
+
## 🚨Problem or Feature Description
|
|
25
|
+
|
|
26
|
+
Describe what’s happening or what you need. Include exact error messages, crash logs, or feature descriptions.
|
|
27
|
+
Please use backticks or attach txt for logs
|
|
28
|
+
|
|
29
|
+
## 🧠 Expected Behavior
|
|
30
|
+
|
|
31
|
+
What did you expect to happen?
|
|
32
|
+
e.g., “Expected synthesized firmware to build successfully with correct BAR size and MSI-X table emulated”
|
|
33
|
+
|
|
34
|
+
## 📎 Attachments (optional)
|
|
35
|
+
|
|
36
|
+
config.json
|
|
37
|
+
Synth log or crash dump (*.log)
|
|
38
|
+
Screenshot of GUI or waveform
|
|
39
|
+
Custom .tcl or .sv file
|
|
40
|
+
|
|
41
|
+
## ✅ Checklist
|
|
42
|
+
|
|
43
|
+
I’m using the latest main branch
|
|
44
|
+
I’ve checked for similar issues
|
|
45
|
+
I’ve read the relevant modules (device_emulator, cap_parser, svgen, etc
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Device Report
|
|
3
|
+
about: Submit information about a tested device
|
|
4
|
+
title: '[DEVICE] '
|
|
5
|
+
labels: device-report
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
*Please no sensitive device identifiers in this*
|
|
10
|
+
|
|
11
|
+
## 📱 Device Information
|
|
12
|
+
|
|
13
|
+
**Device Name/Model:**
|
|
14
|
+
e.g., ACME USB3380 PCIe Adapter
|
|
15
|
+
|
|
16
|
+
**Device ID (VID:PID):**
|
|
17
|
+
e.g., 1234:5678
|
|
18
|
+
|
|
19
|
+
**Device Type:**
|
|
20
|
+
e.g., USB3380, FT601, FT2232H, etc.
|
|
21
|
+
|
|
22
|
+
**Form Factor:**
|
|
23
|
+
e.g., PCIe card, USB dongle, embedded device, etc.
|
|
24
|
+
|
|
25
|
+
## 💾 Firmware Information
|
|
26
|
+
|
|
27
|
+
**Firmware Version Tested:**
|
|
28
|
+
e.g., v2.1.0
|
|
29
|
+
|
|
30
|
+
**Firmware Generated Using:**
|
|
31
|
+
e.g., PCILeechFWGenerator v1.2.3
|
|
32
|
+
|
|
33
|
+
**Generation Command Used:**
|
|
34
|
+
```
|
|
35
|
+
# Paste the exact command you used to generate the firmware
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## ⚡ Performance Metrics
|
|
39
|
+
|
|
40
|
+
**Read Speed (approx.):**
|
|
41
|
+
e.g., 150 MB/s
|
|
42
|
+
|
|
43
|
+
**Write Speed (approx.):**
|
|
44
|
+
e.g., 120 MB/s
|
|
45
|
+
|
|
46
|
+
**Max Tested DMA Size:**
|
|
47
|
+
e.g., 16 MB
|
|
48
|
+
|
|
49
|
+
## 🔄 Compatibility
|
|
50
|
+
|
|
51
|
+
**Works with PCILeech/MemProcFS:** Yes/No/Partial
|
|
52
|
+
|
|
53
|
+
**Host OS Tested:**
|
|
54
|
+
e.g., Windows 10 21H2, Ubuntu 22.04, macOS 13.1
|
|
55
|
+
|
|
56
|
+
**Target OS Tested:**
|
|
57
|
+
e.g., Windows 11, Linux kernel 6.1, etc.
|
|
58
|
+
|
|
59
|
+
## ⚠️ Issues or Limitations
|
|
60
|
+
|
|
61
|
+
Describe any issues, limitations, or special considerations for this device
|
|
62
|
+
|
|
63
|
+
## 📎 Attachments (optional)
|
|
64
|
+
|
|
65
|
+
Performance test results
|
|
66
|
+
Configuration details
|
|
67
|
+
Screenshots of device in action
|
|
68
|
+
|
|
69
|
+
## 📝 Additional Notes
|
|
70
|
+
|
|
71
|
+
Any other relevant information about this device
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# Python dependencies
|
|
4
|
+
- package-ecosystem: "pip"
|
|
5
|
+
directory: "/src"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: "weekly"
|
|
8
|
+
day: "monday"
|
|
9
|
+
open-pull-requests-limit: 10
|
|
10
|
+
labels:
|
|
11
|
+
- "dependencies"
|
|
12
|
+
- "python"
|
|
13
|
+
versioning-strategy: auto
|
|
14
|
+
ignore:
|
|
15
|
+
# Ignore patch updates for black, as formatting changes might be disruptive
|
|
16
|
+
- dependency-name: "black"
|
|
17
|
+
update-types: ["version-update:semver-patch"]
|
|
18
|
+
commit-message:
|
|
19
|
+
prefix: "pip"
|
|
20
|
+
include: "scope"
|
|
21
|
+
|
|
22
|
+
# Docker dependencies in Containerfile
|
|
23
|
+
- package-ecosystem: "docker"
|
|
24
|
+
directory: "/"
|
|
25
|
+
schedule:
|
|
26
|
+
interval: "weekly"
|
|
27
|
+
day: "tuesday"
|
|
28
|
+
open-pull-requests-limit: 5
|
|
29
|
+
labels:
|
|
30
|
+
- "dependencies"
|
|
31
|
+
- "docker"
|
|
32
|
+
commit-message:
|
|
33
|
+
prefix: "docker"
|
|
34
|
+
include: "scope"
|
|
35
|
+
|
|
36
|
+
# GitHub Actions
|
|
37
|
+
- package-ecosystem: "github-actions"
|
|
38
|
+
directory: "/"
|
|
39
|
+
schedule:
|
|
40
|
+
interval: "weekly"
|
|
41
|
+
day: "wednesday"
|
|
42
|
+
open-pull-requests-limit: 5
|
|
43
|
+
labels:
|
|
44
|
+
- "dependencies"
|
|
45
|
+
- "github-actions"
|
|
46
|
+
commit-message:
|
|
47
|
+
prefix: "github-actions"
|
|
48
|
+
include: "scope"
|
|
49
|
+
|
|
50
|
+
# Test requirements
|
|
51
|
+
- package-ecosystem: "pip"
|
|
52
|
+
directory: "/tests"
|
|
53
|
+
schedule:
|
|
54
|
+
interval: "monthly"
|
|
55
|
+
open-pull-requests-limit: 5
|
|
56
|
+
labels:
|
|
57
|
+
- "dependencies"
|
|
58
|
+
- "testing"
|
|
59
|
+
versioning-strategy: auto
|
|
60
|
+
commit-message:
|
|
61
|
+
prefix: "test-deps"
|
|
62
|
+
include: "scope"
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on: [push]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
test:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
strategy:
|
|
9
|
+
matrix:
|
|
10
|
+
python-version: ['3.9', '3.10', '3.11', '3.12']
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
16
|
+
uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: ${{ matrix.python-version }}
|
|
19
|
+
|
|
20
|
+
- name: Cache pip dependencies
|
|
21
|
+
uses: actions/cache@v4
|
|
22
|
+
with:
|
|
23
|
+
path: ~/.cache/pip
|
|
24
|
+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
|
|
25
|
+
restore-keys: |
|
|
26
|
+
${{ runner.os }}-pip-
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: |
|
|
30
|
+
python -m pip install --upgrade pip
|
|
31
|
+
pip install -r requirements-dev.txt
|
|
32
|
+
pip install types-setuptools types-psutil
|
|
33
|
+
pip install pytest-asyncio
|
|
34
|
+
|
|
35
|
+
- name: Check code formatting with black
|
|
36
|
+
run: |
|
|
37
|
+
black --check src/ tests/
|
|
38
|
+
|
|
39
|
+
- name: Check import sorting with isort
|
|
40
|
+
run: |
|
|
41
|
+
isort --check-only src/ tests/
|
|
42
|
+
|
|
43
|
+
- name: Type check with mypy
|
|
44
|
+
run: |
|
|
45
|
+
mypy --config-file mypy_dev.ini src/ --exclude 'tests/'
|
|
46
|
+
continue-on-error: true
|
|
47
|
+
|
|
48
|
+
- name: Security check with bandit
|
|
49
|
+
run: |
|
|
50
|
+
bandit -r src/ -f json -o bandit-report.json || true
|
|
51
|
+
continue-on-error: true
|
|
52
|
+
|
|
53
|
+
- name: Test with pytest
|
|
54
|
+
env:
|
|
55
|
+
CI: true
|
|
56
|
+
PYTEST_CURRENT_TEST: true
|
|
57
|
+
run: |
|
|
58
|
+
pytest tests/ -k "not tui" -m "not hardware" --cov=src --cov-report=xml --cov-report=term-missing
|
|
59
|
+
continue-on-error: true
|
|
60
|
+
|
|
61
|
+
- name: Upload coverage reports to Codecov
|
|
62
|
+
uses: codecov/codecov-action@v5
|
|
63
|
+
with:
|
|
64
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
65
|
+
slug: ramseymcgrath/PCILeechFWGenerator
|
|
66
|
+
files: ./coverage.xml
|
|
67
|
+
flags: unittests
|
|
68
|
+
fail_ci_if_error: false
|
|
69
|
+
|
|
70
|
+
docs:
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
|
|
73
|
+
steps:
|
|
74
|
+
- uses: actions/checkout@v4
|
|
75
|
+
|
|
76
|
+
- name: Set up Python
|
|
77
|
+
uses: actions/setup-python@v5
|
|
78
|
+
with:
|
|
79
|
+
python-version: '3.11'
|
|
80
|
+
|
|
81
|
+
- name: Install documentation dependencies
|
|
82
|
+
run: |
|
|
83
|
+
python -m pip install --upgrade pip
|
|
84
|
+
pip install sphinx sphinx-rtd-theme
|
|
85
|
+
pip install -r requirements.txt
|
|
86
|
+
|
|
87
|
+
- name: Check documentation build
|
|
88
|
+
run: |
|
|
89
|
+
# Create basic Sphinx documentation structure if it doesn't exist
|
|
90
|
+
if [ ! -f "docs/conf.py" ]; then
|
|
91
|
+
mkdir -p docs
|
|
92
|
+
sphinx-quickstart -q -p "PCILeech Firmware Generator" -a "Ramsey McGrath" -v "0.5.0" --ext-autodoc --ext-viewcode --makefile --no-batchfile docs
|
|
93
|
+
fi
|
|
94
|
+
# Build documentation
|
|
95
|
+
cd docs && make html || echo "Documentation build test completed"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
on: [push]
|
|
2
|
+
|
|
3
|
+
name: Datadog Software Composition Analysis
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
software-composition-analysis:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
name: Datadog SBOM Generation and Upload
|
|
9
|
+
steps:
|
|
10
|
+
- name: Checkout
|
|
11
|
+
uses: actions/checkout@v4
|
|
12
|
+
- name: Check imported libraries are secure and compliant
|
|
13
|
+
id: datadog-software-composition-analysis
|
|
14
|
+
uses: DataDog/datadog-sca-github-action@main
|
|
15
|
+
with:
|
|
16
|
+
dd_api_key: "${{ secrets.DD_API_KEY }}"
|
|
17
|
+
dd_app_key: "${{ secrets.DD_APP_KEY }}"
|
|
18
|
+
dd_site: datadoghq.com
|
|
19
|
+
continue-on-error: true
|
|
20
|
+
static-analysis:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
name: Datadog Static Analyzer
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout
|
|
25
|
+
uses: actions/checkout@v4
|
|
26
|
+
- name: Check code meets quality and security standards
|
|
27
|
+
id: datadog-static-analysis
|
|
28
|
+
uses: DataDog/datadog-static-analyzer-github-action@v1
|
|
29
|
+
with:
|
|
30
|
+
dd_api_key: ${{ secrets.DD_API_KEY }}
|
|
31
|
+
dd_app_key: ${{ secrets.DD_APP_KEY }}
|
|
32
|
+
dd_site: datadoghq.com
|
|
33
|
+
secrets_enabled: false
|
|
34
|
+
static_analysis_enabled: true
|
|
35
|
+
cpu_count: 2
|
|
36
|
+
continue-on-error: true
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
|
|
2
|
+
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
# Runs on pushes targeting the default branch
|
|
6
|
+
push:
|
|
7
|
+
branches: ["main"]
|
|
8
|
+
|
|
9
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
pages: write
|
|
16
|
+
id-token: write
|
|
17
|
+
|
|
18
|
+
concurrency:
|
|
19
|
+
group: "pages"
|
|
20
|
+
cancel-in-progress: false
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
# Build job
|
|
24
|
+
build:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- name: Checkout
|
|
28
|
+
uses: actions/checkout@v4
|
|
29
|
+
- name: Setup Pages
|
|
30
|
+
uses: actions/configure-pages@v5
|
|
31
|
+
- name: Build with Jekyll
|
|
32
|
+
uses: actions/jekyll-build-pages@v1
|
|
33
|
+
with:
|
|
34
|
+
source: ./docs
|
|
35
|
+
destination: ./_site
|
|
36
|
+
- name: Upload artifact
|
|
37
|
+
uses: actions/upload-pages-artifact@v3
|
|
38
|
+
|
|
39
|
+
# Deployment job
|
|
40
|
+
deploy:
|
|
41
|
+
environment:
|
|
42
|
+
name: github-pages
|
|
43
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
needs: build
|
|
46
|
+
steps:
|
|
47
|
+
- name: Deploy to GitHub Pages
|
|
48
|
+
id: deployment
|
|
49
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
release:
|
|
8
|
+
types: [published]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Set up Python
|
|
18
|
+
uses: actions/setup-python@v4
|
|
19
|
+
with:
|
|
20
|
+
python-version: '3.11'
|
|
21
|
+
|
|
22
|
+
- name: Install build dependencies
|
|
23
|
+
run: |
|
|
24
|
+
python -m pip install --upgrade pip
|
|
25
|
+
pip install build twine
|
|
26
|
+
|
|
27
|
+
- name: Build package
|
|
28
|
+
run: |
|
|
29
|
+
python -m build
|
|
30
|
+
|
|
31
|
+
- name: Check package
|
|
32
|
+
run: |
|
|
33
|
+
twine check dist/*
|
|
34
|
+
|
|
35
|
+
- name: Upload build artifacts
|
|
36
|
+
uses: actions/upload-artifact@v4
|
|
37
|
+
with:
|
|
38
|
+
name: dist
|
|
39
|
+
path: dist/
|
|
40
|
+
|
|
41
|
+
pypi-publish:
|
|
42
|
+
needs: build
|
|
43
|
+
name: upload release to PyPI
|
|
44
|
+
if: github.event_name == 'release' && github.event.action == 'published'
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
permissions:
|
|
47
|
+
id-token: write
|
|
48
|
+
steps:
|
|
49
|
+
- name: Download build artifacts
|
|
50
|
+
uses: actions/download-artifact@v4
|
|
51
|
+
with:
|
|
52
|
+
name: dist
|
|
53
|
+
path: dist/
|
|
54
|
+
- name: Publish package distributions to PyPI
|
|
55
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
56
|
+
|
|
57
|
+
publish-github:
|
|
58
|
+
needs: build
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
61
|
+
|
|
62
|
+
steps:
|
|
63
|
+
- uses: actions/checkout@v4
|
|
64
|
+
|
|
65
|
+
- name: Download build artifacts
|
|
66
|
+
uses: actions/download-artifact@v4
|
|
67
|
+
with:
|
|
68
|
+
name: dist
|
|
69
|
+
path: dist/
|
|
70
|
+
|
|
71
|
+
- name: Extract tag name
|
|
72
|
+
id: tag
|
|
73
|
+
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
|
74
|
+
|
|
75
|
+
- name: Extract changelog
|
|
76
|
+
id: changelog
|
|
77
|
+
run: |
|
|
78
|
+
# Extract changelog section for this version
|
|
79
|
+
VERSION=$(echo ${{ steps.tag.outputs.tag }} | sed 's/^v//')
|
|
80
|
+
awk "/^## \[$VERSION\]/{flag=1; next} /^## \[/{flag=0} flag" CHANGELOG.md > release_notes.md
|
|
81
|
+
|
|
82
|
+
- name: Create GitHub Release
|
|
83
|
+
uses: softprops/action-gh-release@v2
|
|
84
|
+
with:
|
|
85
|
+
tag_name: ${{ steps.tag.outputs.tag }}
|
|
86
|
+
name: Release ${{ steps.tag.outputs.tag }}
|
|
87
|
+
body_path: release_notes.md
|
|
88
|
+
files: |
|
|
89
|
+
dist/*.whl
|
|
90
|
+
dist/*.tar.gz
|
|
91
|
+
draft: false
|
|
92
|
+
prerelease: false
|
|
93
|
+
env:
|
|
94
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
95
|
+
|
|
96
|
+
container:
|
|
97
|
+
runs-on: ubuntu-latest
|
|
98
|
+
if: github.event_name == 'release' && github.event.action == 'published'
|
|
99
|
+
|
|
100
|
+
steps:
|
|
101
|
+
- uses: actions/checkout@v4
|
|
102
|
+
|
|
103
|
+
- name: Set up Docker Buildx
|
|
104
|
+
uses: docker/setup-buildx-action@v3
|
|
105
|
+
|
|
106
|
+
- name: Login to GitHub Container Registry
|
|
107
|
+
uses: docker/login-action@v3
|
|
108
|
+
with:
|
|
109
|
+
registry: ghcr.io
|
|
110
|
+
username: ${{ github.actor }}
|
|
111
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
112
|
+
|
|
113
|
+
- name: Extract metadata
|
|
114
|
+
id: meta
|
|
115
|
+
uses: docker/metadata-action@v5
|
|
116
|
+
with:
|
|
117
|
+
images: ghcr.io/${{ github.repository }}
|
|
118
|
+
tags: |
|
|
119
|
+
type=ref,event=tag
|
|
120
|
+
type=semver,pattern={{version}}
|
|
121
|
+
type=semver,pattern={{major}}.{{minor}}
|
|
122
|
+
type=semver,pattern={{major}}
|
|
123
|
+
|
|
124
|
+
- name: Build and push container
|
|
125
|
+
uses: docker/build-push-action@v6
|
|
126
|
+
with:
|
|
127
|
+
context: .
|
|
128
|
+
file: ./Containerfile
|
|
129
|
+
push: true
|
|
130
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
131
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
132
|
+
cache-from: type=gha
|
|
133
|
+
cache-to: type=gha,mode=max
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Temporary and binary files
|
|
2
|
+
*~
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.so
|
|
5
|
+
*.cfg
|
|
6
|
+
!.isort.cfg
|
|
7
|
+
!setup.cfg
|
|
8
|
+
*.orig
|
|
9
|
+
*.log
|
|
10
|
+
*.pot
|
|
11
|
+
__pycache__/*
|
|
12
|
+
.cache/*
|
|
13
|
+
.*.swp
|
|
14
|
+
*/.ipynb_checkpoints/*
|
|
15
|
+
.DS_Store
|
|
16
|
+
|
|
17
|
+
# Project files
|
|
18
|
+
.ropeproject
|
|
19
|
+
.project
|
|
20
|
+
.pydevproject
|
|
21
|
+
.settings
|
|
22
|
+
.idea
|
|
23
|
+
.vscode
|
|
24
|
+
tags
|
|
25
|
+
|
|
26
|
+
# Package files
|
|
27
|
+
*.egg
|
|
28
|
+
*.eggs/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg-info
|
|
31
|
+
|
|
32
|
+
# Unittest and coverage
|
|
33
|
+
htmlcov/*
|
|
34
|
+
.coverage
|
|
35
|
+
.coverage.*
|
|
36
|
+
.tox
|
|
37
|
+
junit*.xml
|
|
38
|
+
coverage.xml
|
|
39
|
+
.pytest_cache/
|
|
40
|
+
|
|
41
|
+
# Build and docs folder/files
|
|
42
|
+
build/*
|
|
43
|
+
dist/*
|
|
44
|
+
sdist/*
|
|
45
|
+
docs/api/*
|
|
46
|
+
docs/_rst/*
|
|
47
|
+
docs/_build/*
|
|
48
|
+
cover/*
|
|
49
|
+
MANIFEST
|
|
50
|
+
|
|
51
|
+
# Per-project virtualenvs
|
|
52
|
+
.venv*/
|
|
53
|
+
.conda*/
|
|
54
|
+
.python-version
|