Compare commits
	
		
			27 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 | 
					 1 changed files with 27 additions and 35 deletions
				
			
		
							
								
								
									
										52
									
								
								action.yml
									
									
									
									
									
								
							
							
						
						
									
										52
									
								
								action.yml
									
									
									
									
									
								
							|  | @ -3,60 +3,52 @@ description: Install the given nim version | ||||||
| 
 | 
 | ||||||
| inputs: | inputs: | ||||||
|   nimVersion: |   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 |     required: true | ||||||
|   os: |   os: | ||||||
|     description: a os string like "linux" "windows" |     description: An OS string like "linux" or "windows" | ||||||
|     required: true |     required: true | ||||||
| 
 | 
 | ||||||
| runs: | runs: | ||||||
|   using: docker |   using: "composite" | ||||||
|   env: |  | ||||||
|     nimPath: "nim-${{inputs.nimVersion}}-${{inputs.os}}_x64.tar.xz" |  | ||||||
|     nimUrl: "https://nim-lang.org/download/${{env.nimPath}}" |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   steps: |   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 | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
|     ## Tries to use the cached version of the nim tar ball |  | ||||||
|     - name: cache restore |     - name: cache restore | ||||||
|       id: cachestep1 |       id: cachestep1 | ||||||
|       uses: https://code.forgejo.org/actions/cache/restore@v4 |       uses: actions/cache@v4 | ||||||
|       with: |       with: | ||||||
|         path: ${{ env.nimPath }} |         path: ${{ env.nimPath }} | ||||||
|         key: ${{ env.nimPath }} |         key: ${{ env.nimPath }} | ||||||
| 
 | 
 | ||||||
|     # - name: cache hit |  | ||||||
|     #   run: | |  | ||||||
|     #     set -x |  | ||||||
|     #     test "${{ steps.cachestep1.outputs.cache-hit }}" != true |  | ||||||
| 
 |  | ||||||
|     - name: cache hit |     - name: cache hit | ||||||
|       run: | |       run: | | ||||||
|  |         set -x | ||||||
|         if [ ! ${{ steps.cachestep1.outputs.cache-hit }} ]; then  |         if [ ! ${{ steps.cachestep1.outputs.cache-hit }} ]; then  | ||||||
|           echo "Download nim tarball" |           echo "Download nim tarball" | ||||||
|           wget ${{ env.nimUrl }} |           wget ${{ env.nimUrl }} | ||||||
|         fi |         fi | ||||||
| 
 | 
 | ||||||
|     # # Download if no cache hit |  | ||||||
|     # - run: wget https://nim-lang.org/download/nim-2.2.2-linux_x64.tar.xz |  | ||||||
| 
 |  | ||||||
|     - name: cache save |     - name: cache save | ||||||
|       uses: https://code.forgejo.org/actions/cache/save@v4 |       uses: actions/cache@v4 | ||||||
|       with: |       with: | ||||||
|         path: ${{ env.nimPath }} |         path: ${{ env.nimPath }} | ||||||
|         key: ${{ steps.cachestep1.outputs.cache-primary-key }} |         key: ${{ env.nimPath }} | ||||||
| 
 | 
 | ||||||
| 
 |     - run: mv ${{ env.nimPath }} /opt/${{ env.nimPath }} | ||||||
|     - run: tar xvf ${{env.nimPath}} |     - run: cd /opt ; tar xvf ${{ env.nimPath }} | ||||||
|     - run: ln -s `pwd`/nim-${{inputs.nimVersion}}/bin/* /usr/bin/ |     - run: cd /opt ; ln -s `pwd`/nim-${{ inputs.nimVersion }}/bin/* /usr/bin/ | ||||||
|     - run: gcc --version |     - run: gcc --version | ||||||
|     - run: nim --version |     - run: nim --version | ||||||
|     - run: nimble --version |     - run: nimble --version | ||||||
| 
 |  | ||||||
|     # - uses: actions/upload-artifact@v3 |  | ||||||
|     #   with: |  | ||||||
|     #     name: myBuild |  | ||||||
|     #     path: testRunner |  | ||||||
| 
 |  | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue