mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-10 05:09:22 +00:00
Extend Monero action with support for macOS
This commit is contained in:
29
.github/actions/monero/action.yml
vendored
29
.github/actions/monero/action.yml
vendored
@@ -19,25 +19,32 @@ runs:
|
|||||||
|
|
||||||
- name: Download the Monero Daemon
|
- name: Download the Monero Daemon
|
||||||
if: steps.cache-monerod.outputs.cache-hit != 'true'
|
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
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
RUNNER_OS=${{ runner.os }}
|
OS=${{ runner.os }}
|
||||||
RUNNER_ARCH=${{ runner.arch }}
|
ARCH=${{ runner.arch }}
|
||||||
|
|
||||||
RUNNER_OS=${RUNNER_OS,,}
|
OS=$(echo "$OS" | tr "[:upper:]" "[:lower:]")
|
||||||
RUNNER_ARCH=${RUNNER_ARCH,,}
|
ARCH=$(echo "$ARCH" | tr "[:upper:]" "[:lower:]")
|
||||||
|
|
||||||
RUNNER_OS=linux
|
if [ "$OS" = "windows" ]; then
|
||||||
RUNNER_ARCH=x64
|
OS=win
|
||||||
|
echo "Windows is unsupported at this time"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ "$OS" = "macos" ]; then
|
||||||
|
OS=mac
|
||||||
|
fi
|
||||||
|
if [ "$ARCH" = "arm64" ]; then
|
||||||
|
ARCH=armv8
|
||||||
|
fi
|
||||||
|
|
||||||
FILE=monero-$RUNNER_OS-$RUNNER_ARCH-${{ inputs.version }}.tar.bz2
|
FILE=monero-$OS-$ARCH-${{ inputs.version }}.tar.bz2
|
||||||
wget https://downloads.getmonero.org/cli/$FILE
|
wget https://downloads.getmonero.org/cli/$FILE
|
||||||
tar -xvf $FILE
|
tar -xvf $FILE
|
||||||
|
rm $FILE
|
||||||
|
|
||||||
sudo mv monero-x86_64-linux-gnu-${{ inputs.version }}/monerod /usr/bin/monerod
|
sudo mv $(find . -name monerod) /usr/bin/monerod
|
||||||
sudo chmod 777 /usr/bin/monerod
|
sudo chmod 777 /usr/bin/monerod
|
||||||
sudo chmod +x /usr/bin/monerod
|
sudo chmod +x /usr/bin/monerod
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user