Actions: ensure windows dlls are always in path

This commit is contained in:
Mamy André-Ratsimbazafy 2020-09-25 18:53:17 +02:00
parent 7837646079
commit 5538e8133a
No known key found for this signature in database
GPG Key ID: 7B88AD1FE79492E1
1 changed files with 9 additions and 5 deletions

View File

@ -136,7 +136,7 @@ jobs:
id: windows-mingw-cache id: windows-mingw-cache
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: /external/mingw-${{ matrix.target.cpu }} path: external/mingw-${{ matrix.target.cpu }}
key: 'mingw-${{ matrix.target.cpu }}' key: 'mingw-${{ matrix.target.cpu }}'
- name: Restore Nim DLLs dependencies (Windows) from cache - name: Restore Nim DLLs dependencies (Windows) from cache
@ -144,7 +144,7 @@ jobs:
id: windows-dlls-cache id: windows-dlls-cache
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: /external/dlls-${{ matrix.target.cpu }} path: external/dlls-${{ matrix.target.cpu }}
key: 'dlls-${{ matrix.target.cpu }}' key: 'dlls-${{ matrix.target.cpu }}'
- name: Install MinGW64 dependency (Windows) - name: Install MinGW64 dependency (Windows)
@ -154,11 +154,9 @@ jobs:
shell: bash shell: bash
run: | run: |
mkdir -p external mkdir -p external
curl -L "https://nim-lang.org/download/mingw$ARCH-6.3.0.7z" -o "external/mingw-${{ matrix.target.cpu }}.7z" curl -L "https://nim-lang.org/download/mingw$ARCH-6.3.0.7z" -o "external/mingw-${{ matrix.target.cpu }}.7z"
7z x -y "external/mingw-${{ matrix.target.cpu }}.7z" -oexternal/ 7z x -y "external/mingw-${{ matrix.target.cpu }}.7z" -oexternal/
mv external/mingw$ARCH external/mingw-${{ matrix.target.cpu }} mv external/mingw$ARCH external/mingw-${{ matrix.target.cpu }}
echo '::add-path::${{ github.workspace }}'"/external/mingw-${{ matrix.target.cpu }}/bin"
- name: Install DLLs dependencies (Windows) - name: Install DLLs dependencies (Windows)
if: > if: >
@ -167,9 +165,15 @@ jobs:
shell: bash shell: bash
run: | run: |
mkdir -p external mkdir -p external
curl -L "https://nim-lang.org/download/windeps.zip" -o external/windeps.zip curl -L "https://nim-lang.org/download/windeps.zip" -o external/windeps.zip
7z x -y external/windeps.zip -oexternal/dlls-${{ matrix.target.cpu }} 7z x -y external/windeps.zip -oexternal/dlls-${{ matrix.target.cpu }}
- name: Path to cached dependencies (Windows)
if: >
runner.os == 'Windows'
shell: bash
run: |
echo '::add-path::${{ github.workspace }}'"/external/mingw-${{ matrix.target.cpu }}/bin"
echo '::add-path::${{ github.workspace }}'"/external/dlls-${{ matrix.target.cpu }}" echo '::add-path::${{ github.workspace }}'"/external/dlls-${{ matrix.target.cpu }}"
- name: Install build dependencies (MacOS) - name: Install build dependencies (MacOS)