25 lines
No EOL
745 B
YAML
25 lines
No EOL
745 B
YAML
# SPDX-License-Identifier: MIT
|
|
name: 'setup nim'
|
|
description: 'set up nim using the official binaries'
|
|
inputs:
|
|
version:
|
|
description: 'nim version to install'
|
|
default: "2.0.4"
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- shell: bash
|
|
run: |
|
|
set -euxo pipefail
|
|
tempdir=$(mktemp -d)
|
|
pushd $tempdir
|
|
curl -o nim.tar.xz https://nim-lang.org/download/nim-${{ inputs.version }}-linux_x64.tar.xz
|
|
tar -xf nim.tar.xz
|
|
pushd nim-${{ inputs.version }}
|
|
./install.sh /usr/bin
|
|
popd
|
|
cp nim-${{ inputs.version }}/bin/* /usr/bin
|
|
mkdir ./lib && mv /usr/lib/nim/* ./lib && mv ./lib /usr/lib/nim/lib # fixes nim not finding the system lib
|
|
popd
|
|
rm -fr $tempdir |