1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-09 06:20:45 +00:00

Merge pull request #1252 from ailin-nemui/build-fixes-test-actions

fix autotools build and package the meson.build files
This commit is contained in:
ailin-nemui 2021-01-11 11:15:57 +01:00 committed by GitHub
commit ea5121da3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
46 changed files with 261 additions and 155 deletions

43
.github/actions.yml vendored
View File

@ -1,43 +0,0 @@
before_install:
- ./autogen.sh --with-proxy=module --with-bot --with-perl=module --with-otr=module
- make dist
- CO_DIR=$(pwd)
- mkdir -p $HOME/src
- cd $HOME/src
- tar xaf $CO_DIR/irssi-*.tar.*
install:
- cd $HOME/src/irssi-*
- ./configure --with-proxy=module --with-bot --with-perl=module --with-otr=module --prefix=$HOME/irssi-build --enable-always-build-tests
- make CFLAGS="-Wall -Werror -Werror=declaration-after-statement"
- make install
unit_tests:
- cd $HOME/src/irssi-*
- make -C tests -sk check
after_unit_tests:
- cd $HOME/src/irssi-*
- find -name test-suite.log -exec cat {} +
before_script:
- cd $HOME
- mkdir irssi-test
- |
echo 'echo automated irssi launch test
^set settings_autosave off
^set -clear log_close_string
^set -clear log_day_changed
^set -clear log_open_string
^set log_timestamp *
^window log on' > irssi-test/startup
- echo load perl >> irssi-test/startup
- echo load proxy >> irssi-test/startup
- echo ^quit >> irssi-test/startup
script:
- cd $HOME
- irssi-build/bin/irssi --home irssi-test | /tools/render.pl
after_script:
- cat $HOME/irc.log.*

View File

@ -1,25 +1,24 @@
on: [pull_request]
name: abicheck
env:
build_options: -Dbuildtype=debug -Denable-true-color=yes -Dwith-proxy=yes -Dc_args=-DPERL_EUPXS_ALWAYS_EXPORT
prefix: /usr/local
apt_build_deps: ninja-build libutf8proc-dev libperl-dev libotr5-dev
get_pip_build_deps: pip3 install setuptools; pip3 install wheel; pip3 install meson
getabidef_def: getabidef() { awk '$1=="#define" && $2=="IRSSI_ABI_VERSION" { print $3 }' "$1"/include/irssi/src/common.h; }
jobs:
check-abi-diff:
build-base-ref:
runs-on: ubuntu-latest
env:
build_options: -Dbuildtype=debug -Denable-true-color=yes -Dwith-proxy=yes -Dc_args=-DPERL_EUPXS_ALWAYS_EXPORT
prefix: /usr/local
outputs:
base_abi: ${{ steps.out.outputs.base_abi }}
steps:
- name: set PATH
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: prepare required software
run: |
sudo apt install abigail-tools ninja-build libutf8proc-dev libperl-dev libotr5-dev
pip3 install setuptools
pip3 install wheel
pip3 install meson
- name: checkout merge ref
uses: actions/checkout@main
with:
path: merge.src
sudo apt install $apt_build_deps
eval "$get_pip_build_deps"
- name: checkout base ref
uses: actions/checkout@main
with:
@ -30,26 +29,83 @@ jobs:
meson Build.base base.src $build_options
ninja -C Build.base
DESTDIR=$PWD/base ninja -C Build.base install
- id: out
run: |
# print versions and abi versions
eval "$getabidef_def"
base_abi=$(getabidef base$prefix)
echo base abi : $base_abi
./base$prefix/bin/irssi --version
echo "::set-output name=base_abi::$base_abi"
- uses: actions/upload-artifact@v2
with:
name: base.inst
path: base
retention-days: 1
build-merge-ref:
runs-on: ubuntu-latest
outputs:
merge_abi: ${{ steps.out.outputs.merge_abi }}
steps:
- name: set PATH
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: prepare required software
run: |
sudo apt install $apt_build_deps
eval "$get_pip_build_deps"
- name: checkout merge ref
uses: actions/checkout@main
with:
path: merge.src
- name: build merge ref
run: |
meson Build.merge merge.src $build_options
ninja -C Build.merge
DESTDIR=$PWD/merge ninja -C Build.merge install
- run: |
- id: out
run: |
# print versions and abi versions
getabidef() { awk '$1=="#define" && $2=="IRSSI_ABI_VERSION" { print $3 }' "$1"/include/irssi/src/common.h; }
base_abi=$(getabidef base$prefix)
echo base abi : $base_abi
./base$prefix/bin/irssi --version
echo "base_abi=$base_abi" >> $GITHUB_ENV
eval "$getabidef_def"
merge_abi=$(getabidef merge$prefix)
echo merge abi : $merge_abi
./merge$prefix/bin/irssi --version
echo "merge_abi=$merge_abi" >> $GITHUB_ENV
echo "::set-output name=merge_abi::$merge_abi"
- uses: actions/upload-artifact@v2
with:
name: merge.inst
path: merge
retention-days: 1
check-abi-diff:
runs-on: ubuntu-latest
needs:
- build-merge-ref
- build-base-ref
env:
base_abi: ${{ needs.build-base-ref.outputs.base_abi }}
merge_abi: ${{ needs.build-merge-ref.outputs.merge_abi }}
steps:
- name: prepare required software
run: |
sudo apt install abigail-tools
- name: fetch base build
uses: actions/download-artifact@v2
with:
name: base.inst
path: base
- name: fetch merge build
uses: actions/download-artifact@v2
with:
name: merge.inst
path: merge
- run: |
# abipkgdiff
abipkgdiff -l base merge && diff_ret=0 || diff_ret=$?
abipkgdiff -l base merge >abipkgdiff.out && diff_ret=0 || diff_ret=$?
echo "diff_ret=$diff_ret" >> $GITHUB_ENV
cat abipkgdiff.out
- uses: actions/upload-artifact@v2
with:
path: abipkgdiff.out
- run: |
# Check if no changes are needed
if [ "$diff_ret" -ne 0 ]; then

