
Prerequisites
Before setting up the GitHub workflow, ensure that you have:- A GitHub repository containing a SCADE Suite model
- Basic knowledge of GitHub Actions
- A self-hosted runner with SCADE Suite installed (this will be used to launch SCADE in batch mode to perform automatic actions on the model).
Setting up the self-hosted runner
Ansys SCADE requires a self-hosted runner so that the GitHub Actions pipeline can run automated actions by invoking SCADE in batch mode. Follow these steps to set up your runner:- Navigate to your GitHub repository and go to Settings > Actions > Runners.
- Select New self-hosted runner and choose your operating system.
- Follow the provided instructions to install and configure a Windows runner.
- Ensure that SCADE Suite is installed and accessible from the runner environment.
SCADE Suite GitHub Actions workflow
We will now create a GitHub Actions workflow, stored under.github/workflows/scade-ci.yml that automates the process of checking, analyzing, and testing a SCADE model.
Our workflow will perform four sequential tasks on our model. Each of these tasks launches SCADE in batch mode on our model and produces a report that is archived on the workflow run for later reference. Here is the sequence of actions:
scade-check: validate the integrity of the SCADE model.scade-metrics: compute model complexity and quality metrics.test-execute: run automated model tests.suite-report: generate human-readable documentation detailing the model’s architecture and structure, down to individual operator inputs and outputs.

name: section. We’ll simply call it ci-scade-actions.
Next, we define what triggers our workflow in the on: section. We want it to run on:
- Pull Requests: ensures changes are validated before merging.
- Push Events: any push to the main branch or to a tag.
- Manual triggers: Through
workflow_dispatch. This allows manual triggering via the GitHub web interface, API or CLI (useful for testing).
jobs: section). Each job in the sequence depends on the previous one (needs: section). This means it won’t run unless the previous job is finished and successful.
Below is some detail on the steps performed by each job:
scade-check:- Clone the repository onto the runner machine.
- Determine the SCADE installation directory (
get-scade-dir). - Verify semantic correctness of the SCADE model (
suite-checkon the main operator,CruiseControl.etp). - Upload validation report for archival.
scade-metrics:- Compute metrics using configuration “MetricRule”, defined inside the model.
- Upload the generated metrics report for archival.
test-execute:- Execute tests (
test-execute). - Store results in JUnit XML format.
- Upload test results for archival.
- Execute tests (
suite-report:- Create a model documentation report using the “RTF” configuration, defined inside the model.
- Upload the report as an artifact for archival.
