@@ -70,20 +70,19 @@ jobs:
7070 steps :
7171 - name : Checkout code
7272 uses : actions/checkout@v3
73- with :
74- submodules : recursive
7573
76- - name : Get submodules versions
74+ - name : Get submodules hash
7775 id : submodules
78- shell : bash
7976 run : |
80- echo "nim- hash=$(git rev-parse HEAD:vendor/nimbus-build-system )" >> $GITHUB_OUTPUT
77+ echo "hash=$(git submodule status | awk '{print $1}' | sort | shasum -a 256 | sed 's/[ -]*//g' )" >> $GITHUB_OUTPUT
8178
82- - name : Cache nim
79+ - name : Cache submodules
8380 uses : actions/cache@v3
8481 with :
85- path : vendor/nimbus-build-system/vendor/Nim/bin
86- key : ${{ runner.os }}-nim-${{ steps.submodules.outputs.nim-hash }}
82+ path : |
83+ vendor/
84+ .git/modules
85+ key : ${{ runner.os }}-vendor-modules-${{ steps.submodules.outputs.hash }}
8786
8887 - name : Build binaries
8988 run : make V=1 LOG_LEVEL=DEBUG QUICK_AND_DIRTY_COMPILER=1 v2 tools
@@ -101,20 +100,19 @@ jobs:
101100 steps :
102101 - name : Checkout code
103102 uses : actions/checkout@v3
104- with :
105- submodules : recursive
106103
107- - name : Get submodules versions
104+ - name : Get submodules hash
108105 id : submodules
109- shell : bash
110106 run : |
111- echo "nim- hash=$(git rev-parse HEAD:vendor/nimbus-build-system )" >> $GITHUB_OUTPUT
107+ echo "hash=$(git submodule status | awk '{print $1}' | sort | shasum -a 256 | sed 's/[ -]*//g' )" >> $GITHUB_OUTPUT
112108
113- - name : Cache nim
109+ - name : Cache submodules
114110 uses : actions/cache@v3
115111 with :
116- path : vendor/nimbus-build-system/vendor/Nim/bin
117- key : ${{ runner.os }}-nim-${{ steps.submodules.outputs.nim-hash }}
112+ path : |
113+ vendor/
114+ .git/modules
115+ key : ${{ runner.os }}-vendor-modules-${{ steps.submodules.outputs.hash }}
118116
119117 - name : Run tests
120118 run : make V=1 LOG_LEVEL=DEBUG QUICK_AND_DIRTY_COMPILER=1 test2 testwakunode2
@@ -137,7 +135,7 @@ jobs:
137135 - name : Get submodules hash
138136 id : submodules
139137 run : |
140- echo "hash=$(git submodule status | sha256sum | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT
138+ echo "hash=$(git submodule status | awk '{print $1}' | sort | shasum -a 256 | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT
141139
142140 - name : Cache submodules
143141 uses : actions/cache@v3
@@ -167,7 +165,7 @@ jobs:
167165 - name : Get submodules hash
168166 id : submodules
169167 run : |
170- echo "hash=$(git submodule status | sha256sum | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT
168+ echo "hash=$(git submodule status | awk '{print $1}' | sort | shasum -a 256 | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT
171169
172170 - name : Cache submodules
173171 uses : actions/cache@v3
0 commit comments