fix(ci): use new caching for all stages, fix sha tool to work on both linux & mac (#1741)

This commit is contained in:
Vaclav Pavlin 2023-05-17 15:42:00 +02:00 committed by GitHub
parent e1e4ff3a38
commit 3b9acb3557
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 21 deletions

View File

@ -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

View File

@ -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

View File

@ -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