From 79bf8c7c3517a899e997d409da3aebb8478cf71d Mon Sep 17 00:00:00 2001 From: TonCherAmi Date: Fri, 20 Aug 2021 15:54:34 +0300 Subject: [PATCH] [CI] Port CI to github actions. (#1374) * [CI] Port CI to github actions. * [Doc] Fix doxygen comment block. --- .github/actions/autotools/action.yml | 32 ++++++++++++++++ .github/actions/doxycheck/action.yml | 24 ++++++++++++ .github/actions/meson/action.yml | 32 ++++++++++++++++ .github/actions/setup/action.yml | 56 +++++++++++++++++++++++++++ .github/workflows/build.yml | 57 ++++++++++++++++++++++++++++ include/view.h | 2 +- 6 files changed, 202 insertions(+), 1 deletion(-) create mode 100644 .github/actions/autotools/action.yml create mode 100644 .github/actions/doxycheck/action.yml create mode 100644 .github/actions/meson/action.yml create mode 100644 .github/actions/setup/action.yml create mode 100644 .github/workflows/build.yml diff --git a/.github/actions/autotools/action.yml b/.github/actions/autotools/action.yml new file mode 100644 index 00000000..f622ccdd --- /dev/null +++ b/.github/actions/autotools/action.yml @@ -0,0 +1,32 @@ +name: Autotools Build +description: Builds Rofi using Autotools + +inputs: + cc: + description: Compiler to use + required: true + +runs: + using: composite + steps: + - id: setup + run: | + autoreconf --install + + mkdir builddir && cd builddir + + ../configure CC=${{ inputs.cc }} + shell: bash + - id: build + run: cd builddir && make + shell: bash + - id: test + run: cd builddir && make distcheck + shell: bash + - id: doxy + run: cd builddir && make doxy 2>&1 > doxygen.log + shell: bash + - id: doxycheck + uses: ./.github/actions/doxycheck + with: + logfile: builddir/doxygen.log diff --git a/.github/actions/doxycheck/action.yml b/.github/actions/doxycheck/action.yml new file mode 100644 index 00000000..e362ebe0 --- /dev/null +++ b/.github/actions/doxycheck/action.yml @@ -0,0 +1,24 @@ +name: Doxygen Check +description: Checks for Doxygen warnings + +inputs: + logfile: + description: Path to doxygen logfile + required: true + +runs: + using: composite + steps: + - id: check + run: | + if [[ "$(grep -c warning ${{ inputs.logfile }})" != 0 ]]; then + echo + echo Doxygen warnings found: + grep warning ${{ inputs.logfile }} + echo + + exit 1 + fi + + python2 ./doxy-coverage/doxy-coverage.py builddir/doc/html/xml/ + shell: bash diff --git a/.github/actions/meson/action.yml b/.github/actions/meson/action.yml new file mode 100644 index 00000000..ff6b730a --- /dev/null +++ b/.github/actions/meson/action.yml @@ -0,0 +1,32 @@ +name: Meson Build +description: Builds Rofi using Meson + +inputs: + cc: + description: Compiler to use + required: true + +runs: + using: composite + steps: + - id: pip + run: pip install meson ninja + shell: bash + - id: setup + run: meson setup builddir -Db_coverage=true + shell: bash + env: + CC: ${{ inputs.cc }} + - id: build + run: ninja -C builddir + shell: bash + - id: test + run: ninja -C builddir test + shell: bash + - id: doxy + run: ninja -C builddir doc/html 2>&1 > doxygen.log + shell: bash + - id: doxycheck + uses: ./.github/actions/doxycheck + with: + logfile: doxygen.log diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 00000000..b6478568 --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,56 @@ +name: CI Build Setup +description: Sets up build dependencies + +runs: + using: composite + steps: + - id: python + uses: actions/setup-python@v1 + with: + python-version: '3.x' + - id: apt + run: | + sudo apt-get install -y \ + discount \ + doxygen \ + fluxbox \ + gdb \ + graphviz \ + jq \ + lcov \ + libpango1.0-dev \ + libstartup-notification0-dev \ + libxcb-ewmh-dev \ + libxcb-icccm4-dev \ + libxcb-randr0-dev \ + libxcb-util0-dev \ + libxcb-xinerama0-dev \ + libxcb-xkb-dev \ + libxcb-xrm-dev \ + libxcb-cursor-dev \ + libxkbcommon-dev \ + libxkbcommon-dev \ + libxkbcommon-x11-dev \ + ninja-build \ + python3-pip \ + python3-setuptools \ + python3-wheel \ + texi2html \ + texinfo \ + xdotool \ + xfonts-base \ + xterm \ + xutils-dev + shell: bash + - id: doxy + run: git clone https://github.com/alobbs/doxy-coverage + shell: bash + - id: check + run: | + curl -L https://github.com/libcheck/check/releases/download/0.14.0/check-0.14.0.tar.gz | tar xzf - + cd check-0.14.0 + ./configure + make + sudo make install + sudo ldconfig + shell: bash diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..1dcf0647 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,57 @@ +name: CI Build + +on: + push: + branches: + - next + paths-ignore: + - "**.md" + - "**.markdown" + - "**.rasi" + pull_request: + paths-ignore: + - "**.md" + - "**.markdown" + - "**.rasi" + +jobs: + build-meson-gcc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - uses: ./.github/actions/setup + - uses: ./.github/actions/meson + with: + cc: gcc + build-meson-clang: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - uses: ./.github/actions/setup + - uses: ./.github/actions/meson + with: + cc: clang + build-autotools-gcc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - uses: ./.github/actions/setup + - uses: ./.github/actions/autotools + with: + cc: gcc + build-autotools-clang: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - uses: ./.github/actions/setup + - uses: ./.github/actions/autotools + with: + cc: clang diff --git a/include/view.h b/include/view.h index c72068f6..01cfa04b 100644 --- a/include/view.h +++ b/include/view.h @@ -295,7 +295,7 @@ void __create_window(MenuFlags menu_flags); xcb_window_t rofi_view_get_window(void); /** @} */ -/*** +/** * @defgroup ViewThreadPool ViewThreadPool * @ingroup View *