mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Check Irssi compilation using github actions
This commit is contained in:
parent
1f05f86167
commit
8f6e67b9b3
43
.github/actions.yml
vendored
43
.github/actions.yml
vendored
@ -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.*
|
94
.github/workflows/abicheck.yml
vendored
94
.github/workflows/abicheck.yml
vendored
@ -1,25 +1,24 @@
|
||||
on: [pull_request]
|
||||
name: abicheck
|
||||
jobs:
|
||||
check-abi-diff:
|
||||
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
|
||||
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:
|
||||
build-base-ref:
|
||||
runs-on: ubuntu-latest
|
||||
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
|
||||
|
110
.github/workflows/check.yml
vendored
110
.github/workflows/check.yml
vendored
@ -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:
|
||||
- name: prepare required software
|
||||
run: |
|
||||
sudo apt install $apt_build_deps $apt_build_deps_autotools
|
||||
- uses: actions/checkout@main
|
||||
- name: install
|
||||
uses: irssi-import/actions-irssi/check-irssi@master
|
||||
- name: make dist
|
||||
run: |
|
||||
# make dist
|
||||
./autogen.sh $build_options_configure
|
||||
make dist
|
||||
- uses: actions/upload-artifact@v2
|
||||
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
|
||||
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
|
||||
with:
|
||||
args: before_script script after_script
|
||||
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.*
|
||||
|
Loading…
Reference in New Issue
Block a user