nwaku/.github/workflows/release-assets.yml

55 lines
1.7 KiB
YAML
Raw Normal View History

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
# 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
run: |
git submodule update --init --recursive
- name: Cache nim
uses: actions/cache@v1
with:
path: vendor/nimbus-build-system/vendor/Nim/bin
key: ${{ runner.os }}-${{ matrix.env.NPROC }}-nim-${{ hashFiles('.gitmodules') }}
- 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