Conversation
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions workflow intended to compile the C++ program in CI for PRs targeting main and pushes to the devops branch, aligning with Issue #95.
Changes:
- Added a
compileGitHub Actions workflow triggered onpull_requesttomainandpushtodevops. - Workflow runs
g++ -std=c++17 main.cpponubuntu-latest.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| install: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Install dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y -f build-essential g++ cmake | ||
| build: | ||
| needs: install | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
The install and build jobs run on separate fresh runners, so packages installed in install are not available in build. As written, needs: install only enforces ordering and adds time without affecting the build environment. Consider merging install+build into a single job (checkout -> apt-get -> g++) or install in the build job (or drop the install step if relying on ubuntu-latest toolchain).
| install: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y -f build-essential g++ cmake | |
| build: | |
| needs: install | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y -f build-essential g++ cmake |
| name: compile | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ devops ] | ||
| pull_request: | ||
| branches: [ main ] |
There was a problem hiding this comment.
PR description/Issue #95 mention adding a status badge for the compile workflow to README.md, but this PR only adds the workflow file and does not update README.md (current README has no badge). Either include the README badge change or update the PR description/linked issue scope accordingly.
Issue #95
Added CI/CD for Task #153