2020-07-21 16:21:51 +00:00
|
|
|
name: Test
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
2020-07-21 17:14:12 +00:00
|
|
|
test:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
env:
|
|
|
|
- { NPROC: 2 }
|
|
|
|
platform: [ubuntu-latest, macos-latest]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
env: ${{ matrix.env }}
|
2020-09-01 17:47:16 +00:00
|
|
|
timeout-minutes: 60
|
2020-07-21 16:21:51 +00:00
|
|
|
|
2020-07-21 17:14:12 +00:00
|
|
|
name: ${{ matrix.platform }} - ${{ matrix.env.NPROC }} processes
|
2020-07-21 16:21:51 +00:00
|
|
|
|
2020-07-21 17:14:12 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
2020-07-21 16:21:51 +00:00
|
|
|
|
2020-07-22 11:56:23 +00:00
|
|
|
# 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
|
|
|
|
|
2020-07-22 10:48:53 +00:00
|
|
|
- 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') }}
|
|
|
|
|
2020-07-21 17:14:12 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" V=1 update
|
|
|
|
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" LOG_LEVEL=TRACE
|
2020-07-21 16:21:51 +00:00
|
|
|
|
2020-07-21 17:14:12 +00:00
|
|
|
- name: Run Tests
|
|
|
|
run: |
|
|
|
|
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" test
|
2020-07-21 18:12:03 +00:00
|
|
|
|
|
|
|
windows:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
env:
|
|
|
|
- { NPROC: 2 }
|
|
|
|
runs-on: windows-latest
|
|
|
|
env: ${{ matrix.env }}
|
2020-10-07 13:57:01 +00:00
|
|
|
timeout-minutes: 90
|
2020-07-21 18:12:03 +00:00
|
|
|
|
|
|
|
name: windows - ${{ matrix.env.NPROC }} processes
|
|
|
|
|
|
|
|
steps:
|
2020-10-07 13:57:01 +00:00
|
|
|
- uses: eine/setup-msys2@v2
|
2020-07-21 18:12:03 +00:00
|
|
|
with:
|
|
|
|
msystem: MSYS
|
|
|
|
update: true
|
|
|
|
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2020-07-22 11:56:23 +00:00
|
|
|
# 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
|
|
|
|
|
2020-07-22 10:48:53 +00:00
|
|
|
- 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') }}
|
|
|
|
|
2020-07-21 18:12:03 +00:00
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% CI_CACHE=NimBinaries update
|
|
|
|
mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% fetch-dlls
|
|
|
|
|
|
|
|
- name: Run Tests
|
|
|
|
run: |
|
|
|
|
mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% LOG_LEVEL=TRACE
|
|
|
|
build\wakunode.exe --help
|
|
|
|
mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% test
|