View File

@ -1,21 +1,111 @@
on: [pull_request]
on:
push:
branches:
- master
pull_request:
name: Check Irssi
env:
apt_build_deps: libutf8proc-dev libperl-dev libotr5-dev
apt_build_deps_meson: ninja-build
apt_build_deps_autotools: autoconf automake libtool
get_pip_build_deps_meson: pip3 install setuptools; pip3 install wheel; pip3 install meson${meson_ver:+==${meson_ver}}
build_options_meson: -Dwith-proxy=yes -Dwith-bot=yes -Dwith-perl=yes -Dwith-otr=yes
build_options_configure: --with-proxy=module --with-bot --with-perl=module --with-otr=module
prefix: ~/irssi-build
jobs:
install:
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: install
uses: irssi-import/actions-irssi/check-irssi@master
with:
args: before_install install
- name: unit_tests
uses: irssi-import/actions-irssi/check-irssi@master
with:
args: unit_tests after_unit_tests
- name: script
uses: irssi-import/actions-irssi/check-irssi@master
env:
TERM: xterm
with:
args: before_script script after_script
- name: prepare required software
run: |
sudo apt install $apt_build_deps $apt_build_deps_autotools
- uses: actions/checkout@main
- name: make dist
run: |
# make dist
./autogen.sh $build_options_configure
make dist
- uses: actions/upload-artifact@v2
with:
path: irssi-*.tar.gz
retention-days: 1
install:
runs-on: ${{ matrix.os }}
env:
CC: ${{ matrix.compiler }}
needs: dist
strategy:
matrix:
os: [ubuntu-16.04, ubuntu-latest]
builder: [meson, configure]
compiler: [clang, gcc]
include:
- os: ubuntu-16.04
builder: meson
meson_ver: 0.49.2
steps:
- name: fetch dist
uses: actions/download-artifact@v2
- name: set PATH
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: prepare required software
env:
meson_ver: ${{ matrix.meson_ver }}
run: |
sudo apt install $apt_build_deps $apt_build_deps_${{ matrix.builder }}
eval "$get_pip_build_deps_${{ matrix.builder }}"
curl -SLf https://github.com/irssi-import/actions-irssi/raw/master/check-irssi/render.pl -o ~/render.pl && chmod +x ~/render.pl
- name: unpack archive
run: tar xaf artifact/irssi-*.tar.gz
- name: build and install with meson
run: |
# ninja install
cd irssi-*/
meson Build $build_options_meson --prefix=${prefix/\~/~}
ninja -C Build
ninja -C Build install
if: ${{ matrix.builder == 'meson' }}
- name: build and install with Makefile
run: |
# make install
cd irssi-*/
mkdir Build
cd Build
../configure $build_options_configure --prefix=${prefix/\~/~} --enable-always-build-tests
make CFLAGS="-Wall -Werror -Werror=declaration-after-statement"
make install
if: ${{ matrix.builder == 'configure' }}
- name: run tests with Makefile
run: |
# make check
cd irssi-*/Build
make -C tests -sk check
find -name test-suite.log -exec cat {} +
if: ${{ matrix.builder == 'configure' }}
- name: run tests with Meson
run: |
# ninja test
cd irssi-*/
ninja -C Build test
find -name testlog.txt -exec sed -i -e '/Inherited environment:.* GITHUB/d' {} + -exec cat {} +
if: ${{ matrix.builder == 'meson' }}
- name: run launch test
env:
TERM: xterm
run: |
# automated irssi launch test
cd
mkdir irssi-test
echo 'echo automated irssi launch test
^set settings_autosave off
^set -clear log_close_string
^set -clear log_day_changed
^set -clear log_open_string
^set log_timestamp *
^window log on' > irssi-test/startup
echo load perl >> irssi-test/startup
echo load proxy >> irssi-test/startup
echo ^quit >> irssi-test/startup
irssi-build/bin/irssi --home irssi-test | ~/render.pl
cat irc.log.*

