How to Run Code from a GitHub Repository
Run source code repositories hosted on GitHub on Signaloid's C0 cores.
Connect the repository
The Repositories page compiles and executes code that already lives in a GitHub repository. Search for a public repository from the inline search bar at the top of the page, then click Connect on the result row. Figure 1 shows the full path, including the validation dialog that runs on connect.
For private repositories, log in first with Login with GitHub. See GitHub Login for the login flow and Repository Search for the search and browse dialogs.
The Signaloid Cloud Compute Engine calls the GitHub API to access and manage connected repositories. The GitHub API limits unauthenticated requests aggressively, so logging in keeps your search results and connection attempts from getting throttled.
Validation requires a top-level src/ directory. Without it, the connection
fails with There is no './src' directory in the repository. Once the
repository is connected, you can point the build at a different sub-directory.
See Configure the build.
Signaloid keyword from the Repositories page, connecting to a result, and watching the validation dialog complete.Your account tier caps how many repositories you can have connected at once. See Repository Connection for the other ways to add a repository and the checks that run on connect.
Configure the Build
A connected repository runs with no configuration at all, on the default branch and the default core. Two controls on the card (Figure 2) are worth setting before the first run:
- Working Branch (), if the code you want is not on the default
branch. The Compute Engine clones the
HEADof whichever branch is selected. - Build Directory (), if your sources do not live under the repository root. The build recurses into every sub-directory below the one you pick.
The card carries three more controls, for the execution core, command-line arguments, and data source mounts. For the full set and what each one stores, see the Repositories reference.
By default the build compiles every C and C++ source file under the top-level
src/ directory, searching recursively. For finer control, commit a config.mk
to the build directory to name the exact source files or to pass flags to the
compiler and linker. See
The "config.mk" File
for the supported Makefile variables.
The Signaloid Cloud Compute Engine supports cloning submodules with HTTPS remote
origins. If your repository pulls in a submodule over SSH, change the remote to
HTTPS before connecting. Otherwise the clone will fail and the build will stop
with Build Error.
Run the repository
Run starts a Build, then a Task on success. The card shows
a Build ID and a Task ID, each with its status. If compilation fails, the Build
ends in Error and the compiler output appears in the Build tab of the
result panel.
See Builds and Tasks for the full status lifecycle and for re-running a completed Build without recompiling, and Repository Runs for the result panel tabs and the Open Execution Log dialog. The Results Panel reference covers how distributional values render and what the Show Plots toggle does.
Completed, walking through the result panel tabs, hovering an underlined value to open its plot, and toggling Show Plots to render every plot inline.To trace the distribution behind individual variables, select a Reference core and use Discover Variables (). See How to Run a Reference Execution for that workflow.
Pass command-line arguments
Open the Command Line Arguments dialog (), edit the text area, and click Set Arguments. The platform remembers the arguments across runs of this repository. Emptying the text area and saving again clears them.
For C programs the arguments arrive as argv with length argc. Other
supported languages use their equivalent built-in mechanism.
Arguments that contain spaces cannot be quoted. See Command-line arguments for how the Compute Engine splits them.
Mount a Data Source
Open Mount Data Source (), click Select Data Source, enter
the destination path your application reads and writes through, and click Save
Mount (Figure 4). Your repository then reaches files under that path. With a
mount point of mnt, the C call FILE * fp = fopen("mnt/myNewFile.csv", "w")
writes a file into the Signaloid Cloud Storage.
See Data Source Mounts for the dialog's reset and remove options, and Data and Sensors for creating the data sources themselves.
Commit read-only input files to a top-level inputs/ directory of your
repository. The connection check looks for this directory, and the Compute
Engine makes the files in it available to your application at run time. A file
committed as inputs/input.csv is then reachable as
FILE * fp = fopen("input.csv", "r"), provided your code runs with inputs as
its working directory.