Create 494. Target Sum.cpp #2
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/C++ CI | |
on: | |
push: | |
paths: | |
- '**/*.c' | |
- '**/*.cpp' | |
- '**/*.h' | |
- '**/*.hpp' | |
pull_request: | |
paths: | |
- '**/*.c' | |
- '**/*.cpp' | |
- '**/*.h' | |
- '**/*.hpp' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up C/C++ compiler | |
uses: actions/setup-cpp@v1 | |
with: | |
compiler: gcc | |
- name: Compile code | |
run: | | |
mkdir build | |
cd build | |
cmake .. | |
make | |
- name: Run tests | |
run: | | |
cd build | |
ctest --output-on-failure |