View File

@ -13,7 +13,7 @@ jobs:
- name: configure clang-format
run:
|
git config clangformat.binary $PWD/.github/workflows/clangformat/clang-format-xs
git config clangformat.binary $PWD/utils/clang-format-xs/clang-format-xs
git config clangformat.extensions c,h,xs
- name: run git-clang-format and Check if no changes are needed
run:

View File

@ -1,65 +0,0 @@
sudo: false
dist: xenial
language: perl
perl:
# ~stretch
- "5.24-shrplib"
- "system-perl"
env:
- CC=clang UNITTESTS=false
- CC=gcc UNITTESTS=false
- CC=clang UNITTESTS=true
matrix:
exclude:
- env: CC=clang UNITTESTS=true
perl: "system-perl"
allow_failures:
- env: CC=clang UNITTESTS=true
addons:
apt:
packages:
- libperl-dev
- elinks
- libgcrypt11-dev
- libotr5-dev
before_install:
- perl -V
- pushd ~
- curl -sSLf https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-linux.zip | funzip > bin/ninja
- chmod +x bin/ninja
- curl -sSLf https://github.com/mesonbuild/meson/releases/download/0.51.1/meson-0.51.1.tar.gz | tar xz
- ( cd bin ; ln -s ../meson-*/meson.py meson )
- curl -sSLf https://github.com/irssi-import/glib-travis-build/releases/download/2.58.3/travis-xenial-glib-2.58.3.tar.xz | tar xJ
- export PKG_CONFIG_PATH=$HOME/glib-build/lib/x86_64-linux-gnu/pkgconfig
- export LD_LIBRARY_PATH=$HOME/glib-build/lib/x86_64-linux-gnu
- popd
install:
- meson Build -Dwith-proxy=yes -Dwith-bot=yes -Dwith-perl=yes -Dwith-otr=yes --prefix=$HOME/irssi-build
- ninja -C Build
- ninja -C Build install
before_script:
- pushd ~
- mkdir irssi-test
- echo echo automated irssi launch test > irssi-test/startup;
echo ^set settings_autosave off >> irssi-test/startup;
echo ^set -clear log_close_string >> irssi-test/startup;
echo ^set -clear log_day_changed >> irssi-test/startup;
echo ^set -clear log_open_string >> irssi-test/startup;
echo ^set log_timestamp '* ' >> irssi-test/startup;
echo ^window log on >> irssi-test/startup
- echo load perl >> irssi-test/startup
- echo load proxy >> irssi-test/startup
- echo ^quit >> irssi-test/startup
script:
- irssi-build/bin/irssi --home irssi-test
- popd
- if $UNITTESTS; then ninja -C Build test; fi
after_script:
- cat ~/irc.log.*
- find -name testlog.txt -exec sed -i -e '/Inherited environment:.* TRAVIS/d' {} + -exec cat {} +

