From 1e7af8bf611df1c8dc1834dfa1860223fdee7ffc Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Wed, 6 Jan 2021 21:52:32 +0100 Subject: [PATCH 1/5] fix autotools build --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 14a79fb5..453fcd33 100644 --- a/configure.ac +++ b/configure.ac @@ -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/??"` From 1f05f8616765fbbe901d208f697653d5ed42157f Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Wed, 6 Jan 2021 20:58:08 +0100 Subject: [PATCH 2/5] package the meson.build files --- Makefile.am | 4 +++- docs/Makefile.am | 3 ++- docs/help/Makefile.am.gen | 3 ++- scripts/Makefile.am | 3 ++- src/Makefile.am | 2 ++ src/core/Makefile.am | 2 ++ src/fe-common/Makefile.am | 2 ++ src/fe-common/core/Makefile.am | 2 ++ src/fe-common/irc/Makefile.am | 2 ++ src/fe-common/irc/dcc/Makefile.am | 2 ++ src/fe-common/irc/notifylist/Makefile.am | 2 ++ src/fe-fuzz/Makefile.am | 2 ++ src/fe-fuzz/fe-common/Makefile.am | 2 ++ src/fe-fuzz/fe-common/core/Makefile.am | 2 ++ src/fe-fuzz/irc/Makefile.am | 2 ++ src/fe-fuzz/irc/core/Makefile.am | 2 ++ src/fe-none/Makefile.am | 2 ++ src/fe-text/Makefile.am | 3 ++- src/irc/Makefile.am | 2 ++ src/irc/core/Makefile.am | 2 ++ src/irc/dcc/Makefile.am | 2 ++ src/irc/flood/Makefile.am | 2 ++ src/irc/notifylist/Makefile.am | 2 ++ src/irc/proxy/Makefile.am | 2 ++ src/lib-config/Makefile.am | 2 ++ src/otr/Makefile.am | 2 ++ src/perl/Makefile.am | 7 ++++++- tests/Makefile.am | 2 ++ tests/fe-common/Makefile.am | 2 ++ tests/fe-common/core/Makefile.am | 2 ++ tests/fe-text/Makefile.am | 2 ++ tests/irc/Makefile.am | 2 ++ tests/irc/core/Makefile.am | 2 ++ tests/irc/flood/Makefile.am | 2 ++ themes/Makefile.am | 3 ++- 35 files changed, 75 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8bfa362e..74f81303 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,4 +30,6 @@ EXTRA_DIST = \ autogen.sh \ README.md \ $(conf_DATA) \ - irssi-icon.png + irssi-icon.png \ + meson.build \ + meson_options.txt diff --git a/docs/Makefile.am b/docs/Makefile.am index 23d61648..05ebb319 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -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 diff --git a/docs/help/Makefile.am.gen b/docs/help/Makefile.am.gen index abf824b4..917abe64 100644 --- a/docs/help/Makefile.am.gen +++ b/docs/help/Makefile.am.gen @@ -7,6 +7,7 @@ help_DATA = \ EXTRA_DIST = \ Makefile.am.gen \ - $(help_DATA) + $(help_DATA) \ + meson.build SUBDIRS = in diff --git a/scripts/Makefile.am b/scripts/Makefile.am index cd795153..42b3ea7b 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -14,4 +14,5 @@ script_DATA = \ scriptassist.pl \ usercount.pl -EXTRA_DIST = $(script_DATA) +EXTRA_DIST = $(script_DATA) \ + meson.build diff --git a/src/Makefile.am b/src/Makefile.am index 48cdc3eb..83fb562f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 diff --git a/src/core/Makefile.am b/src/core/Makefile.am index 7cf172ef..b49dad18 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -117,3 +117,5 @@ pkginc_core_HEADERS = \ tls.h \ write-buffer.h \ $(structure_headers) + +EXTRA_DIST = meson.build diff --git a/src/fe-common/Makefile.am b/src/fe-common/Makefile.am index d5f92eec..f4b78b34 100644 --- a/src/fe-common/Makefile.am +++ b/src/fe-common/Makefile.am @@ -1 +1,3 @@ SUBDIRS = core irc + +EXTRA_DIST = meson.build diff --git a/src/fe-common/core/Makefile.am b/src/fe-common/core/Makefile.am index 4e8fdcb2..7e76d3a0 100644 --- a/src/fe-common/core/Makefile.am +++ b/src/fe-common/core/Makefile.am @@ -68,3 +68,5 @@ pkginc_fe_common_core_HEADERS = \ window-items.h \ windows-layout.h \ fe-windows.h + +EXTRA_DIST = meson.build diff --git a/src/fe-common/irc/Makefile.am b/src/fe-common/irc/Makefile.am index 9efb71d3..401720f6 100644 --- a/src/fe-common/irc/Makefile.am +++ b/src/fe-common/irc/Makefile.am @@ -37,3 +37,5 @@ pkginc_fe_common_irc_HEADERS = \ fe-irc-channels.h \ module.h \ module-formats.h + +EXTRA_DIST = meson.build diff --git a/src/fe-common/irc/dcc/Makefile.am b/src/fe-common/irc/dcc/Makefile.am index c6a5d79d..0be3cffa 100644 --- a/src/fe-common/irc/dcc/Makefile.am +++ b/src/fe-common/irc/dcc/Makefile.am @@ -19,3 +19,5 @@ pkginc_fe_common_irc_dcc_HEADERS = \ module.h \ module-formats.h \ fe-dcc.h + +EXTRA_DIST = meson.build diff --git a/src/fe-common/irc/notifylist/Makefile.am b/src/fe-common/irc/notifylist/Makefile.am index b0f35fdf..6fca7676 100644 --- a/src/fe-common/irc/notifylist/Makefile.am +++ b/src/fe-common/irc/notifylist/Makefile.am @@ -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 diff --git a/src/fe-fuzz/Makefile.am b/src/fe-fuzz/Makefile.am index 7ce2fcdd..d54c3291 100644 --- a/src/fe-fuzz/Makefile.am +++ b/src/fe-fuzz/Makefile.am @@ -35,3 +35,5 @@ server_fuzz_SOURCES = \ noinst_HEADERS = \ null-logger.h \ ../fe-text/module-formats.h + +EXTRA_DIST = meson.build diff --git a/src/fe-fuzz/fe-common/Makefile.am b/src/fe-fuzz/fe-common/Makefile.am index 52770885..74f13119 100644 --- a/src/fe-fuzz/fe-common/Makefile.am +++ b/src/fe-fuzz/fe-common/Makefile.am @@ -1 +1,3 @@ SUBDIRS = core + +EXTRA_DIST = meson.build diff --git a/src/fe-fuzz/fe-common/core/Makefile.am b/src/fe-fuzz/fe-common/core/Makefile.am index da8731b9..8fcd59b3 100644 --- a/src/fe-fuzz/fe-common/core/Makefile.am +++ b/src/fe-fuzz/fe-common/core/Makefile.am @@ -28,3 +28,5 @@ theme_load_fuzz_SOURCES = \ noinst_HEADERS = \ $(top_srcdir)/src/fe-text/module-formats.h + +EXTRA_DIST = meson.build diff --git a/src/fe-fuzz/irc/Makefile.am b/src/fe-fuzz/irc/Makefile.am index 52770885..74f13119 100644 --- a/src/fe-fuzz/irc/Makefile.am +++ b/src/fe-fuzz/irc/Makefile.am @@ -1 +1,3 @@ SUBDIRS = core + +EXTRA_DIST = meson.build diff --git a/src/fe-fuzz/irc/core/Makefile.am b/src/fe-fuzz/irc/core/Makefile.am index d66c2479..33f7664d 100644 --- a/src/fe-fuzz/irc/core/Makefile.am +++ b/src/fe-fuzz/irc/core/Makefile.am @@ -28,3 +28,5 @@ event_get_params_fuzz_SOURCES = \ noinst_HEADERS = \ $(top_srcdir)/src/fe-text/module-formats.h + +EXTRA_DIST = meson.build diff --git a/src/fe-none/Makefile.am b/src/fe-none/Makefile.am index 570d6261..44c23d6e 100644 --- a/src/fe-none/Makefile.am +++ b/src/fe-none/Makefile.am @@ -16,3 +16,5 @@ botti_SOURCES = \ noinst_HEADERS = \ module.h + +EXTRA_DIST = meson.build diff --git a/src/fe-text/Makefile.am b/src/fe-text/Makefile.am index 8835f4b9..c7044ba9 100644 --- a/src/fe-text/Makefile.am +++ b/src/fe-text/Makefile.am @@ -70,4 +70,5 @@ noinst_HEADERS = \ module-formats.h EXTRA_DIST = \ - $(terminfo_sources) + $(terminfo_sources) \ + meson.build diff --git a/src/irc/Makefile.am b/src/irc/Makefile.am index 78a38643..a271a891 100644 --- a/src/irc/Makefile.am +++ b/src/irc/Makefile.am @@ -7,3 +7,5 @@ SUBDIRS = core dcc flood notifylist $(PROXY) noinst_LIBRARIES = libirc.a libirc_a_SOURCES = irc.c + +EXTRA_DIST = meson.build diff --git a/src/irc/core/Makefile.am b/src/irc/core/Makefile.am index 63b41113..858d7fcb 100644 --- a/src/irc/core/Makefile.am +++ b/src/irc/core/Makefile.am @@ -57,3 +57,5 @@ pkginc_irc_core_HEADERS = \ netsplit.h \ servers-idle.h \ servers-redirect.h + +EXTRA_DIST = meson.build diff --git a/src/irc/dcc/Makefile.am b/src/irc/dcc/Makefile.am index a81bf84d..887a65d2 100644 --- a/src/irc/dcc/Makefile.am +++ b/src/irc/dcc/Makefile.am @@ -25,3 +25,5 @@ pkginc_irc_dcc_HEADERS = \ dcc-queue.h \ module.h \ dcc-server.h + +EXTRA_DIST = meson.build diff --git a/src/irc/flood/Makefile.am b/src/irc/flood/Makefile.am index b582ffe4..7a49001d 100644 --- a/src/irc/flood/Makefile.am +++ b/src/irc/flood/Makefile.am @@ -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 diff --git a/src/irc/notifylist/Makefile.am b/src/irc/notifylist/Makefile.am index 421bc7d4..9bc0fd8b 100644 --- a/src/irc/notifylist/Makefile.am +++ b/src/irc/notifylist/Makefile.am @@ -15,3 +15,5 @@ pkginc_irc_notifylist_HEADERS = \ notifylist.h \ notify-setup.h \ module.h + +EXTRA_DIST = meson.build diff --git a/src/irc/proxy/Makefile.am b/src/irc/proxy/Makefile.am index 6411f49d..2e7259ad 100644 --- a/src/irc/proxy/Makefile.am +++ b/src/irc/proxy/Makefile.am @@ -23,3 +23,5 @@ noinst_HEADERS = \ clean-generic: rm -f libirc_proxy.a + +EXTRA_DIST = meson.build diff --git a/src/lib-config/Makefile.am b/src/lib-config/Makefile.am index d644eae5..4912aa9b 100644 --- a/src/lib-config/Makefile.am +++ b/src/lib-config/Makefile.am @@ -13,3 +13,5 @@ pkginc_lib_configdir=$(pkgincludedir)/src/lib-config pkginc_lib_config_HEADERS = \ iconfig.h \ module.h + +EXTRA_DIST = meson.build diff --git a/src/otr/Makefile.am b/src/otr/Makefile.am index ac40cbac..149b952d 100644 --- a/src/otr/Makefile.am +++ b/src/otr/Makefile.am @@ -35,3 +35,5 @@ noinst_HEADERS = \ otr-formats.h \ otr-fe.h \ otr.h + +EXTRA_DIST = meson.build diff --git a/src/perl/Makefile.am b/src/perl/Makefile.am index 45ac1eea..ad937457 100644 --- a/src/perl/Makefile.am +++ b/src/perl/Makefile.am @@ -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)) diff --git a/tests/Makefile.am b/tests/Makefile.am index 8713b38f..0799ee3f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,3 +3,5 @@ TEXTUI=fe-text endif SUBDIRS = fe-common irc $(TEXTUI) + +EXTRA_DIST = meson.build diff --git a/tests/fe-common/Makefile.am b/tests/fe-common/Makefile.am index 52770885..74f13119 100644 --- a/tests/fe-common/Makefile.am +++ b/tests/fe-common/Makefile.am @@ -1 +1,3 @@ SUBDIRS = core + +EXTRA_DIST = meson.build diff --git a/tests/fe-common/core/Makefile.am b/tests/fe-common/core/Makefile.am index ddd619a0..eb7e2c7f 100644 --- a/tests/fe-common/core/Makefile.am +++ b/tests/fe-common/core/Makefile.am @@ -22,3 +22,5 @@ test_formats_LDADD = \ test_formats_SOURCES = \ test-formats.c + +EXTRA_DIST += meson.build diff --git a/tests/fe-text/Makefile.am b/tests/fe-text/Makefile.am index 2a3450e9..8f44dded 100644 --- a/tests/fe-text/Makefile.am +++ b/tests/fe-text/Makefile.am @@ -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 diff --git a/tests/irc/Makefile.am b/tests/irc/Makefile.am index d42cfc87..88adb5b9 100644 --- a/tests/irc/Makefile.am +++ b/tests/irc/Makefile.am @@ -1,3 +1,5 @@ SUBDIRS = \ core \ flood + +EXTRA_DIST = meson.build diff --git a/tests/irc/core/Makefile.am b/tests/irc/core/Makefile.am index 23c1ef2c..fbf001da 100644 --- a/tests/irc/core/Makefile.am +++ b/tests/irc/core/Makefile.am @@ -26,3 +26,5 @@ test_channel_events_SOURCES = \ test_irc_SOURCES = \ test-irc.c + +EXTRA_DIST += meson.build diff --git a/tests/irc/flood/Makefile.am b/tests/irc/flood/Makefile.am index 17885d53..f815504d 100644 --- a/tests/irc/flood/Makefile.am +++ b/tests/irc/flood/Makefile.am @@ -32,3 +32,5 @@ test_796_LDADD = \ test_796_SOURCES = \ test-796.c + +EXTRA_DIST += meson.build diff --git a/themes/Makefile.am b/themes/Makefile.am index ad0707c2..c8814532 100644 --- a/themes/Makefile.am +++ b/themes/Makefile.am @@ -2,4 +2,5 @@ themedir = $(datadir)/irssi/themes theme_DATA = default.theme colorless.theme EXTRA_DIST = \ - $(theme_DATA) + $(theme_DATA) \ + meson.build From 8f6e67b9b3858f3f4dd06909fa5013a6029634b8 Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Wed, 6 Jan 2021 17:10:59 +0100 Subject: [PATCH 3/5] Check Irssi compilation using github actions --- .github/actions.yml | 43 ------------ .github/workflows/abicheck.yml | 96 +++++++++++++++++++++------ .github/workflows/check.yml | 118 ++++++++++++++++++++++++++++----- 3 files changed, 178 insertions(+), 79 deletions(-) delete mode 100644 .github/actions.yml diff --git a/.github/actions.yml b/.github/actions.yml deleted file mode 100644 index ae47fbde..00000000 --- a/.github/actions.yml +++ /dev/null @@ -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.* diff --git a/.github/workflows/abicheck.yml b/.github/workflows/abicheck.yml index 86b065cd..eceaa32e 100644 --- a/.github/workflows/abicheck.yml +++ b/.github/workflows/abicheck.yml @@ -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 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 4558a244..64e5442f 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,21 +1,107 @@ on: [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.* From 7379833b53ed098bd11c4aa6a2e4dc554a574e57 Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Wed, 6 Jan 2021 22:22:00 +0100 Subject: [PATCH 4/5] move clang-format-xs into utils --- .github/workflows/clangformat.yml | 2 +- .../clangformat => utils/clang-format-xs}/clang-format-xs | 0 .../clangformat => utils/clang-format-xs}/format-xs-1.pl | 0 .../clangformat => utils/clang-format-xs}/format-xs-2.pl | 0 .../clangformat => utils/clang-format-xs}/format-xs-xml.pl | 0 5 files changed, 1 insertion(+), 1 deletion(-) rename {.github/workflows/clangformat => utils/clang-format-xs}/clang-format-xs (100%) rename {.github/workflows/clangformat => utils/clang-format-xs}/format-xs-1.pl (100%) rename {.github/workflows/clangformat => utils/clang-format-xs}/format-xs-2.pl (100%) rename {.github/workflows/clangformat => utils/clang-format-xs}/format-xs-xml.pl (100%) diff --git a/.github/workflows/clangformat.yml b/.github/workflows/clangformat.yml index 070227bf..b959fe92 100644 --- a/.github/workflows/clangformat.yml +++ b/.github/workflows/clangformat.yml @@ -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: diff --git a/.github/workflows/clangformat/clang-format-xs b/utils/clang-format-xs/clang-format-xs similarity index 100% rename from .github/workflows/clangformat/clang-format-xs rename to utils/clang-format-xs/clang-format-xs diff --git a/.github/workflows/clangformat/format-xs-1.pl b/utils/clang-format-xs/format-xs-1.pl similarity index 100% rename from .github/workflows/clangformat/format-xs-1.pl rename to utils/clang-format-xs/format-xs-1.pl diff --git a/.github/workflows/clangformat/format-xs-2.pl b/utils/clang-format-xs/format-xs-2.pl similarity index 100% rename from .github/workflows/clangformat/format-xs-2.pl rename to utils/clang-format-xs/format-xs-2.pl diff --git a/.github/workflows/clangformat/format-xs-xml.pl b/utils/clang-format-xs/format-xs-xml.pl similarity index 100% rename from .github/workflows/clangformat/format-xs-xml.pl rename to utils/clang-format-xs/format-xs-xml.pl From 168ba937c15fd8392172c3039837e9faf04a95e2 Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Wed, 6 Jan 2021 22:23:23 +0100 Subject: [PATCH 5/5] remove travis --- .github/workflows/check.yml | 6 +++- .travis.yml | 65 ------------------------------------- README.md | 2 +- 3 files changed, 6 insertions(+), 67 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 64e5442f..55499ce3 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,8 @@ -on: [pull_request] +on: + push: + branches: + - master + pull_request: name: Check Irssi env: apt_build_deps: libutf8proc-dev libperl-dev libotr5-dev diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 896048d6..00000000 --- a/.travis.yml +++ /dev/null @@ -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 {} + diff --git a/README.md b/README.md index f73b58a0..8b857eeb 100644 --- a/README.md +++ b/README.md @@ -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