Simplify build rules for CI on Windows (#361)

This commit is contained in:
Markus Mützel
2022-06-04 10:30:16 +02:00
committed by GitHub
parent 08e2368179
commit 83e6205289
+20 -15
View File
@@ -221,7 +221,23 @@ jobs:
make check
windows_latest_cmake:
runs-on: windows-latest
defaults:
run:
# Use MSYS2 as default shell
shell: msys2 {0}
steps:
- name: Install MSYS2 build environment
uses: msys2/setup-msys2@v2
with:
update: true
msystem: MINGW64
install: >-
base-devel
git
mingw-w64-x86_64-cmake
mingw-w64-x86_64-ninja
mingw-w64-x86_64-gcc-fortran
mingw-w64-x86_64-openblas
- name: Clone and check out repository code
uses: actions/checkout@v2
with:
@@ -231,20 +247,9 @@ jobs:
- name: Check commit
run: |
git log -1
- name: Update OS
run: |
choco install -y msys2
choco upgrade --no-progress -y msys2
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -here -c \$\* -- pacman --sync --noconfirm mingw-w64-x86_64-toolchain
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -here -c \$\* -- pacman --sync --noconfirm mingw-w64-x86_64-cmake
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -here -c \$\* -- pacman --sync --noconfirm mingw-w64-x86_64-toolchain
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -here -c \$\* -- pacman --sync --noconfirm mingw-w64-x86_64-make
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -here -c \$\* -- pacman --sync --noconfirm mingw-w64-x86_64-ninja
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -here -c \$\* -- pacman --sync --noconfirm mingw-w64-x86_64-openblas
- name: Run job
run: |
echo "C:\\tools\\msys64\\mingw64\\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
mkdir build
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -where build -c \$\* -- cmake -G 'Ninja' -DICB=ON .. # -DEXAMPLES=ON KO
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -where build -c \$\* -- ninja all
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -where build -c \$\* -- ninja test
mkdir -p build && cd build
cmake -GNinja -DICB=ON .. # -DEXAMPLES=ON KO
cmake --build . -v
ctest