Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Sep 24, 2021
2 parents 891b73a + 57c9114 commit 86f8ed3
Show file tree
Hide file tree
Showing 36 changed files with 2,052 additions and 1,326 deletions.
229 changes: 95 additions & 134 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,28 @@ on:
- devel

env:
DEFAULT_OPTIONS: -DENABLE_BUILD_TESTS=ON -DENABLE_DNSSEC=ON
DEFAULT_PACKAGES: libcmocka-dev zlib1g-dev libssh-dev libssl-dev

jobs:
git-branch:
name: Get git branch
runs-on: ubuntu-18.04
outputs:
branch-name: ${{ steps.get-git-branch.outputs.branch-name }}
steps:
- id: get-git-branch
run: |
if ${{ github.event_name == 'push' }}
then export GIT_BRANCH=`echo ${{ github.ref }} | cut -d'/' -f 3`
else
export GIT_BRANCH=${{ github.base_ref }}
fi
echo "::set-output name=branch-name::$GIT_BRANCH"
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }} # mac-OS does not implement robust mutexes so it is not supported
runs-on: ${{ matrix.config.os }}
needs: git-branch
strategy:
fail-fast: false
matrix:
Expand All @@ -25,79 +40,125 @@ jobs:
name: "Release, Ubuntu 18.04, gcc",
os: "ubuntu-18.04",
build-type: "Release",
dep-build-type: "Release",
cc: "gcc",
options: "",
packager: "sudo apt-get",
packages: ""
options: "-DENABLE_TESTS=ON -DENABLE_DNSSEC=ON",
packages: "",
snaps: "",
make-prepend: "",
make-target: ""
}
- {
name: "Release, Ubuntu 18.04, clang",
os: "ubuntu-18.04",
build-type: "Release",
dep-build-type: "Release",
cc: "clang",
options: "",
packager: "sudo apt-get",
packages: ""
options: "-DENABLE_TESTS=ON -DENABLE_DNSSEC=ON",
packages: "",
snaps: "",
make-prepend: "",
make-target: ""
}
- {
name: "Debug, Ubuntu 18.04, gcc",
os: "ubuntu-18.04",
build-type: "Debug",
dep-build-type: "Release",
cc: "gcc",
options: "",
packager: "sudo apt-get",
packages: "valgrind"
options: "-DENABLE_DNSSEC=ON",
packages: "valgrind",
snaps: "",
make-prepend: "",
make-target: ""
}
- {
name: "Debug, Ubuntu 18.04, clang",
os: "ubuntu-18.04",
build-type: "Debug",
dep-build-type: "Release",
cc: "clang",
options: "",
packager: "sudo apt-get",
packages: "valgrind"
options: "-DENABLE_DNSSEC=ON",
packages: "valgrind",
snaps: "",
make-prepend: "",
make-target: ""
}
- {
name: "SSH Only",
os: "ubuntu-18.04",
build-type: "Debug",
dep-build-type: "Release",
cc: "gcc",
options: "DENABLE_TLS=OFF -DENABLE_SSH=ON",
packager: "sudo apt-get",
packages: "valgrind"
options: "-DENABLE_TLS=OFF -DENABLE_SSH=ON",
packages: "valgrind",
snaps: "",
make-prepend: "",
make-target: ""
}
- {
name: "TLS Only",
os: "ubuntu-18.04",
build-type: "Debug",
dep-build-type: "Release",
cc: "gcc",
options: "DENABLE_TLS=ON -DENABLE_SSH=OFF",
packager: "sudo apt-get",
packages: "valgrind"
options: "-DENABLE_TLS=ON -DENABLE_SSH=OFF",
packages: "valgrind",
snaps: "",
make-prepend: "",
make-target: ""
}
- {
name: "No SSH nor TLS",
os: "ubuntu-18.04",
build-type: "Debug",
dep-build-type: "Release",
cc: "gcc",
options: "DENABLE_TLS=OFF -DENABLE_SSH=OFF",
packager: "sudo apt-get",
packages: "valgrind"
options: "-DENABLE_TLS=OFF -DENABLE_SSH=OFF",
packages: "valgrind",
snaps: "",
make-prepend: "",
make-target: ""
}
- {
name: "ASAN and UBSAN",
os: "ubuntu-18.04",
build-type: "Debug",
dep-build-type: "Release",
cc: "clang",
options: "-DCMAKE_C_FLAGS=-fsanitize=address,undefined -DENABLE_VALGRIND_TESTS=OFF",
packager: "sudo apt-get",
packages: ""
packages: "",
snaps: "",
make-prepend: "",
make-target: ""
}
- {
name: "ABI Check",
os: "ubuntu-latest",
build-type: "ABICheck",
dep-build-type: "Debug",
cc: "gcc",
options: "",
packages: "abi-dumper abi-compliance-checker snap",
snaps: "core universal-ctags",
make-prepend: "",
make-target: "abi-check"
}

steps:
- uses: actions/checkout@v2

