2021-06-10 09:22:22 +00:00
|
|
|
name: Upload Release Asset
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*' # "e.g. v0.4"
|
|
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-and-upload:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
env:
|
|
|
|
- { NPROC: 2 }
|
|
|
|
platform: [ubuntu-latest, macos-latest]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
env: ${{ matrix.env }}
|
|
|
|
timeout-minutes: 60
|
|
|
|
|
|
|
|
name: ${{ matrix.platform }} - ${{ matrix.env.NPROC }} processes
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2023-05-16 07:11:41 +00:00
|
|
|
- name: Get submodules hash
|
|
|
|
id: submodules
|
2021-06-10 09:22:22 +00:00
|
|
|
run: |
|
2023-05-17 13:42:00 +00:00
|
|
|
echo "hash=$(git submodule status | awk '{print $1}' | sort | shasum -a 256 | sed 's/[ -]*//g')" >> $GITHUB_OUTPUT
|
2023-05-16 07:11:41 +00:00
|
|
|
|
|
|
|
- name: Cache submodules
|
|
|
|
uses: actions/cache@v3
|
2021-06-10 09:22:22 +00:00
|
|
|
with:
|
2023-05-16 07:11:41 +00:00
|
|
|
path: |
|
|
|
|
vendor/
|
|
|
|
.git/modules
|
|
|
|
key: ${{ runner.os }}-vendor-modules-${{ steps.submodules.outputs.hash }}
|
2021-06-10 09:22:22 +00:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" V=1 update
|
2022-03-30 15:29:12 +00:00
|
|
|
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" CI=false wakunode1
|
|
|
|
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" CI=false wakunode2
|
|
|
|
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" CI=false chat2
|
2021-06-10 12:32:30 +00:00
|
|
|
tar -cvzf nim-waku-${{ matrix.platform }}.tar.gz ./build/
|
2021-06-10 09:22:22 +00:00
|
|
|
|
|
|
|
- name: Upload asset
|
|
|
|
uses: actions/upload-artifact@v2.2.3
|
|
|
|
with:
|
2021-06-10 09:48:56 +00:00
|
|
|
name: nim-waku-${{ matrix.platform }}.tar.gz
|
2021-06-10 12:32:30 +00:00
|
|
|
path: nim-waku-${{ matrix.platform }}.tar.gz
|
2021-06-10 09:22:22 +00:00
|
|
|
if-no-files-found: error
|