Skip to content

Commit

Permalink
Merge pull request #346 from Steve-Tech/ci
Browse files Browse the repository at this point in the history
Add GitHub Workflow to test for successful compilation
  • Loading branch information
Syllo authored Dec 30, 2024
2 parents e8f287c + 78bbcad commit c79a9c7
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Compile Ubuntu

on:
- push
- pull_request

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false

matrix:
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04]

env:
BUILD_DIR: build
DEBIAN_FRONTEND: noninteractive

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: sudo apt-get install -y libncurses5-dev libncursesw5-dev libdrm-dev libsystemd-dev

- name: Configure CMake
run: cmake -S . -B $BUILD_DIR

- name: Build
run: cmake --build $BUILD_DIR

- name: Install
run: DESTDIR="$PWD/build/install" cmake --build $BUILD_DIR --target install

- name: Upload
uses: actions/upload-artifact@v4
with:
name: nvtop ${{ matrix.os }}
path: ${{ env.BUILD_DIR }}/install

0 comments on commit c79a9c7

Please sign in to comment.