In your example, your run
variant isn't compiling anything before running it. You need to edit your build file to something like:
"variants":
[
{
"name": "Run",
"cmd": ["bash", "-c", "/usr/local/bin/gcc '${file}' -Wall -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"]
}
]
}