Add github action to ctest lib
This commit is contained in:
parent
2abff63fcd
commit
187883883b
1 changed files with 34 additions and 0 deletions
34
.github/workflows/build-and-test.yml
vendored
Normal file
34
.github/workflows/build-and-test.yml
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
name: CMake Build and Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y cmake build-essential
|
||||
|
||||
- name: Create build directory
|
||||
run: mkdir -p build
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: build
|
||||
run: cmake ..
|
||||
|
||||
- name: Build
|
||||
working-directory: build
|
||||
run: make
|
||||
|
||||
- name: Test
|
||||
working-directory: build
|
||||
run: ctest --output-on-failure
|
||||
Loading…
Add table
Add a link
Reference in a new issue