mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 12:26:40 +02:00
7406c8b94c
When php imagick is installed and when WeeChat is compiled with gcc, there's a crash when the php plugin is loaded. Newer versions of gcc should fix the issue, but as in CI we can't easily use them, uninstalling imagick avoids the crash.
179 lines
5.4 KiB
YAML
179 lines
5.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
- push
|
|
- pull_request
|
|
|
|
env:
|
|
WEECHAT_DEPENDENCIES: devscripts equivs python3-pip cmake ninja-build lcov pkg-config libncurses-dev gem2deb libperl-dev python3-dev libaspell-dev liblua5.3-dev tcl8.6-dev guile-3.0-dev libv8-dev libcurl4-gnutls-dev libgcrypt20-dev libgnutls28-dev libzstd-dev zlib1g-dev curl libcpputest-dev php-dev libphp-embed libargon2-dev libsodium-dev flake8 pylint python3-bandit asciidoctor ruby-pygments.rb shellcheck
|
|
|
|
jobs:
|
|
|
|
tests_linux:
|
|
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-22.04
|
|
config:
|
|
- { name: "gcc", cc: "gcc", cxx: "g++", buildargs: "" }
|
|
- { name: "gcc_ninja", cc: "gcc", cxx: "g++", buildargs: "-G Ninja" }
|
|
- { name: "gcc_no_nls", cc: "gcc", cxx: "g++", buildargs: "-DENABLE_NLS=OFF -DENABLE_DOC=OFF" }
|
|
- { name: "gcc_no_zstd", cc: "gcc", cxx: "g++", buildargs: "-DENABLE_ZSTD=OFF -DENABLE_DOC=OFF" }
|
|
- { name: "gcc_coverage", cc: "gcc", cxx: "g++", buildargs: "-DENABLE_CODE_COVERAGE=ON" }
|
|
- { name: "clang", cc: "clang", cxx: "clang++", buildargs: "" }
|
|
|
|
name: "Tests: ${{ matrix.config.name }} on ${{ matrix.os }}"
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update -qq
|
|
sudo apt-get --yes --no-install-recommends install ${{ env.WEECHAT_DEPENDENCIES }}
|
|
# uninstall php imagick as is causes a crash when loading php plugin (see #2009)
|
|
sudo apt-get --yes purge php8.1-imagick
|
|
sudo -H pip3 install --ignore-installed msgcheck
|
|
|
|
- name: Check gettext files
|
|
run: msgcheck po/*.po
|
|
|
|
- name: Check shell and Python scripts
|
|
run: ./tools/check_scripts.sh
|
|
|
|
- name: Check Python stub file
|
|
run: ./doc/python_stub.py | diff src/plugins/python/weechat.pyi -
|
|
|
|
- name: Check Curl symbols
|
|
run: curl --silent --show-error --fail --retry 10 https://raw.githubusercontent.com/curl/curl/master/docs/libcurl/symbols-in-versions | ./tools/check_curl_symbols.py
|
|
|
|
- name: Build and run tests
|
|
env:
|
|
CC: ${{ matrix.config.cc }}
|
|
CXX: ${{ matrix.config.cxx }}
|
|
BUILDARGS: ${{ matrix.config.buildargs }}
|
|
run: ./tools/build_test.sh
|
|
|
|
- name: Run WeeChat
|
|
env:
|
|
TERM: xterm-256color
|
|
run: |
|
|
weechat --help
|
|
weechat-curses --help
|
|
weechat --colors
|
|
weechat --license
|
|
weechat --version
|
|
weechat --run-command "/debug dirs;/debug libs" --run-command "/quit"
|
|
|
|
- name: Code coverage
|
|
if: ${{ matrix.config.name == 'gcc_coverage' }}
|
|
env:
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
run: |
|
|
cd build-tmp-*
|
|
lcov --directory . --capture --output-file coverage.info
|
|
lcov --remove coverage.info '/usr/*' --output-file coverage.info
|
|
lcov --list coverage.info
|
|
bash <(curl -s https://codecov.io/bash) -f coverage.info || echo 'Codecov error'
|
|
|
|
tests_macos:
|
|
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- macos-12
|
|
- macos-11
|
|
config:
|
|
- { name: "gcc", cc: "gcc", cxx: "g++" }
|
|
- { name: "clang", cc: "clang", cxx: "clang++" }
|
|
|
|
name: "Tests: ${{ matrix.config.name }} on ${{ matrix.os }}"
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- name: Setup Homebrew
|
|
id: setup-homebrew
|
|
uses: Homebrew/actions/setup-homebrew@master
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
brew update
|
|
# temporary fix, see: https://github.com/actions/setup-python/issues/577
|
|
rm -f \
|
|
/usr/local/bin/2to3 \
|
|
/usr/local/bin/idle3 \
|
|
/usr/local/bin/pydoc3 \
|
|
/usr/local/bin/python3 \
|
|
/usr/local/bin/python3-config \
|
|
/usr/local/bin/2to3-3.11 \
|
|
/usr/local/bin/idle3.11 \
|
|
/usr/local/bin/pydoc3.11 \
|
|
/usr/local/bin/python3.11 \
|
|
/usr/local/bin/python3.11-config \
|
|
;
|
|
brew install asciidoctor guile lua pkg-config ruby
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Build
|
|
env:
|
|
CC: ${{ matrix.config.cc }}
|
|
CXX: ${{ matrix.config.cxx }}
|
|
run: |
|
|
mkdir build-tmp && cd build-tmp
|
|
cmake .. -DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_DOC_INCOMPLETE=ON -DENABLE_PHP=OFF
|
|
make VERBOSE=1 -j2
|
|
sudo make install
|
|
|
|
- name: Run WeeChat
|
|
env:
|
|
TERM: xterm-256color
|
|
run: |
|
|
weechat --help
|
|
weechat-curses --help
|
|
weechat --colors
|
|
weechat --license
|
|
weechat --version
|
|
weechat --run-command "/debug dirs;/debug libs" --run-command "/quit"
|
|
|
|
build_debian:
|
|
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-22.04
|
|
|
|
name: "Build Debian on ${{ matrix.os }}"
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update -qq
|
|
sudo apt-get --yes --no-install-recommends install ${{ env.WEECHAT_DEPENDENCIES }}
|
|
|
|
- name: Test Debian patches
|
|
run: ./tools/build_debian.sh test-patches
|
|
|
|
- name: Build Debian packages
|
|
run: ./tools/build_debian.sh devel ubuntu/jammy
|
|
|
|
- name: Install Debian packages
|
|
run: sudo dpkg -i ../weechat-devel*.deb
|
|
|
|
- name: Run WeeChat
|
|
env:
|
|
TERM: xterm-256color
|
|
run: |
|
|
weechat --help
|
|
weechat-curses --help
|
|
weechat --version
|
|
weechat --run-command "/debug dirs;/debug libs" --run-command "/quit"
|