Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 65ce0d1

Browse files
authored
Merge pull request #121 from pmem/gh-ci
Add GitHub CI
2 parents e203115 + 413c0a0 commit 65ce0d1

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/main.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CMake
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
env:
10+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
11+
BUILD_TYPE: Release
12+
13+
jobs:
14+
build:
15+
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
16+
# You can convert this to a matrix build if you need cross-platform coverage.
17+
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
18+
runs-on: [ubuntu-20.04]
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
23+
- name: Install Packages
24+
run: sudo apt-get install -y build-essential pkg-config libcapstone-dev
25+
26+
- name: Configure CMake
27+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
28+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
29+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
30+
31+
- name: Build
32+
# Build your program with the given configuration
33+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
34+
35+
- name: Test
36+
working-directory: ${{github.workspace}}/build
37+
# Execute tests defined by the CMake configuration.
38+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
39+
run: ctest -C ${{env.BUILD_TYPE}}

0 commit comments

Comments
 (0)