Compare commits
30 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fe8b8080ec | |||
| 1ffc65eb0a | |||
| 9c04817ca2 | |||
| 269f14a7d9 | |||
| 2b1116f4c6 | |||
| 3037231cc5 | |||
| 0fe09af7b5 | |||
| 6fcbade20a | |||
| 2115f4c958 | |||
| c4e9f274fd | |||
| 1e40f4a71a | |||
| 0a4f03f980 | |||
| d437c59006 | |||
| 8e8aaa7cda | |||
| 477de414da | |||
| 8d5da6e837 | |||
| 55c6f0f763 | |||
| 19cadbee8f | |||
| 71b40b1ca0 | |||
| b5a4fcf531 | |||
| 8d57832270 | |||
| 7599ec1aec | |||
|
|
958a5b7e2b | ||
|
|
f7eb0abf43 | ||
|
|
3680798835 | ||
| 04285009a7 | |||
|
|
f0a3ddf427 | ||
|
|
b8ad998003 | ||
|
|
c4c3c93857 | ||
| da80e1a311 |
1 changed files with 26 additions and 40 deletions
66
action.yml
66
action.yml
|
|
@ -3,66 +3,52 @@ description: Install the given nim version
|
|||
|
||||
inputs:
|
||||
nimVersion:
|
||||
description: a nim version string like 2.2.2 or 2.0.8
|
||||
description: A nim version string like 2.2.2 or 2.0.8
|
||||
required: true
|
||||
os:
|
||||
description: a os string like "linux" "windows"
|
||||
description: An OS string like "linux" or "windows"
|
||||
required: true
|
||||
|
||||
runs:
|
||||
env:
|
||||
nimPath: "nim-${{inputs.nimVersion}}-${{inputs.os}}_x64.tar.xz"
|
||||
nimUrl: "https://nim-lang.org/download/${{env.nimPath}}"
|
||||
|
||||
|
||||
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Set environment variables
|
||||
run: |
|
||||
set -x
|
||||
echo "nimPath=nim-${{ inputs.nimVersion }}-${{ inputs.os }}_x64.tar.xz" >> $GITHUB_ENV
|
||||
echo $GITHUB_ENV
|
||||
|
||||
- name: Set environment variables 2
|
||||
run: |
|
||||
set -x
|
||||
echo "nimUrl=https://nim-lang.org/download/${{ env.nimPath }}" >> $GITHUB_ENV
|
||||
echo $GITHUB_ENV
|
||||
|
||||
## Do some test steps
|
||||
- uses: actions/checkout@v4
|
||||
- run: echo start docker
|
||||
- run: env
|
||||
- run: cat /etc/apt/sources.list
|
||||
- run: ls
|
||||
|
||||
## 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
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{env.nimPath}}
|
||||
key: ${{env.nimPath}}
|
||||
|
||||
# - name: cache hit
|
||||
# run: |
|
||||
# set -x
|
||||
# test "${{ steps.cachestep1.outputs.cache-hit }}" != true
|
||||
path: ${{ env.nimPath }}
|
||||
key: ${{ env.nimPath }}
|
||||
|
||||
- name: cache hit
|
||||
run: |
|
||||
set -x
|
||||
if [ ! ${{ steps.cachestep1.outputs.cache-hit }} ]; then
|
||||
echo "Download nim tarball"
|
||||
wget ${{env.nimUrl}}
|
||||
wget ${{ env.nimUrl }}
|
||||
fi
|
||||
|
||||
# # Download if no cache hit
|
||||
# - run: wget https://nim-lang.org/download/nim-2.2.2-linux_x64.tar.xz
|
||||
|
||||
- name: cache save
|
||||
uses: https://code.forgejo.org/actions/cache/save@v4
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{env.nimPath}}
|
||||
key: ${{ steps.cachestep1.outputs.cache-primary-key }}
|
||||
path: ${{ env.nimPath }}
|
||||
key: ${{ env.nimPath }}
|
||||
|
||||
|
||||
- run: tar xvf ${{env.nimPath}}
|
||||
- run: ln -s `pwd`/nim-${{inputs.nimVersion}}/bin/* /usr/bin/
|
||||
- run: mv ${{ env.nimPath }} /opt/${{ env.nimPath }}
|
||||
- run: cd /opt ; tar xvf ${{ env.nimPath }}
|
||||
- run: cd /opt ; ln -s `pwd`/nim-${{ inputs.nimVersion }}/bin/* /usr/bin/
|
||||
- run: gcc --version
|
||||
- run: nim --version
|
||||
- run: nimble --version
|
||||
|
||||
# - uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: myBuild
|
||||
# path: testRunner
|
||||
|
||||
- run: nimble --version
|
||||
Loading…
Reference in a new issue