diff --git a/.github/workflows/ci-experimental.yml b/.github/workflows/ci-experimental.yml index 082906904..8ea7aca0c 100644 --- a/.github/workflows/ci-experimental.yml +++ b/.github/workflows/ci-experimental.yml @@ -65,7 +65,7 @@ jobs: - name: Get submodules hash id: submodules run: | - echo "hash=$(git submodule status | sha256sum | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT + echo "hash=$(git submodule status | awk '{print $1}' | sort | shasum -a 256 | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT - name: Cache submodules uses: actions/cache@v3 @@ -95,7 +95,7 @@ jobs: - name: Get submodules hash id: submodules run: | - echo "hash=$(git submodule status | sha256sum | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT + echo "hash=$(git submodule status | awk '{print $1}' | sort | shasum -a 256 | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT - name: Cache submodules uses: actions/cache@v3 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1019f6dae..984b47d22 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,20 +70,19 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 - with: - submodules: recursive - - name: Get submodules versions + - name: Get submodules hash id: submodules - shell: bash run: | - echo "nim-hash=$(git rev-parse HEAD:vendor/nimbus-build-system)" >> $GITHUB_OUTPUT + echo "hash=$(git submodule status | awk '{print $1}' | sort | shasum -a 256 | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT - - name: Cache nim + - name: Cache submodules uses: actions/cache@v3 with: - path: vendor/nimbus-build-system/vendor/Nim/bin - key: ${{ runner.os }}-nim-${{ steps.submodules.outputs.nim-hash }} + path: | + vendor/ + .git/modules + key: ${{ runner.os }}-vendor-modules-${{ steps.submodules.outputs.hash }} - name: Build binaries run: make V=1 LOG_LEVEL=DEBUG QUICK_AND_DIRTY_COMPILER=1 v2 tools @@ -101,20 +100,19 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 - with: - submodules: recursive - - name: Get submodules versions + - name: Get submodules hash id: submodules - shell: bash run: | - echo "nim-hash=$(git rev-parse HEAD:vendor/nimbus-build-system)" >> $GITHUB_OUTPUT + echo "hash=$(git submodule status | awk '{print $1}' | sort | shasum -a 256 | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT - - name: Cache nim + - name: Cache submodules uses: actions/cache@v3 with: - path: vendor/nimbus-build-system/vendor/Nim/bin - key: ${{ runner.os }}-nim-${{ steps.submodules.outputs.nim-hash }} + path: | + vendor/ + .git/modules + key: ${{ runner.os }}-vendor-modules-${{ steps.submodules.outputs.hash }} - name: Run tests run: make V=1 LOG_LEVEL=DEBUG QUICK_AND_DIRTY_COMPILER=1 test2 testwakunode2 @@ -137,7 +135,7 @@ jobs: - name: Get submodules hash id: submodules run: | - echo "hash=$(git submodule status | sha256sum | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT + echo "hash=$(git submodule status | awk '{print $1}' | sort | shasum -a 256 | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT - name: Cache submodules uses: actions/cache@v3 @@ -167,7 +165,7 @@ jobs: - name: Get submodules hash id: submodules run: | - echo "hash=$(git submodule status | sha256sum | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT + echo "hash=$(git submodule status | awk '{print $1}' | sort | shasum -a 256 | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT - name: Cache submodules uses: actions/cache@v3 diff --git a/.github/workflows/release-assets.yml b/.github/workflows/release-assets.yml index 6535bafd2..d217b4ed3 100644 --- a/.github/workflows/release-assets.yml +++ b/.github/workflows/release-assets.yml @@ -27,7 +27,7 @@ jobs: - name: Get submodules hash id: submodules run: | - echo "hash=$(git submodule status | sha256sum | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT + echo "hash=$(git submodule status | awk '{print $1}' | sort | shasum -a 256 | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT - name: Cache submodules uses: actions/cache@v3