Files
tmuxinator/.github/workflows/ci.yaml

167 lines
4.0 KiB
YAML

# continuous integration workflow based on old travis-ci configuration
name: Integration Tests
on:
push:
branches:
- master
pull_request:
jobs:
build-tmux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tmux_version:
- '3.6a'
- '3.6'
- '3.5a'
- '3.5'
- '3.4'
- '3.3a'
- '3.3'
- '3.2a'
- '3.2'
- '3.1c'
- '3.1b'
- '3.1a'
- '3.1'
- '3.0a'
- '3.0'
- '2.9a'
- '2.9'
- '2.8'
- '2.7'
- '2.6'
- '2.5'
- '2.4'
- '2.3'
- '2.2'
- '2.1'
- '2.0'
- '1.9'
- '1.8'
- '1.7'
- '1.6'
- '1.5'
steps:
- name: "Cache tmux ${{ matrix.tmux_version }} binary"
id: cache-tmux
uses: actions/cache@v4
with:
# Only the binary is cached; libevent/libncurses are dynamically linked
# from system packages (apt-installed on every job) so they are not
# part of the build prefix and do not need to be cached.
path: ~/.local/bin/tmux
key: tmux-bin-${{ runner.os }}-${{ matrix.tmux_version }}
- name: "Build and install tmux ${{ matrix.tmux_version }}"
if: steps.cache-tmux.outputs.cache-hit != 'true'
run: |
# build dependencies
sudo apt-get update -qq
# note: pkg-config must be installed before dep libs or the build fails
sudo apt-get install -y -qq pkg-config build-essential autoconf automake bison git
sudo apt-get install -y libevent-dev libncurses-dev
# build and install tmux to ~/.local so the binary can be cached
git clone https://github.com/tmux/tmux.git tmux
cd tmux
git checkout ${{ matrix.tmux_version }}
bash autogen.sh
bash ./configure --prefix="$HOME/.local" && make && make install
cd ..
~/.local/bin/tmux -V
test:
needs: build-tmux
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
strategy:
fail-fast: false
matrix:
ruby_version:
- '4.0.1'
- '3.4.8'
- '3.3.10'
- '3.2.10'
tmux_version:
- '3.6a'
- '3.6'
- '3.5a'
- '3.5'
- '3.4'
- '3.3a'
- '3.3'
- '3.2a'
- '3.2'
- '3.1c'
- '3.1b'
- '3.1a'
- '3.1'
- '3.0a'
- '3.0'
- '2.9a'
- '2.9'
- '2.8'
- '2.7'
- '2.6'
- '2.5'
- '2.4'
- '2.3'
- '2.2'
- '2.1'
- '2.0'
- '1.9'
- '1.8'
- '1.7'
- '1.6'
- '1.5'
steps:
- uses: actions/checkout@v6
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: "Install tmux ${{ matrix.tmux_version }} runtime dependencies"
run: |
sudo apt-get update -qq
sudo apt-get install -y libevent-dev libncurses-dev
- name: "Restore tmux ${{ matrix.tmux_version }} binary from cache"
uses: actions/cache@v4
with:
path: ~/.local/bin/tmux
key: tmux-bin-${{ runner.os }}-${{ matrix.tmux_version }}
fail-on-cache-miss: true
- name: Add tmux to PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: "Test ruby ${{ matrix.ruby_version }} tmux ${{ matrix.tmux_version }}"
run: |
tmux -V
bundle exec rake test
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: "run-3.3.5-1.5,run-3.3.5-2.6,run-3.3.5-3.5a"