@@ -72,11 +72,36 @@ jobs:
7272 # Setup NUT, run client (add in-tree script for that and call it)
7373 # NOTE: We use binaries from the package for speedier turnaround
7474 # TOTHINK: No SSL self-reporting before NUT v2.8.5 ...
75- - name : Checkout NUT sources (for NIT script)
75+ # - name: Checkout NUT sources (for NIT script)
76+ # run: |
77+ # git clone --depth=1 https://github.com/networkupstools/nut
78+
79+ - name : Fetch NIT script from NUT sources
7680 run : |
77- git clone --depth=1 https://github.com/networkupstools/nut
81+ curl -L https://raw.githubusercontent.com/networkupstools/nut/refs/heads/master/tests/NIT/nit.sh > ~/nit.sh \
82+ || cp -pf ~/nit.sh.bak ~/nit.sh \
83+ || { git clone --depth=1 https://github.com/networkupstools/nut && cp -pf nut/tests/NIT/nit.sh ~/nit.sh ; } \
84+ || exit
85+ [ -s ~/nit.sh ] || exit
86+ chmod +x ~/nit.sh
87+ cp -pf ~/nit.sh ~/nit.sh.bak
88+
89+ - name : Prepare nit.sh.bak cache
90+ # Based on https://docs.github.com/en/actions/reference/workflows-and-actions/dependency-caching#example-using-the-cache-action example
91+ id : cache-nitcache
92+ uses : actions/cache@v4
93+ env :
94+ cache-name : cache-nitcache-
95+ with :
96+ path : |
97+ ~/nit.sh.bak
98+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/.timestamp-init') }}
99+ restore-keys : |
100+ ${{ runner.os }}-build-${{ env.cache-name }}-
101+ ${{ runner.os }}-build-
102+ ${{ runner.os }}-
78103
79104 - if : matrix.os == 'ubuntu-latest'
80105 name : Test jNut with NIT
81106 run : |
82- PATH="`pwd`/nut/tests/NIT :${PATH}" ./test-NIT.sh
107+ PATH="${HOME} :${PATH}" ./test-NIT.sh
0 commit comments