Skip to content

Commit d04bd63

Browse files
committed
refactor: configure, make, cmake, and build ices
- 'configure' and 'make' ices improved - new 'build' ice sets 'configure' and 'make ices if no flags are needed. - new 'cmake' ice will build/install using 'cmake' - Delete command now handles programs using 'make' and 'cmake' ices - zunit tests added Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
1 parent 0ba778a commit d04bd63

File tree

13 files changed

+595
-522
lines changed

13 files changed

+595
-522
lines changed

.github/workflows/tests.yaml

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: ${{ matrix.os }}
2727
strategy:
2828
matrix:
29-
os: ["macos-latest", "ubuntu-latest"]
29+
os: ["macos-latest","ubuntu-latest"]
3030
fail-fast: false
3131

3232
steps:
@@ -39,15 +39,30 @@ jobs:
3939
id: setup-homebrew
4040
uses: Homebrew/actions/setup-homebrew@master
4141

42-
# - name: "install musl"
43-
# if: runner.os == 'Linux'
44-
# run: sudo apt-get install build-essential curl file gcc gcc-multilib glibc-source libc6 libc6-dev unzip xz-utils zsh
42+
- name: "install musl"
43+
if: runner.os == 'Linux'
44+
run: |
45+
sudo apt-get update --yes
46+
sudo apt-get install --yes \
47+
autoconf automake autotools-dev \
48+
build-essential byacc\
49+
cmake curl \
50+
file \
51+
gcc gettext glibc-source grep \
52+
libc6 libc6-dev libevent-dev libncurses5-dev libncursesw5-dev libtool libuvc0 lua5.1 \
53+
m4 \
54+
ninja-build \
55+
pkg-config \
56+
unzip \
57+
xz-utils \
58+
zsh
4559
4660
- name: "install dependencies"
4761
id: install-deps
4862
run: |
4963
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
50-
brew install --force --overwrite gnu-sed coreutils unzip xz zsh
64+
brew install --force --overwrite autoconf automake binutils byacc cmake coreutils curl gettext gnu-sed libevent libtool libuv lua lua@5.1 make ninja ncurses pkg-config texinfo unzip xz zsh
65+
brew link --force --overwrite ncurses
5166
5267
- name: "install zunit"
5368
id: install-zunit
@@ -56,23 +71,20 @@ jobs:
5671
git clone --depth 1 https://github.com/zdharma-continuum/zunit; cd ./zunit
5772
zsh -c -l './build.zsh' && sudo chmod u+x ./zunit && cp ./zunit "$HOME/.local/bin/"
5873
59-
# - name: disable secssessment system policy security
60-
# run: sudo spctl --master-disable
61-
62-
- name: "annexes"
63-
run: zunit run tests/annexes.zunit
64-
6574
- name: "commands"
6675
run: zunit run tests/commands.zunit
6776

77+
- name: "plugins"
78+
run: zunit run tests/plugins.zunit
79+
6880
- name: "gh-r"
69-
run: zunit run --fail-fast --verbose tests/gh-r.zunit
81+
run: zunit run tests/gh-r.zunit
82+
83+
- name: "annexes"
84+
run: zunit run tests/annexes.zunit
7085

7186
- name: "ices"
7287
run: zunit run tests/ices.zunit
7388

74-
- name: "plugins"
75-
run: zunit run tests/plugins.zunit
76-
7789
- name: "snippets"
7890
run: zunit run tests/snippets.zunit

README.md

Lines changed: 20 additions & 25 deletions
Large diffs are not rendered by default.

doc/zsdoc/zinit-autoload.zsh.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ Has 111 line(s). Calls functions:
470470
.zinit-delete
471471
|-- .zinit-prompt
472472
|-- .zinit-run-delete-hooks
473-
|   `-- zinit-side.zsh/.zinit-countdown
473+
|   `-- zinit.zsh/+zi-log
474474
|-- zinit-side.zsh/.zinit-compute-ice
475475
|-- zinit.zsh/+zi-log
476476
|-- zinit.zsh/.zinit-any-to-user-plugin
@@ -1015,10 +1015,10 @@ Called by:
10151015

10161016
==== .zinit-run-delete-hooks
10171017

1018-
Has 17 line(s). Calls functions:
1018+
Has 32 line(s). Calls functions:
10191019

