2022-07-23 11:05:31 +00:00
|
|
|
name: monero-regtest
|
|
|
|
description: Spawns a regtest Monero daemon
|
|
|
|
|
2022-07-29 03:31:27 +00:00
|
|
|
inputs:
|
|
|
|
version:
|
|
|
|
description: "Version to download and run"
|
|
|
|
required: false
|
2023-03-20 05:07:43 +00:00
|
|
|
default: v0.18.2.0
|
2022-07-29 03:31:27 +00:00
|
|
|
|
2022-07-23 11:05:31 +00:00
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
2022-07-29 14:36:09 +00:00
|
|
|
- name: Monero Daemon Cache
|
2022-07-23 11:05:31 +00:00
|
|
|
id: cache-monerod
|
2023-09-15 18:30:18 +00:00
|
|
|
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
|
2022-07-23 11:05:31 +00:00
|
|
|
with:
|
|
|
|
path: monerod
|
2022-07-29 03:31:27 +00:00
|
|
|
key: monerod-${{ runner.os }}-${{ runner.arch }}-${{ inputs.version }}
|
2022-07-23 11:05:31 +00:00
|
|
|
|
|
|
|
- name: Download the Monero Daemon
|
|
|
|
if: steps.cache-monerod.outputs.cache-hit != 'true'
|
|
|
|
# Calculates OS/ARCH to demonstrate it, yet then locks to linux-x64 due
|
|
|
|
# to the contained folder not following the same naming scheme and
|
|
|
|
# requiring further expansion not worth doing right now
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
RUNNER_OS=${{ runner.os }}
|
|
|
|
RUNNER_ARCH=${{ runner.arch }}
|
|
|
|
|
|
|
|
RUNNER_OS=${RUNNER_OS,,}
|
|
|
|
RUNNER_ARCH=${RUNNER_ARCH,,}
|
|
|
|
|
|
|
|
RUNNER_OS=linux
|
|
|
|
RUNNER_ARCH=x64
|
|
|
|
|
2022-07-29 03:31:27 +00:00
|
|
|
FILE=monero-$RUNNER_OS-$RUNNER_ARCH-${{ inputs.version }}.tar.bz2
|
2022-07-23 11:05:31 +00:00
|
|
|
wget https://downloads.getmonero.org/cli/$FILE
|
|
|
|
tar -xvf $FILE
|
|
|
|
|
2022-07-29 03:31:27 +00:00
|
|
|
mv monero-x86_64-linux-gnu-${{ inputs.version }}/monerod monerod
|
2022-07-23 11:05:31 +00:00
|
|
|
|
|
|
|
- name: Monero Regtest Daemon
|
|
|
|
shell: bash
|
|
|
|
run: ./monerod --regtest --offline --fixed-difficulty=1 --detach
|