Update main.yml #7
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++ CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up GCC | |
uses: egor-tensin/setup-gcc@v1 | |
with: | |
version: latest | |
platform: x64 | |
- name: Install dependencies | |
run: | | |
sudo apt-get install libcunit1 libcunit1-doc libcunit1-dev | |
- name: Build | |
run: | | |
gcc -o test_cache src/main.c src/cache.c -lcunit | |
touch data.txt | |
- name: Run tests | |
run: | | |
./test_cache |