Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat<ci>: init ci #34

Merged
merged 4 commits into from
Jan 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Continuous Integration

on:
push:
branches: [ "master", "dev" ]
pull_request:
branches: [ "master", "dev" ]

jobs:
build_and_check:

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: install dependencies
run: sudo apt-get install -y autoconf libghc-criterion-dev libcriterion-dev

- name: autoreconf install
run: autoreconf --install

- name: configure
run: ./configure

- name: make
run: make

- name: make check
run: make check

- name: make clean
run: make clean

clang-format:

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install dependencies
run: sudo apt-get install -y clang-format

- name: Run clang-format
run: find $(git rev-parse --show-toplevel) -name "*.h" -o -name "*.c" | xargs clang-format -i

- name: Check for changes
run: |
git diff --exit-code
if [ $? -eq 1 ]; then
echo "Code is not clang-format compliant. Please format your code."
exit 1
fi

doxygen:

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install dependencies
run: sudo apt-get install -y doxygen graphviz

- name: Run doxygen
run: doxygen Doxyfile

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: html
Loading