mirror of
https://github.com/logos-storage/logos-storage-nim-dht.git
synced 2026-03-31 16:23:07 +00:00
- changed the CI to use prebuild nimble binary and to use lock file. - the nim version is determined by the lock file - there were some packages that have version range but at the same time corresponding versions were not tagged at the repo. I have hardcoded the version of the package commit. Later when the version is tagged in the source repo the version range can be returned.
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: Install Nimble
|
|
description: install nimble
|
|
inputs:
|
|
nimble_version:
|
|
description: "install nimble"
|
|
# TODO: make sure to change to tagged release when available
|
|
default: "latest"
|
|
os:
|
|
description: "operating system"
|
|
default: "linux"
|
|
cpu:
|
|
description: "cpu architecture"
|
|
default: "amd64"
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Build Nimble
|
|
shell: bash
|
|
run: |
|
|
set -x
|
|
mkdir -p .nimble
|
|
cd .nimble
|
|
if [[ '${{ inputs.cpu }}' == 'amd64' ]]; then
|
|
CPU=x64
|
|
elif [[ '${{ inputs.cpu }}' == 'i386' ]]; then
|
|
CPU=x32
|
|
else
|
|
CPU=${{ inputs.cpu }}
|
|
fi
|
|
|
|
if [[ '${{ inputs.os }}' == 'macos' ]]; then
|
|
OS=apple
|
|
else
|
|
OS='${{ inputs.os }}'
|
|
fi
|
|
URL=https://github.com/nim-lang/nimble/releases/download/${{ inputs.nimble_version }}/nimble-"$OS"_"$CPU".tar.gz
|
|
curl -o nimble.tar.gz -L -s -S "$URL"
|
|
tar -xvf nimble.tar.gz
|
|
- name: Derive environment variables
|
|
shell: bash
|
|
run: echo '${{ github.workspace }}/.nimble/' >> $GITHUB_PATH
|