change install cmake #5
This file contains 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 Program Workflow | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
compile_and_run: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install CMake and necessary tools | |
run: sudo apt-get update && sudo apt-get install -y cmake build-essential | |
- name: Create Build Directory | |
run: mkdir build | |
- name: Configure CMake | |
run: cmake -S . -B build | |
- name: Build | |
run: cmake --build build | |
- name: Run compiled program | |
run: ./build/address_book_tests |