Add GitHub Actions workflow for building the project
Configure CI pipeline to build the project on Ubuntu, using CMake and creating a build artifact
This commit is contained in:
46
.github/workflows/build.yml
vendored
Normal file
46
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Set up CMake
|
||||||
|
uses: jwlawson/actions-setup-cmake@v1
|
||||||
|
with:
|
||||||
|
cmake-version: '3.21.1'
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y build-essential
|
||||||
|
|
||||||
|
- name: Create build directory
|
||||||
|
run: mkdir build
|
||||||
|
|
||||||
|
- name: Configure the project
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
cmake ..
|
||||||
|
|
||||||
|
- name: Build the project
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
make
|
||||||
|
|
||||||
|
- name: Upload Binary
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: cpu-check-binary
|
||||||
|
path: build/cpu-check
|
Reference in New Issue
Block a user