View File

@ -30,4 +30,6 @@ EXTRA_DIST = \
autogen.sh \
README.md \
$(conf_DATA) \
irssi-icon.png
irssi-icon.png \
meson.build \
meson_options.txt

View File

@ -1,6 +1,6 @@
# [Irssi](https://irssi.org/)
[![Build Status](https://travis-ci.org/irssi/irssi.svg?branch=master)](https://travis-ci.org/irssi/irssi)
![Build Status](https://github.com/irssi/irssi/workflows/Check%20Irssi/badge.svg?branch=master)
Irssi is a modular chat client that is most commonly known for its
text mode user interface, but 80% of the code isn't text mode

View File

@ -735,7 +735,7 @@ if test "x$old_dir" != "x$whole_dir"; then
if test "x$want_perl" != "xno"; then
subdirfiles=""
for i in $whole_dir/src/perl/common $whole_dir/src/perl/irc $whole_dir/src/perl/ui $whole_dir/src/perl/textui; do
subdirfiles=`echo $subdirfiles $i/typemap $i/module.h $i/*.pm $i/*.xs`
subdirfiles=`echo $subdirfiles $i/typemap $i/*.h $i/*.pm $i/*.xs`
done
for file in $whole_dir/src/perl/module.h $subdirfiles; do
link=`echo $file|$sedpath "s?$whole_dir/??"`

View File

@ -15,6 +15,7 @@ doc_DATA = \
startup-HOWTO.html \
startup-HOWTO.txt
EXTRA_DIST = $(doc_DATA) $(man_MANS)
EXTRA_DIST = $(doc_DATA) $(man_MANS) \
meson.build
SUBDIRS = help

View File

@ -7,6 +7,7 @@ help_DATA = \
EXTRA_DIST = \
Makefile.am.gen \
$(help_DATA)
$(help_DATA) \
meson.build
SUBDIRS = in

View File

@ -14,4 +14,5 @@ script_DATA = \
scriptassist.pl \
usercount.pl
EXTRA_DIST = $(script_DATA)
EXTRA_DIST = $(script_DATA) \
meson.build

View File

@ -23,3 +23,5 @@ pkginc_src_HEADERS = \
common.h
SUBDIRS = lib-config core irc fe-common $(PERLDIR) $(OTRDIR) $(TEXTUI) $(BOTUI) $(FUZZERUI)
EXTRA_DIST = meson.build

View File

@ -117,3 +117,5 @@ pkginc_core_HEADERS = \
tls.h \
write-buffer.h \
$(structure_headers)
EXTRA_DIST = meson.build

View File

@ -1 +1,3 @@
SUBDIRS = core irc
EXTRA_DIST = meson.build

View File

@ -68,3 +68,5 @@ pkginc_fe_common_core_HEADERS = \
window-items.h \
windows-layout.h \
fe-windows.h
EXTRA_DIST = meson.build

View File

@ -37,3 +37,5 @@ pkginc_fe_common_irc_HEADERS = \
fe-irc-channels.h \
module.h \
module-formats.h
EXTRA_DIST = meson.build

View File

@ -19,3 +19,5 @@ pkginc_fe_common_irc_dcc_HEADERS = \
module.h \
module-formats.h \
fe-dcc.h
EXTRA_DIST = meson.build

View File

@ -13,3 +13,5 @@ pkginc_fe_common_irc_notifylistdir=$(pkgincludedir)/src/fe-common/irc/notifylist
pkginc_fe_common_irc_notifylist_HEADERS = \
module.h \
module-formats.h
EXTRA_DIST = meson.build

View File

@ -35,3 +35,5 @@ server_fuzz_SOURCES = \
noinst_HEADERS = \
null-logger.h \
../fe-text/module-formats.h
EXTRA_DIST = meson.build

View File

@ -1 +1,3 @@
SUBDIRS = core
EXTRA_DIST = meson.build

View File

@ -28,3 +28,5 @@ theme_load_fuzz_SOURCES = \
noinst_HEADERS = \
$(top_srcdir)/src/fe-text/module-formats.h
EXTRA_DIST = meson.build

View File

@ -1 +1,3 @@
SUBDIRS = core
EXTRA_DIST = meson.build

View File

@ -28,3 +28,5 @@ event_get_params_fuzz_SOURCES = \
noinst_HEADERS = \
$(top_srcdir)/src/fe-text/module-formats.h
EXTRA_DIST = meson.build

View File

@ -16,3 +16,5 @@ botti_SOURCES = \
noinst_HEADERS = \
module.h
EXTRA_DIST = meson.build

View File

@ -70,4 +70,5 @@ noinst_HEADERS = \
module-formats.h
EXTRA_DIST = \
$(terminfo_sources)
$(terminfo_sources) \
meson.build

View File

@ -7,3 +7,5 @@ SUBDIRS = core dcc flood notifylist $(PROXY)
noinst_LIBRARIES = libirc.a
libirc_a_SOURCES = irc.c
EXTRA_DIST = meson.build

View File

@ -57,3 +57,5 @@ pkginc_irc_core_HEADERS = \
netsplit.h \
servers-idle.h \
servers-redirect.h
EXTRA_DIST = meson.build

View File

@ -25,3 +25,5 @@ pkginc_irc_dcc_HEADERS = \
dcc-queue.h \
module.h \
dcc-server.h
EXTRA_DIST = meson.build

View File

@ -10,3 +10,5 @@ libirc_flood_a_SOURCES = \
pkginc_irc_flooddir=$(pkgincludedir)/src/irc/flood
pkginc_irc_flood_HEADERS = \
module.h
EXTRA_DIST = meson.build

View File

@ -15,3 +15,5 @@ pkginc_irc_notifylist_HEADERS = \
notifylist.h \
notify-setup.h \
module.h
EXTRA_DIST = meson.build

View File

@ -23,3 +23,5 @@ noinst_HEADERS = \
clean-generic:
rm -f libirc_proxy.a
EXTRA_DIST = meson.build

View File

@ -13,3 +13,5 @@ pkginc_lib_configdir=$(pkgincludedir)/src/lib-config
pkginc_lib_config_HEADERS = \
iconfig.h \
module.h
EXTRA_DIST = meson.build

View File

@ -35,3 +35,5 @@ noinst_HEADERS = \
otr-formats.h \
otr-fe.h \
otr.h
EXTRA_DIST = meson.build

View File

@ -119,7 +119,12 @@ EXTRA_DIST = \
$(common_sources) \
$(irc_sources) \
$(ui_sources) \
$(textui_sources)
$(textui_sources) \
meson.build \
common/meson.build \
irc/meson.build \
ui/meson.build \
textui/meson.build
am_v_pl__show_gen = $(am__v_pl__show_gen_$(V))
am_v_pl__hide_gen = $(am__v_pl__hide_gen_$(V))

View File

@ -3,3 +3,5 @@ TEXTUI=fe-text
endif
SUBDIRS = fe-common irc $(TEXTUI)
EXTRA_DIST = meson.build

View File

@ -1 +1,3 @@
SUBDIRS = core
EXTRA_DIST = meson.build

View File

@ -22,3 +22,5 @@ test_formats_LDADD = \
test_formats_SOURCES = \
test-formats.c
EXTRA_DIST += meson.build

View File

@ -33,3 +33,5 @@ test_paste_join_multiline_SOURCES = \
../../src/fe-text/gui-printtext.c \
mock-irssi.c \
test-paste-join-multiline.c
EXTRA_DIST += meson.build

View File

@ -1,3 +1,5 @@
SUBDIRS = \
core \
flood
EXTRA_DIST = meson.build

View File

@ -26,3 +26,5 @@ test_channel_events_SOURCES = \
test_irc_SOURCES = \
test-irc.c
EXTRA_DIST += meson.build

View File

@ -32,3 +32,5 @@ test_796_LDADD = \
test_796_SOURCES = \
test-796.c
EXTRA_DIST += meson.build

View File

@ -2,4 +2,5 @@ themedir = $(datadir)/irssi/themes
theme_DATA = default.theme colorless.theme
EXTRA_DIST = \
$(theme_DATA)
$(theme_DATA) \
meson.build