chore(control_mode): improve, fix tmux_X_X support #108
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: GitHub Actions | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
- hotfix | |
#pull_request: | |
#branches: | |
# - main | |
# - dev | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# continue other builds if one fails | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
#os: [ubuntu-latest, macos-latest, windows-latest] | |
#rust: [stable, beta, nightly] | |
versions: | |
#- { tmux: "0.8", feature: "tmux_0_8" } | |
#- { tmux: "0.9", feature: "tmux_0_9" } | |
#- { tmux: "1.0", feature: "tmux_1_0" } | |
#- { tmux: "1.1", feature: "tmux_1_1" } | |
#- { tmux: "1.2", feature: "tmux_1_2" } | |
#- { tmux: "1.3", feature: "tmux_1_3" } | |
#- { tmux: "1.4", feature: "tmux_1_4" } | |
#- { tmux: "1.5", feature: "tmux_1_5" } | |
#- { tmux: "1.6", feature: "tmux_1_6" } | |
#- { tmux: "1.7", feature: "tmux_1_7" } | |
# short form `show-options -v` first implemented | |
- { tmux: "1.8", feature: "tmux_1_8" } | |
- { tmux: "1.9", feature: "tmux_1_9" } | |
- { tmux: "1.9a", feature: "tmux_1_9a" } | |
- { tmux: "2.0", feature: "tmux_2_0" } | |
- { tmux: "2.1", feature: "tmux_2_1" } | |
- { tmux: "2.2", feature: "tmux_2_2" } | |
- { tmux: "2.3", feature: "tmux_2_3" } | |
- { tmux: "2.4", feature: "tmux_2_4" } | |
- { tmux: "2.5", feature: "tmux_2_5" } | |
- { tmux: "2.6", feature: "tmux_2_6" } | |
- { tmux: "2.7", feature: "tmux_2_7" } | |
- { tmux: "2.8", feature: "tmux_2_8" } | |
- { tmux: "2.9", feature: "tmux_2_9" } | |
- { tmux: "2.9a", feature: "tmux_2_9a" } | |
- { tmux: "3.0", feature: "tmux_3_0" } | |
- { tmux: "3.0a", feature: "tmux_3_0a" } | |
- { tmux: "3.1", feature: "tmux_3_1" } | |
- { tmux: "3.1a", feature: "tmux_3_1a" } | |
- { tmux: "3.1b", feature: "tmux_3_1b" } | |
- { tmux: "3.1c", feature: "tmux_3_1c" } | |
- { tmux: "3.2", feature: "tmux_3_2" } | |
- { tmux: "3.2a", feature: "tmux_3_2a" } | |
- { tmux: "3.3", feature: "tmux_3_3" } | |
- { tmux: "3.3a", feature: "tmux_3_3a" } | |
- { tmux: "master", feature: "tmux_X_X" } | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup tmux build cache for tmux ${{ matrix.versions.tmux }} | |
id: tmux-build-cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/tmux-builds/tmux-${{ matrix.versions.tmux }} | |
key: tmux-${{ matrix.versions.tmux }} | |
- name: Build tmux ${{ matrix.versions.tmux }} | |
if: steps.tmux-build-cache.outputs.cache-hit != 'true' | |
run: | | |
sudo apt install libevent-dev libncurses5-dev libtinfo-dev libutempter-dev bison | |
mkdir ~/tmux-builds | |
mkdir ~/tmux-src | |
git clone https://github.com/tmux/tmux.git ~/tmux-src/tmux-${{ matrix.versions.tmux }} | |
cd ~/tmux-src/tmux-${{ matrix.versions.tmux }} | |
git checkout ${{ matrix.versions.tmux }} | |
sh autogen.sh | |
./configure --prefix=$HOME/tmux-builds/tmux-${{ matrix.versions.tmux }} && make && make install | |
export PATH=$HOME/tmux-builds/tmux-${{ matrix.versions.tmux }}/bin:$PATH | |
cd ~ | |
tmux -V | |
- name: Build with feature ${{ matrix.versions.feature }} | |
run: cargo build --features ${{ matrix.versions.feature }} --no-default-features --verbose | |
- name: Run tests with feature ${{ matrix.versions.feature }} | |
run: cargo test --features ${{ matrix.versions.feature }} --no-default-features --verbose | |