10201020
.zinit-run-delete-hooks
1021-
`-- zinit-side.zsh/.zinit-countdown
1021+
`-- zinit.zsh/+zi-log
10221022

10231023
Uses feature(s): _eval_
10241024

@@ -1267,7 +1267,7 @@ ____
12671267
12681268
____
12691269

1270-
Has 47 line(s). Calls functions:
1270+
Has 48 line(s). Calls functions:
12711271

12721272
.zinit-show-zstatus
12731273
`-- zinit.zsh/+zi-log

doc/zsdoc/zinit-install.zsh.adoc

Lines changed: 54 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ zinit-install.zsh - a shell script
66
Documentation automatically generated with `zshelldoc'
77

88
== FUNCTIONS
9+
+zinit-cmake-hook
910
.zi::get-architecture
1011
.zinit-at-eval
1112
.zinit-compile-plugin
1213
.zinit-compinit
13-
.zinit-configure-run-autoconf
1414
.zinit-download-file-stdout
1515
.zinit-download-snippet
1616
.zinit-extract
@@ -27,6 +27,7 @@ Documentation automatically generated with `zshelldoc'
2727
.zinit-setup-plugin-dir
2828
.zinit-single-line
2929
.zinit-update-snippet
30+
__zinit-cmake-base-hook
3031
zicp
3132
ziextract
3233
zimv
@@ -57,6 +58,16 @@ Has 6 line(s). No functions are called (may set up e.g. a hook, a Zle widget bou
5758

5859
Uses feature(s): _source_
5960

61+
==== +zinit-cmake-hook
62+
63+
Has 1 line(s). Calls functions:
64+
65+
+zinit-cmake-hook
66+
`-- __zinit-cmake-base-hook
67+
`-- zinit.zsh/+zi-log
68+
69+
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
70+
6071
==== .zi::get-architecture
6172

6273
Has 39 line(s). Calls functions:
@@ -139,24 +150,6 @@ Called by:
139150
zinit.zsh/.zinit-prepare-home
140151
zinit.zsh/zinit
141152

142-
==== .zinit-configure-run-autoconf
143-
144-
____
145-
146-
Called if # passed to configure ice or no ./configure found
147-
Runs autoconf, autoreconf, and autogen.sh
148-
149-
____
150-
151-
Has 64 line(s). Calls functions:
152-
153-
.zinit-configure-run-autoconf
154-
`-- zinit-side.zsh/.zinit-countdown
155-
156-
Called by:
157-
158-
∞zinit-configure-base-hook
159-
160153
==== .zinit-download-file-stdout
161154

162155
____
@@ -282,7 +275,7 @@ ____
282275
283276
____
284277

285-
Has 57 line(s). Calls functions:
278+
Has 55 line(s). Calls functions:
286279

287280
.zinit-get-latest-gh-r-url-part
288281
`-- zinit.zsh/+zi-log
@@ -470,7 +463,7 @@ ____
470463
471464
____
472465

473-
Has 214 line(s). Calls functions:
466+
Has 213 line(s). Calls functions:
474467

475468
.zinit-setup-plugin-dir
476469
|-- .zinit-download-file-stdout
@@ -552,6 +545,26 @@ Called by:
552545

553546
zinit-autoload.zsh/.zinit-update-or-status-snippet
554547

548+
==== __zinit-cmake-base-hook
549+
550+
____
551+
552+
FUNCTION: __zinit-cmake-base-hook [[[
553+
A base common implementation of the cmake ice
554+
555+
____
556+
557+
Has 23 line(s). Calls functions:
558+
559+
__zinit-cmake-base-hook
560+
`-- zinit.zsh/+zi-log
561+
562+
Uses feature(s): _eval_, _setopt_
563+
564+
Called by:
565+
566+
+zinit-cmake-hook
567+
555568
==== zicp
556569

557570
Has 30 line(s). Doesn't call other functions.
@@ -665,43 +678,30 @@ Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
665678

666679
____
667680
668-
A base common implementation of configure'', as all
669-
the starting steps are rigid and the same in all
670-
hooks, hence the idea. TODO: use in make'' and other
671-
places.
681+
A base common implementation of the configure ice
672682
673683
____
674684

