Skip to content

Commit

Permalink
Merge pull request #30 from melexis/Letme-patch-1
Browse files Browse the repository at this point in the history
Try to have GitHub actions instead of travis
  • Loading branch information
Letme authored Jun 22, 2021
2 parents a258525 + 89265ba commit d894f28
Show file tree
Hide file tree
Showing 7 changed files with 206 additions and 316 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/c-cpp-coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Coveralls

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
# --- Coverage stages ---
coverage:
name: Get coverage information gcc ${{ matrix.gcc_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
gcc_version: ['10']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install gcc-${{ matrix.gcc_version }} and other dependencies
run: |
sudo apt update
sudo apt-get install -y gcc-${{ matrix.gcc_version }} ruby rake gcc-multilib lcov
pip install gcovr==5.0
sudo gem install coveralls-lcov
sudo ln -fs /usr/bin/gcov-${{ matrix.gcc_version }} /usr/bin/gcov
- name: Install branch v1.15 of lcov
run: |
git clone --branch=v1.15 https://github.com/linux-test-project/lcov.git
cd lcov
sudo make install
cd -
- name: Make coverage
run: |
make coverage
- name: Submit results to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: build/lcov.info
45 changes: 45 additions & 0 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Compile

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
# --- Compilation stages ---
compile-gcc:
name: gcc ${{ matrix.gcc_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
gcc_version: ['7','8','9','10']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Install gcc-${{ matrix.gcc_version }}
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt-get install -y gcc-${{ matrix.gcc_version }}
- name: Compile
run: make libs
env:
CC: gcc-${{ matrix.gcc_version }}
compile-clang:
name: clang ${{ matrix.clang_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
clang_version: ['7','8','9','10']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Install clang-${{ matrix.clang_version }}
run: |
sudo apt-get install -y clang-${{ matrix.clang_version }}
- name: Compile
run: make libs
env:
CC: clang-${{ matrix.clang_version }}
CXX: clang++-${{ matrix.clang_version }}
44 changes: 44 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Doxygen
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
doc:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Doxygen and other dependencies
run: |
sudo apt update
sudo apt-get install -y doxygen doxygen-doc doxygen-latex doxygen-gui graphviz
pip3 install mlx.warnings
- name: Execute and build documentation
run: |
mlx-warnings --doxygen --exact-warnings 9 --command make doxy
- name: Upload HTML documentation
uses: actions/upload-artifact@v2
with:
name: html-doc
path: ./build/html/doxygen/html
deploy:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
needs: doc
name: Publish
runs-on: ubuntu-latest
steps:
- name: Download HTML documentation from job 'test'
uses: actions/download-artifact@v2
with:
name: html-doc
path: ./build/html/doxygen/html
- name: Disable jekyll
run: touch ./build/html/doxygen/html/.nojekyll
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/html/doxygen/html
22 changes: 22 additions & 0 deletions .github/workflows/stylechecker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Stylechecker

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
# --- Style check stages ---
style:
name: Stylechecker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install recent uncrustify
run: |
git clone https://github.com/uncrustify/uncrustify.git
cd uncrustify && mkdir build && cd build
cmake .. && sudo make install && cd ../..
- name: Run uncrustify
run: make ci_uncrustify
53 changes: 53 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Unit testing

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
# --- Test stages ---
test-gcc:
name: With gcc ${{ matrix.gcc_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
gcc_version: ['7','8','9','10']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install gcc-${{ matrix.gcc_version }} and other dependencies
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt-get install -y gcc-${{ matrix.gcc_version }} ruby rake gcc-multilib lcov
pip install --user gcovr==3.3
- name: Unit tests
run: make utest
env:
CC: gcc-${{ matrix.gcc_version }}
test-clang:
name: With clang ${{ matrix.clang_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
clang_version: ['7','8','9','10']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install clang-${{ matrix.clang_version }}
run: |
sudo apt-get install -y clang-${{ matrix.clang_version }} ruby rake gcc-multilib lcov
pip install --user gcovr==3.3
sudo ln -fs /usr/bin/clang-${{ matrix.clang_version }} /usr/bin/clang
sudo ln -fs /usr/bin/llvm-cov-${{ matrix.clang_version }} /usr/bin/llvm-cov
- name: Unit tests
run: make CC=clang utest
env:
CC: clang-${{ matrix.clang_version }}
CXX: clang++-${{ matrix.clang_version }}
Loading

0 comments on commit d894f28

Please sign in to comment.