fix issue520: when resize the group chat window, user icon will be hi… #756
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ '**' ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build-on-mac: | |
strategy: | |
matrix: | |
runs-on: [macos-latest] | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Configure Homebrew cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/Library/Caches/Homebrew | |
key: ${{ runner.os }}-v1 | |
- name: brew install | |
run: brew install --display-times meson gettext gtk+3 jsoncpp glog gtk-mac-integration libsigc++@2 | |
- name: meson | |
run: meson builddir | |
- name: build | |
run: ninja -v -C builddir | |
- name: install | |
run: ninja -C builddir install | |
- name: test | |
run: | | |
sudo ifconfig lo0 alias 127.0.0.2 up | |
sudo ifconfig lo0 alias 127.0.0.3 up | |
sudo ifconfig lo0 alias 127.0.0.4 up | |
meson test -C builddir --verbose --no-stdsplit | |
build-on-linux: | |
strategy: | |
matrix: | |
runs-on: [ubuntu-18.04, ubuntu-20.04] | |
compiler: [g++, clang++] | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: apt install | |
run: sudo apt update && sudo apt install -y libgoogle-glog-dev libgtk-3-dev libglib2.0-dev libjsoncpp-dev g++ meson xvfb libsigc++-2.0-dev appstream | |
- name: meson | |
run: meson builddir | |
env: | |
CXX: ${{ matrix.compiler }} | |
- name: build | |
run: ninja -v -C builddir | |
- name: install | |
run: sudo ninja -C builddir install | |
- name: test | |
run: | | |
xvfb-run -a meson test -C builddir --verbose --no-stdsplit | |
codecov: | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: apt install | |
run: sudo apt update && sudo apt install -y lcov libgoogle-glog-dev libgtk-3-dev libglib2.0-dev libjsoncpp-dev g++ meson xvfb libsigc++-2.0-dev appstream | |
- name: meson | |
run: meson -D b_coverage=true builddir | |
- name: build | |
run: ninja -v -C builddir | |
- name: install | |
run: sudo ninja -C builddir install | |
- name: test | |
run: | | |
xvfb-run -a meson test -C builddir --verbose --no-stdsplit | |
- name: lcov | |
run: | | |
lcov --directory . --capture --output-file coverage.info; # capture coverage info | |
lcov --remove coverage.info '/usr/*' --output-file coverage.info; # filter out system | |
lcov --remove coverage.info '*Test*' --output-file coverage.info; # filter out system | |
lcov --remove coverage.info '*gtest*' --output-file coverage.info; # filter out system | |
lcov --list coverage.info; #debug info | |
- uses: codecov/codecov-action@v1 | |
with: | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) | |
build_job: | |
# The host should always be linux | |
runs-on: ubuntu-18.04 | |
name: Build on ${{ matrix.distro }} ${{ matrix.arch }} | |
# Run steps on a matrix of 3 arch/distro combinations | |
strategy: | |
matrix: | |
include: | |
- arch: aarch64 | |
distro: ubuntu18.04 | |
- arch: ppc64le | |
distro: ubuntu18.04 | |
- arch: s390x | |
distro: ubuntu18.04 | |
- arch: armv7 | |
distro: ubuntu18.04 | |
steps: | |
- uses: actions/checkout@v2.1.0 | |
- uses: uraimo/run-on-arch-action@v2.0.5 | |
name: Build artifact | |
id: build | |
with: | |
arch: ${{ matrix.arch }} | |
distro: ${{ matrix.distro }} | |
# Not required, but speeds up builds | |
githubToken: ${{ github.token }} | |
# Create an artifacts directory | |
setup: | | |
mkdir -p "${PWD}/artifacts" | |
# Mount the artifacts directory as /artifacts in the container | |
dockerRunArgs: | | |
--volume "${PWD}/artifacts:/artifacts" | |
# Pass some environment variables to the container | |
env: | # YAML, but pipe character is necessary | |
artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }} | |
# The shell to run commands with in the container | |
shell: /bin/sh | |
# Install some dependencies in the container. This speeds up builds if | |
# you are also using githubToken. Any dependencies installed here will | |
# be part of the container image that gets cached, so subsequent | |
# builds don't have to re-install them. The image layer is cached | |
# publicly in your project's package repository, so it is vital that | |
# no secrets are present in the container state or logs. | |
install: | | |
case "${{ matrix.distro }}" in | |
ubuntu*|jessie|stretch|buster) | |
apt-get update -q -y | |
apt-get install -q -y git libgoogle-glog-dev libgtk-3-dev libglib2.0-dev libjsoncpp-dev g++ meson xvfb libsigc++-2.0-dev appstream | |
;; | |
fedora*) | |
dnf -y update | |
dnf -y install git which | |
;; | |
alpine*) | |
apk update | |
apk add git | |
;; | |
esac | |
# Produce a binary artifact and place it in the mounted volume | |
run: | | |
meson builddir | |
ninja -v -C builddir | |
ninja -C builddir install | |
xvfb-run -a meson test -C builddir --verbose --no-stdsplit | |
# - name: Show the artifact | |
# # Items placed in /artifacts in the container will be in | |
# # ${PWD}/artifacts on the host. | |
# run: | | |
# ls -al "${PWD}/artifacts" |