mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-26 23:02:30 +00:00
refactor(ci): cache all of submodules/deps to speed up build time (#1731)
This commit is contained in:
parent
d822cdc599
commit
4394c69db8
44
.github/workflows/ci-experimental.yml
vendored
44
.github/workflows/ci-experimental.yml
vendored
@ -61,27 +61,19 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Get submodule versions
|
||||
- name: Get submodules hash
|
||||
id: submodules
|
||||
shell: bash
|
||||
run: |
|
||||
echo "nim-hash=$(git rev-parse HEAD:vendor/nimbus-build-system)" >> $GITHUB_OUTPUT
|
||||
echo "zerokit-hash=$(git rev-parse HEAD:vendor/zerokit)" >> $GITHUB_OUTPUT
|
||||
echo "hash=$(git submodule status | sha256sum | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache nim compiler
|
||||
- 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 }}
|
||||
|
||||
- name: Cache zerokit artifacts
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: vendor/zerokit/target/release
|
||||
key: ${{ runner.os }}-zerokit-${{ steps.submodules.outputs.zerokit-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
|
||||
@ -99,27 +91,19 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Get submodule versions
|
||||
- name: Get submodules hash
|
||||
id: submodules
|
||||
shell: bash
|
||||
run: |
|
||||
echo "nim-hash=$(git rev-parse HEAD:vendor/nimbus-build-system)" >> $GITHUB_OUTPUT
|
||||
echo "zerokit-hash=$(git rev-parse HEAD:vendor/zerokit)" >> $GITHUB_OUTPUT
|
||||
echo "hash=$(git submodule status | sha256sum | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache nim compiler
|
||||
- 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 }}
|
||||
|
||||
- name: Cache zerokit artifacts
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: vendor/zerokit/target/release
|
||||
key: ${{ runner.os }}-zerokit-${{ steps.submodules.outputs.zerokit-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
|
||||
|
30
.github/workflows/ci.yml
vendored
30
.github/workflows/ci.yml
vendored
@ -133,20 +133,19 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Get submodule 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 | sha256sum | 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 v1
|
||||
@ -164,20 +163,19 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Get submodule vesions
|
||||
- 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 | sha256sum | 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 test1
|
||||
|
21
.github/workflows/release-assets.yml
vendored
21
.github/workflows/release-assets.yml
vendored
@ -24,19 +24,18 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# We need to do this because of how github cache works
|
||||
# I am not sure we can move the cache file, so if we do not do this
|
||||
# make update breaks because the cached compiler is there where the submodules
|
||||
# are meant to go.
|
||||
- name: Submodules
|
||||
- name: Get submodules hash
|
||||
id: submodules
|
||||
run: |
|
||||
git submodule update --init --recursive
|
||||
|
||||
- name: Cache nim
|
||||
uses: actions/cache@v1
|
||||
echo "hash=$(git submodule status | sha256sum | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache submodules
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: vendor/nimbus-build-system/vendor/Nim/bin
|
||||
key: ${{ runner.os }}-${{ matrix.env.NPROC }}-nim-${{ hashFiles('.gitmodules') }}
|
||||
path: |
|
||||
vendor/
|
||||
.git/modules
|
||||
key: ${{ runner.os }}-vendor-modules-${{ steps.submodules.outputs.hash }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
Loading…
x
Reference in New Issue
Block a user