- name: Uncrustify
- name: Deps-packages
shell: bash
run: |
sudo add-apt-repository ppa:kedazo/libssh-0.7.x -y
sudo apt-get update
sudo apt-get install $DEFAULT_PACKAGES ${{ matrix.config.packages }}
if ${{ matrix.config.snaps != '' }}
then sudo snap refresh; sudo snap install ${{ matrix.config.snaps }}
fi
- name: Deps-uncrustify
shell: bash
working-directory: ${{ github.workspace }}
run: |
Expand All @@ -110,79 +171,20 @@ jobs:
sudo make install
if: ${{ matrix.config.name == 'Debug, Ubuntu 18.04, gcc' }}

- name: Dependencies
- name: Deps-libyang
shell: bash
run: |
sudo add-apt-repository ppa:kedazo/libssh-0.7.x -y
${{ matrix.config.packager }} update
${{ matrix.config.packager }} install $DEFAULT_PACKAGES ${{ matrix.config.packages }}
if ${{ github.event_name == 'push' }}
then GIT_BRANCH=`echo ${{ github.ref }} | cut -d'/' -f 3`
else
GIT_BRANCH=${{ github.base_ref }}
fi
git clone -b $GIT_BRANCH https://github.com/CESNET/libyang.git
git clone -b ${{needs.git-branch.outputs.branch-name}} https://github.com/CESNET/libyang.git
cd libyang
mkdir build
cd build
CC=${{ matrix.config.cc }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.config.build-type }} -DENABLE_BUILD_TESTS=OFF ..
make -j2
sudo make install
git clone https://github.com/DNSSEC-Tools/DNSSEC-Tools.git dnssec-tools
cd dnssec-tools/dnssec-tools/validator
./configure
CC=${{ matrix.config.cc }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.config.dep-build-type }} -DENABLE_BUILD_TESTS=OFF ..
make -j2
sudo make install
- name: Configure
shell: bash
working-directory: ${{ github.workspace }}
run: |
mkdir build
cd build
CC=${{ matrix.config.cc }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.config.build-type }} $DEFAULT_OPTIONS ${{ matrix.config.options }} ..
- name: Build
shell: bash
working-directory: ${{ github.workspace }}/build
run: make

- name: Test
shell: bash
working-directory: ${{ github.workspace }}/build
run: ctest --output-on-failure

abi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Dependencies
- name: Deps-libval
shell: bash
run: |
sudo add-apt-repository ppa:kedazo/libssh-0.7.x -y
sudo apt-get update
sudo apt-get install $DEFAULT_PACKAGES abi-dumper abi-compliance-checker
sudo snap install core universal-ctags
if ${{ github.event_name == 'push' }}
then GIT_BRANCH=`echo ${{ github.ref }} | cut -d'/' -f 3`
else
GIT_BRANCH=${{ github.base_ref }}
fi
git clone -b $GIT_BRANCH https://github.com/CESNET/libyang.git
cd libyang
mkdir build
cd build
CC=gcc cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_BUILD_TESTS=OFF ..
make -j2
sudo make install
git clone https://github.com/DNSSEC-Tools/DNSSEC-Tools.git dnssec-tools
cd dnssec-tools/dnssec-tools/validator
./configure
Expand All @@ -195,58 +197,17 @@ jobs:
run: |
mkdir build
cd build
CC=gcc cmake -DCMAKE_BUILD_TYPE=ABICheck ..
CC=${{ matrix.config.cc }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.config.build-type }} ${{ matrix.config.options }} ..
- name: Build
shell: bash
working-directory: ${{ github.workspace }}/build
run: LC_ALL=C.UTF-8 PATH=/snap/bin:$PATH make abi-check

coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Dependencies
shell: bash
run: |
sudo add-apt-repository ppa:kedazo/libssh-0.7.x -y
sudo apt-get update
sudo apt-get install $DEFAULT_PACKAGES lcov
if ${{ github.event_name == 'push' }}
then GIT_BRANCH=`echo ${{ github.ref }} | cut -d'/' -f 3`
else
GIT_BRANCH=${{ github.base_ref }}
fi
git clone -b $GIT_BRANCH https://github.com/CESNET/libyang.git
cd libyang
mkdir build
cd build
CC=gcc cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_BUILD_TESTS=OFF ..
make -j2
sudo make install
- name: Configure
shell: bash
working-directory: ${{ github.workspace }}
run: |
mkdir build
cd build
CC=gcc cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON ..
- name: Build
shell: bash
working-directory: ${{ github.workspace }}/build
run: make
export LC_ALL=C.UTF-8
export PATH=/snap/bin:${{ github.workspace }}/coverity-tools/bin:$PATH
${{ matrix.config.make-prepend }} make ${{ matrix.config.make-target }}
- name: Test
shell: bash
working-directory: ${{ github.workspace }}/build
run: ctest --output-on-failure

- name: Upload to Codecov.io
shell: bash
working-directory: ${{ github.workspace }}/build
run: bash <(curl -s https://codecov.io/bash)
Loading

0 comments on commit 86f8ed3

Please sign in to comment.