This repository provides a complete set of real scripts and GitHub Actions workflows to automate build, test, deployment, and maintenance tasks for logi.CAD 3 projects in a CI/CD environment.
The goal of this repository is to:
- Automate repetitive logi.CAD 3 operations (build, load, rule check, library handling, tests, XML import/export, etc.)
- Enable triggering these operations via GitHub Actions
- Provide consistent CLI usage examples for logi.CAD 3
- Ensure that all operations can be reproduced both locally and on a CI/CD pipeline
- All workflows are configured with:
runs-on: [self-hosted, windows]
- This means you must register a Windows-based self-hosted runner in your GitHub repository:
- Go to Settings → Actions → Runners in your GitHub repository
- Add a new runner → Select Windows
- Follow the installation instructions provided by GitHub
- Make sure the runner has the label
windows
(in addition toself-hosted
) - Keep the runner running (either with
run.cmd
in a terminal or as a Windows service)
- Install and license logi.CAD 3 on the self-hosted runner machine
- Ensure
eclipseC
andlogiCAD3.ini
are available and paths are correctly set - Place
log4j.xml
at the project root (provided example in documentation)
- Windows OS with Java installed (compatible with logi.CAD 3 version)
- Network access to target PLC (for load operations)
- Correctly imported logi.CAD 3 projects in the workspace before running workflows
.
├── scripts/ # Batch scripts for each LC3 automation task
│ ├── build_project.bat
│ ├── load_project.bat
│ ├── rulecheck_project.bat
│ ├── library_operations.bat
│ ├── test_block.bat
│ ├── sil_test.bat
│ ├── pil_test.bat
│ ├── export_project_to_xml.bat
│ ├── import_objects_from_xml.bat
│ └── convert_source_to_xmi.bat
│
├── .github/
│ └── workflows/ # GitHub Actions workflows to run scripts
│ ├── build_project.yml
│ ├── load_project.yml
│ ├── rulecheck_project.yml
│ ├── library_operations.yml
│ ├── test_block.yml
│ ├── sil_test.yml
│ ├── pil_test.yml
│ ├── export_project_to_xml.yml
│ ├── import_objects_from_xml.yml
│ └── convert_source_to_xmi.yml
│
├── documentation/ # Documentation for each script
│ ├── build_project.md
│ ├── load_project.md
│ ├── rulecheck_project.md
│ ├── library_operations.md
│ ├── test_block.md
│ ├── sil_test.md
│ ├── pil_test.md
│ ├── export_project_to_xml.md
│ ├── import_objects_from_xml.md
│ └── convert_source_to_xmi.md
│
└── log4j.xml # Example logging configuration
Execute scripts directly from the scripts/
folder:
scripts\build_project.bat MyProjectName MyConfigurationName
scripts\load_project.bat MyProjectName MyConfigurationName MyTargetName
scripts\rulecheck_project.bat MyProjectName local.iecplc reports report01.mrclog
- Go to the Actions tab in your repository
- Select the desired workflow
- Click Run workflow
- Fill in the input parameters as prompted
- Workflow runs on your Windows self-hosted runner
Script | Description |
---|---|
build_project.bat |
Builds an LC3 project with a specified configuration |
load_project.bat |
Loads the built application into a target PLC |
rulecheck_project.bat |
Runs automated rule checking on a project |
library_operations.bat |
Builds, deploys, and optionally verifies LC3 libraries |
test_block.bat |
Tests a specific block in a library |
sil_test.bat |
Runs a Software-in-the-Loop (SiL) test suite |
pil_test.bat |
Runs a Processor-in-the-Loop (PiL) test and optionally releases a library |
export_project_to_xml.bat |
Exports a project or object to XML format |
import_objects_from_xml.bat |
Imports objects from an XML file into a project |
convert_source_to_xmi.bat |
Converts IEC source files to XMI format |
- All workflows require the project to be already imported into the LC3 workspace
- Configuration names (
-configurationName
) must exactly match names in.iecplc
files - Target names (
-targetName
) must match PLC definitions in the project - Optional parameters in workflows can be left empty; they will be skipped in CLI calls
Detailed documentation for each script and workflow is available in the documentation/
folder.
documentation/
├── build_project.md
├── load_project.md
...
Each file includes:
- CLI usage
- Parameter descriptions
- Example GitHub Actions usage
- Requirements