60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
name: Install nim
|
|
description: Install the given nim version
|
|
|
|
inputs:
|
|
nimVersion:
|
|
description: a nim version string like 2.2.2 or 2.0.8
|
|
required: false
|
|
os:
|
|
description: a os string like "linux" "windows"
|
|
required: false
|
|
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- name: Install nim
|
|
shell: bash
|
|
run: echo "OK"
|
|
|
|
- name: cache restore
|
|
id: cachestep1
|
|
uses: https://code.forgejo.org/actions/cache/restore@v4
|
|
with:
|
|
path: ${{env.nimPath}}
|
|
key: ${{env.nimPath}}
|
|
|
|
#jobs:
|
|
# main:
|
|
# #runs-on: docker
|
|
# #env:
|
|
# # nimPath: "nim-${{inputs.nimVersion}}-${{inputs.os}}_x64.tar.xz"
|
|
# # nimUrl: "https://nim-lang.org/download/${{env.nimPath}}"
|
|
# steps:
|
|
# - run: echo "OK"
|
|
#
|
|
# ## Tries to use the cached version of the nim tar ball
|
|
# - name: cache restore
|
|
# id: cachestep1
|
|
# uses: https://code.forgejo.org/actions/cache/restore@v4
|
|
# with:
|
|
# path: ${{env.nimPath}}
|
|
# key: ${{env.nimPath}}
|
|
#
|
|
# - name: cache hit
|
|
# run: |
|
|
# if [ ! ${{steps.cachestep1.outputs.cache-hit}} ]; then
|
|
# echo "Download nim tarball"
|
|
# wget ${{env.nimUrl}}
|
|
# fi
|
|
#
|
|
# - name: cache save
|
|
# uses: https://code.forgejo.org/actions/cache/save@v4
|
|
# with:
|
|
# path: ${{env.nimPath}}
|
|
# key: ${{steps.cachestep1.outputs.cache-key}}
|
|
#
|
|
# - run: tar xvf ${{env.nimPath}}
|
|
# - run: ln -s `pwd`/nim-${{inputs.nimVersion}}/bin/* /usr/bin/
|
|
# - run: gcc --version
|
|
# - run: nim --version
|
|
# - run: nimble --version
|