34 lines
618 B
YAML
34 lines
618 B
YAML
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
|