From 6d5ec49e5b37e2072f3c09878113a332ad825284 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Mon, 10 Jan 2022 12:20:46 +1100 Subject: [PATCH 1/2] Debugging nim-waku caching It always builds for some reason. --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a292f0db8..9d2f2dc67a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,6 @@ jobs: with: path: | ./nim-waku/build/wakunode2 - ./nim-waku/vendor/rln/target/debug key: nim-waku-build-${{ matrix.os }}-v3-${{ steps.nim-waku-head.outputs.ref }} - name: Install NodeJS @@ -46,7 +45,13 @@ jobs: # visibility in the CI if done as a separate step - name: Build wakunode2 shell: bash - run: (cd nim-waku && ./build/wakunode2 --help) || npm run nim-waku:build + working-directory: ./nim-waku + continue-on-error: true + run: | + # For debug purposes + ./build/wakunode2 --help + # Build nim-waku if `--help` fails + ./build/wakunode2 --help || npm run nim-waku:build - name: Ensure wakunode2 is ready shell: bash From a1ad50f55bc626daf234edb9a6ea324906b6f35b Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Mon, 10 Jan 2022 12:39:37 +1100 Subject: [PATCH 2/2] Do not build nim-waku But get the asset from GitHub. --- .github/workflows/ci.yml | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d2f2dc67a..7b6d8049f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,7 @@ jobs: build_and_test: env: BUF_VERSION: '0.56.0' + NIM_WAKU_VERSION: 'v0.6' strategy: matrix: node: [16] @@ -20,39 +21,21 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2.3.3 - with: - submodules: 'recursive' - - name: Get nim-waku HEAD - id: nim-waku-head + - name: Get nim-waku shell: bash - run: cd nim-waku && echo "::set-output name=ref::$(git rev-parse HEAD)" - - - name: Cache nim-waku binary - id: cache-nim-waku - uses: actions/cache@v2 - with: - path: | - ./nim-waku/build/wakunode2 - key: nim-waku-build-${{ matrix.os }}-v3-${{ steps.nim-waku-head.outputs.ref }} + run: | + mkdir -p nim-waku/build + cd nim-waku + wget "https://github.com/status-im/nim-waku/releases/download/${NIM_WAKU_VERSION}/nim-waku-ubuntu-latest.tar.gz.1.zip" + unzip nim-waku-ubuntu-latest.tar.gz.1.zip + tar xavf nim-waku-ubuntu-latest.tar.gz - name: Install NodeJS uses: actions/setup-node@v2 with: node-version: ${{ matrix.node }} - # This would have been done part of npm pretest, but it gives better - # visibility in the CI if done as a separate step - - name: Build wakunode2 - shell: bash - working-directory: ./nim-waku - continue-on-error: true - run: | - # For debug purposes - ./build/wakunode2 --help - # Build nim-waku if `--help` fails - ./build/wakunode2 --help || npm run nim-waku:build - - name: Ensure wakunode2 is ready shell: bash run: cd nim-waku && ./build/wakunode2 --help