From 536d84ecb51903f8f4b13fb8ecc9b9544d88e7b5 Mon Sep 17 00:00:00 2001 From: Aloxaf Date: Wed, 25 Sep 2024 17:37:40 +0800 Subject: [PATCH 1/2] fix: unable to build binary module on some new systems --- .github/workflows/zsh.yaml | 2 +- lib/-ftb-build-module | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/zsh.yaml b/.github/workflows/zsh.yaml index 3a299e2..6248522 100644 --- a/.github/workflows/zsh.yaml +++ b/.github/workflows/zsh.yaml @@ -32,7 +32,7 @@ jobs: fetch-depth: 1 - name: install dependencies - run: apt update && apt-get install -y git build-essential autoconf libncurses-dev + run: apt update && apt-get install -y git curl build-essential autoconf libncurses-dev - name: test completion run: cd test && zsh -f runtests.zsh fzftab.ztst diff --git a/lib/-ftb-build-module b/lib/-ftb-build-module index d74353b..d827756 100644 --- a/lib/-ftb-build-module +++ b/lib/-ftb-build-module @@ -22,6 +22,14 @@ ln -sf $PWD/Src/fzftab.mdd ./zsh/$zsh_version/Src/Modules/ # build zsh cd -q ./zsh/$zsh_version + +git checkout -- . + +[[ $zsh_version != "5.9" ]] || { + curl -s https://github.com/zsh-users/zsh/commit/4c89849c98172c951a9def3690e8647dae76308f.patch | git apply --exclude=ChangeLog - + curl -s https://github.com/zsh-users/zsh/commit/ab4d62eb975a4c4c51dd35822665050e2ddc6918.patch | git apply --exclude=ChangeLog - +} + [[ -f ./configure ]] || ./Util/preconfig [[ -f ./Makefile ]] || ./configure --disable-gdbm --disable-pcre --without-tcsetpgrp --prefix=/tmp/zsh-fzf-tab-module ${bundle:+DL_EXT=bundle} make -j$nproc From 5a1e963548b30ee6e29d6b438a3d0fdbe6abc790 Mon Sep 17 00:00:00 2001 From: Aloxaf Date: Wed, 25 Sep 2024 18:12:01 +0800 Subject: [PATCH 2/2] ci: test on archlinux --- .github/workflows/linux.yaml | 20 +++++++++++++++----- .github/workflows/macos.yaml | 2 +- .github/workflows/zsh.yaml | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index b6309f2..595f720 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -1,4 +1,4 @@ -name: test on linux +name: Linux compability on: push: @@ -10,18 +10,28 @@ on: jobs: test: - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - os: [ubuntu-latest] + os: ["ubuntu:latest", "archlinux:latest"] + container: + image: ${{ matrix.os }} steps: - name: checkout uses: actions/checkout@v1 with: fetch-depth: 1 - - name: install zsh - run: sudo apt-get install -y zsh + - name: install dependencies + run: | + if [ "${{ matrix.os }}" = "ubuntu:latest" ]; then + apt-get update + apt-get install -y zsh git curl build-essential autoconf libncurses-dev + elif [ "${{ matrix.os }}" = "archlinux:latest" ]; then + pacman -Syu --noconfirm + pacman -S --noconfirm zsh base-devel git + fi - name: test completion run: cd test && zsh -f runtests.zsh fzftab.ztst diff --git a/.github/workflows/macos.yaml b/.github/workflows/macos.yaml index e504cfa..a0ade1c 100644 --- a/.github/workflows/macos.yaml +++ b/.github/workflows/macos.yaml @@ -1,4 +1,4 @@ -name: test on macOS +name: macOS compability on: push: diff --git a/.github/workflows/zsh.yaml b/.github/workflows/zsh.yaml index 6248522..e4117cf 100644 --- a/.github/workflows/zsh.yaml +++ b/.github/workflows/zsh.yaml @@ -1,4 +1,4 @@ -name: test on different zsh versions +name: Zsh compability on: push: