Update the CI/CD workflow for Gitlab
Merge Request Title: Update the CI/CD workflow for Gitlab
Description
This merge request introduces changes to the GitLab CI/CD pipeline configuration to ensure that the C and C++ programs are built and tested correctly. The modifications include:
- Added artifact handling to persist compiled executables between jobs.
- Configured dependencies between build and test jobs to ensure the executables are available for testing.
Changes Made
- Updated the
.gitlab-ci.yml
file to include:- Artifacts for the
build_c
andbuild_cpp
jobs to save the compiled executables. - Dependencies in the
test_c
andtest_cpp
jobs to access the artifacts from the build jobs.
- Artifacts for the
Why This Change is Necessary
The previous configuration resulted in errors during the test jobs because the compiled executables were not available in the isolated job environments. By implementing artifact handling and job dependencies, we ensure that the test jobs can access the necessary files, leading to successful execution of the tests.
Testing
- Verified that the pipeline runs successfully with the new configuration.
- Confirmed that both the C and C++ programs compile and execute correctly with simulated user input.