675-
Has 65 line(s). Calls functions:
685+
Has 40 line(s). Calls functions:
676686

677687
∞zinit-configure-base-hook
678-
|-- .zinit-configure-run-autoconf
679-
|   `-- zinit-side.zsh/.zinit-countdown
680-
|-- zinit-side.zsh/.zinit-countdown
688+
|-- zinit.zsh/+zi-log
681689
`-- zinit.zsh/@zinit-substitute
682690

691+
Uses feature(s): _eval_, _setopt_
692+
683693
Called by:
684694

685695
∞zinit-configure-e-hook
686696
∞zinit-configure-hook
687697

688698
==== ∞zinit-configure-e-hook
689699

690-
____
691-
692-
The !-version of configure'' ice. Runs in between
693-
of make'!!' and make'!'. Configure naturally runs
694-
before make.
695-
696-
____
697-
698700
Has 1 line(s). Calls functions:
699701

700702
∞zinit-configure-e-hook
701703
`-- ∞zinit-configure-base-hook
702-
|-- .zinit-configure-run-autoconf
703-
|   `-- zinit-side.zsh/.zinit-countdown
704-
|-- zinit-side.zsh/.zinit-countdown
704+
|-- zinit.zsh/+zi-log
705705
`-- zinit.zsh/@zinit-substitute
706706

707707
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
@@ -720,9 +720,7 @@ Has 1 line(s). Calls functions:
720720

721721
∞zinit-configure-hook
722722
`-- ∞zinit-configure-base-hook
723-
|-- .zinit-configure-run-autoconf
724-
|   `-- zinit-side.zsh/.zinit-countdown
725-
|-- zinit-side.zsh/.zinit-countdown
723+
|-- zinit.zsh/+zi-log
726724
`-- zinit.zsh/@zinit-substitute
727725

728726
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
@@ -753,12 +751,20 @@ Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
753751

754752
==== ∞zinit-make-base-hook
755753

756-
Has 29 line(s). Calls functions:
754+
____
755+
756+
A base common implementation of the make ice
757+
758+
____
759+
760+
Has 57 line(s). Calls functions:
757761

758762
∞zinit-make-base-hook
759-
|-- zinit-side.zsh/.zinit-countdown
763+
|-- zinit.zsh/+zi-log
760764
`-- zinit.zsh/@zinit-substitute
761765

766+
Uses feature(s): _eval_, _setopt_
767+
762768
Called by:
763769

764770
∞zinit-make-e-hook
@@ -771,7 +777,7 @@ Has 1 line(s). Calls functions:
771777

772778
∞zinit-make-e-hook
773779
`-- ∞zinit-make-base-hook
774-
|-- zinit-side.zsh/.zinit-countdown
780+
|-- zinit.zsh/+zi-log
775781
`-- zinit.zsh/@zinit-substitute
776782

777783
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
@@ -782,7 +788,7 @@ Has 1 line(s). Calls functions:
782788

783789
∞zinit-make-ee-hook
784790
`-- ∞zinit-make-base-hook
785-
|-- zinit-side.zsh/.zinit-countdown
791+
|-- zinit.zsh/+zi-log
786792
`-- zinit.zsh/@zinit-substitute
787793

788794
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
@@ -793,7 +799,7 @@ Has 1 line(s). Calls functions:
793799

794800
∞zinit-make-hook
795801
`-- ∞zinit-make-base-hook
796-
|-- zinit-side.zsh/.zinit-countdown
802+
|-- zinit.zsh/+zi-log
797803
`-- zinit.zsh/@zinit-substitute
798804

799805
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

doc/zsdoc/zinit-side.zsh.adoc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,9 @@ Uses feature(s): _trap_
142142

143143
Called by:
144144

145-
zinit-autoload.zsh/.zinit-run-delete-hooks
146-
zinit-install.zsh/.zinit-configure-run-autoconf
147145
zinit-install.zsh/∞zinit-atclone-hook
148146
zinit-install.zsh/∞zinit-atpull-e-hook
149147
zinit-install.zsh/∞zinit-atpull-hook
150-
zinit-install.zsh/∞zinit-configure-base-hook
151-
zinit-install.zsh/∞zinit-make-base-hook
152148

153149
==== .zinit-exists-physically
154150

0 commit comments

Comments
 (0)