Skip to content

Commit ca7f29f

Browse files
authored
ci : add building in MSYS2 environments (Windows) (#6967)
1 parent c4f708a commit ca7f29f

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/build.yml

+57
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,63 @@ jobs:
593593
run: |
594594
make swift
595595
596+
windows-msys2:
597+
runs-on: windows-latest
598+
599+
strategy:
600+
fail-fast: false
601+
matrix:
602+
include:
603+
- { sys: UCRT64, env: ucrt-x86_64, build: Release }
604+
- { sys: CLANG64, env: clang-x86_64, build: Release }
605+
606+
steps:
607+
- name: Clone
608+
uses: actions/checkout@v4
609+
610+
- name: Setup ${{ matrix.sys }}
611+
uses: msys2/setup-msys2@v2
612+
with:
613+
update: true
614+
msystem: ${{matrix.sys}}
615+
install: >-
616+
base-devel
617+
mingw-w64-${{matrix.env}}-toolchain
618+
mingw-w64-${{matrix.env}}-cmake
619+
mingw-w64-${{matrix.env}}-openblas
620+
621+
- name: Build using make
622+
shell: msys2 {0}
623+
run: |
624+
make -j $(nproc)
625+
626+
- name: Clean after building using make
627+
shell: msys2 {0}
628+
run: |
629+
make clean
630+
631+
- name: Build using make w/ OpenBLAS
632+
shell: msys2 {0}
633+
run: |
634+
make LLAMA_OPENBLAS=1 -j $(nproc)
635+
636+
- name: Build using CMake
637+
shell: msys2 {0}
638+
run: |
639+
cmake -B build
640+
cmake --build build --config ${{ matrix.build }} -j $(nproc)
641+
642+
- name: Clean after building using CMake
643+
shell: msys2 {0}
644+
run: |
645+
rm -rf build
646+
647+
- name: Build using CMake w/ OpenBLAS
648+
shell: msys2 {0}
649+
run: |
650+
cmake -B build -DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS
651+
cmake --build build --config ${{ matrix.build }} -j $(nproc)
652+
596653
windows-latest-cmake:
597654
runs-on: windows-latest
598655

0 commit comments

Comments
 (0)