[wip] .github/workflows/testground.yml
This commit is contained in:
parent
0d5860bcbe
commit
d066f18969
|
@ -0,0 +1,74 @@
|
||||||
|
# Adapted from:
|
||||||
|
# https://github.com/status-im/nim-codex/blob/main/.github/workflows/ci.yml
|
||||||
|
|
||||||
|
name: Testground
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
cache_nonce: [ 0 ] # Allows for easily busting actions/cache caches
|
||||||
|
target:
|
||||||
|
- os: linux
|
||||||
|
cpu: amd64
|
||||||
|
nim_branch: [version-1-2]
|
||||||
|
include:
|
||||||
|
- target:
|
||||||
|
os: linux
|
||||||
|
builder: ubuntu-latest
|
||||||
|
shell: bash --noprofile --norc -eo pipefail
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: ${{ matrix.shell }} {0}
|
||||||
|
|
||||||
|
name: '${{ matrix.target.os }}-${{ matrix.target.cpu }} (Nim ${{ matrix.nim_branch }})'
|
||||||
|
runs-on: ${{ matrix.builder }}
|
||||||
|
timeout-minutes: 80
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: APT (Linux amd64)
|
||||||
|
if: runner.os == 'Linux' && matrix.target.cpu == 'amd64'
|
||||||
|
run: |
|
||||||
|
# sudo apt-fast update -qq
|
||||||
|
# sudo DEBIAN_FRONTEND='noninteractive' apt-fast install \
|
||||||
|
# --no-install-recommends -yq ...
|
||||||
|
|
||||||
|
- name: Derive environment variables
|
||||||
|
run: |
|
||||||
|
PLATFORM=x64
|
||||||
|
echo "PLATFORM=${PLATFORM}" >> ${GITHUB_ENV}
|
||||||
|
|
||||||
|
# Stack usage on Linux amd64
|
||||||
|
NIMFLAGS="${NIMFLAGS} -d:limitStackUsage"
|
||||||
|
echo "NIMFLAGS=${NIMFLAGS}" >> ${GITHUB_ENV}
|
||||||
|
|
||||||
|
# Use all available CPUs for build process
|
||||||
|
ncpu=$(nproc)
|
||||||
|
[[ -z "$ncpu" || $ncpu -le 0 ]] && ncpu=1
|
||||||
|
echo "ncpu=${ncpu}" >> ${GITHUB_ENV}
|
||||||
|
|
||||||
|
- name: Build and start Testground daemon
|
||||||
|
run: |
|
||||||
|
mkdir -p ${HOME}/repos && cd ${HOME}/repos
|
||||||
|
git clone https://github.com/testground/testground.git && cd testground
|
||||||
|
make install
|
||||||
|
export PATH="${HOME}/go/bin:${PATH}"
|
||||||
|
testground daemon &
|
||||||
|
|
||||||
|
- name: Build and run default Codex Testground plan
|
||||||
|
run: |
|
||||||
|
export PATH="${HOME}/go/bin:${PATH}"
|
||||||
|
make \
|
||||||
|
TESTGROUND_PLAN=simple_libp2p \
|
||||||
|
TESTGROUND_OPTIONS="--instances=25 --wait" \
|
||||||
|
testground
|
Loading…
Reference in New Issue