This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: C++11 Build & Test | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout the repository | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| # Install required dependencies (g++, make) | |
| - name: Install build tools | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential g++ | |
| # Build the project using Makefile | |
| - name: Build with Make | |
| run: make | |
| # (Optional) Run the binary to test if it works | |
| - name: Run executable (test) | |
| run: ./vps_srv --version || true # Replace with your test command | |
| # (Optional) Upload the built binary as an artifact | |
| - name: Upload build artifact | |
| if: success() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vps_srv-binary | |
| path: vps_srv |