-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Inho Oh <webispy@gmail.com>
- Loading branch information
Showing
22 changed files
with
4,189 additions
and
1 deletion.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
clang_format_lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
- name: Install clang-format | ||
run: sudo apt install -y clang-format | ||
- name: lint | ||
run: | | ||
clang-format --dry-run --Werror \ | ||
src/*.c tool/*.c tests/*.c \ | ||
include/*.h | ||
clang_tidy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
- name: Install clang-tidy | ||
run: sudo apt install -y clang-tidy libglib2.0-dev | ||
- name: Configure | ||
run: cmake -DCMAKE_INSTALL_PREFIX=/usr -S . -B build_x86 | ||
- name: clang-tidy | ||
run: clang-tidy -p build_x86 src/*.c tool/*.c tests/*.c | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
needs: [clang_format_lint, clang_tidy] | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
- name: Install dependency libraries | ||
run: sudo apt install -y libglib2.0-dev | ||
- name: Configure | ||
run: cmake -DCMAKE_INSTALL_PREFIX=/usr -S . -B build | ||
- name: Build | ||
run: cmake --build build --parallel -v | ||
- name: Test | ||
run: cd build && make test | ||
- name: Install | ||
run: DESTDIR=out cmake --install build | ||
- name: Build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: files | ||
path: out | ||
|
||
doxygen: | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
- name: Install doxygen | ||
run: sudo apt-get install doxygen graphviz | ||
- name: Generate doxygen | ||
run: doxygen | ||
- name: Deploy to Github Pages | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
folder: doc/html | ||
clean: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.9) | ||
project(aln) | ||
|
||
include(GNUInstallDirs) | ||
include(FindPkgConfig) | ||
|
||
# Generate compile_commands.json | ||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
|
||
# C++ standard: c++11 (not gnu++11) | ||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
||
# C standard: gnu99 (not c99) | ||
set(CMAKE_C_STANDARD 99) | ||
set(CMAKE_C_EXTENSIONS ON) | ||
|
||
# version: 0.1.0 | ||
set(VERSION_MAJOR 0) | ||
set(VERSION_MINOR 1) | ||
set(VERSION_PATCH 0) | ||
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") | ||
|
||
pkg_check_modules(glib REQUIRED glib-2.0) | ||
|
||
# Global include directories | ||
include_directories(include) | ||
|
||
# Public header files | ||
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/aln/) | ||
|
||
# pkg-config file | ||
configure_file(aln.pc.in ${PROJECT_BINARY_DIR}/aln.pc @ONLY) | ||
install(FILES ${PROJECT_BINARY_DIR}/aln.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/) | ||
|
||
if (NOT MSVC) | ||
add_compile_options(-g -fPIC -Werror -Wall) | ||
endif() | ||
|
||
enable_testing() | ||
|
||
add_subdirectory(src) | ||
add_subdirectory(tool) | ||
add_subdirectory(tests) |
Oops, something went wrong.