mirror of
https://github.com/status-im/nim-json-serialization.git
synced 2025-02-20 05:48:12 +00:00
Switch to mingw-llvm for faster Windows CI
This commit is contained in:
parent
6f639dd6c1
commit
ebaec13e77
47
.github/workflows/ci.yml
vendored
47
.github/workflows/ci.yml
vendored
@ -31,19 +31,16 @@ jobs:
|
|||||||
- target:
|
- target:
|
||||||
os: linux
|
os: linux
|
||||||
builder: ubuntu-20.04
|
builder: ubuntu-20.04
|
||||||
shell: bash
|
|
||||||
- target:
|
- target:
|
||||||
os: macos
|
os: macos
|
||||||
builder: macos-12
|
builder: macos-12
|
||||||
shell: bash
|
|
||||||
- target:
|
- target:
|
||||||
os: windows
|
os: windows
|
||||||
builder: windows-latest
|
builder: windows-latest
|
||||||
shell: msys2 {0}
|
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: ${{ matrix.shell }}
|
shell: bash
|
||||||
|
|
||||||
name: '${{ matrix.target.os }}-${{ matrix.target.cpu }} (Nim ${{ matrix.branch }})'
|
name: '${{ matrix.target.os }}-${{ matrix.target.cpu }} (Nim ${{ matrix.branch }})'
|
||||||
runs-on: ${{ matrix.builder }}
|
runs-on: ${{ matrix.builder }}
|
||||||
@ -72,26 +69,31 @@ jobs:
|
|||||||
chmod 755 external/bin/gcc external/bin/g++
|
chmod 755 external/bin/gcc external/bin/g++
|
||||||
echo '${{ github.workspace }}/external/bin' >> $GITHUB_PATH
|
echo '${{ github.workspace }}/external/bin' >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: MSYS2 (Windows i386)
|
- name: Restore llvm-mingw (Windows) from cache
|
||||||
if: runner.os == 'Windows' && matrix.target.cpu == 'i386'
|
if: runner.os == 'Windows'
|
||||||
uses: msys2/setup-msys2@v2
|
id: windows-mingw-cache
|
||||||
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path-type: inherit
|
path: external/mingw-${{ matrix.target.cpu }}
|
||||||
msystem: MINGW32
|
key: 'mingw-llvm-17-${{ matrix.target.cpu }}'
|
||||||
install: >-
|
|
||||||
base-devel
|
|
||||||
git
|
|
||||||
mingw-w64-i686-toolchain
|
|
||||||
|
|
||||||
- name: MSYS2 (Windows amd64)
|
- name: Install llvm-mingw dependency (Windows)
|
||||||
if: runner.os == 'Windows' && matrix.target.cpu == 'amd64'
|
if: >
|
||||||
uses: msys2/setup-msys2@v2
|
steps.windows-mingw-cache.outputs.cache-hit != 'true' &&
|
||||||
with:
|
runner.os == 'Windows'
|
||||||
path-type: inherit
|
run: |
|
||||||
install: >-
|
mkdir -p external
|
||||||
base-devel
|
MINGW_BASE="https://github.com/mstorsjo/llvm-mingw/releases/download/20230905"
|
||||||
git
|
if [[ '${{ matrix.target.cpu }}' == 'amd64' ]]; then
|
||||||
mingw-w64-x86_64-toolchain
|
MINGW_URL="$MINGW_BASE/llvm-mingw-20230905-ucrt-x86_64.zip"
|
||||||
|
ARCH=64
|
||||||
|
else
|
||||||
|
MINGW_URL="$MINGW_BASE/llvm-mingw-20230905-ucrt-i686.zip"
|
||||||
|
ARCH=32
|
||||||
|
fi
|
||||||
|
curl -L "$MINGW_URL" -o "external/mingw-${{ matrix.target.cpu }}.zip"
|
||||||
|
7z x -y "external/mingw-${{ matrix.target.cpu }}.zip" -oexternal/mingw-${{ matrix.target.cpu }}/
|
||||||
|
mv external/mingw-${{ matrix.target.cpu }}/**/* ./external/mingw-${{ matrix.target.cpu }}
|
||||||
|
|
||||||
- name: Restore Nim DLLs dependencies (Windows) from cache
|
- name: Restore Nim DLLs dependencies (Windows) from cache
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
@ -114,6 +116,7 @@ jobs:
|
|||||||
if: >
|
if: >
|
||||||
runner.os == 'Windows'
|
runner.os == 'Windows'
|
||||||
run: |
|
run: |
|
||||||
|
echo '${{ github.workspace }}'"/external/mingw-${{ matrix.target.cpu }}/bin" >> $GITHUB_PATH
|
||||||
echo "${{ github.workspace }}/external/dlls-${{ matrix.target.cpu }}" >> $GITHUB_PATH
|
echo "${{ github.workspace }}/external/dlls-${{ matrix.target.cpu }}" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Derive environment variables
|
- name: Derive environment variables
|
||||||
|
Loading…
x
Reference in New Issue
Block a user