Skip to content

Create Windows CI workflow #22

Create Windows CI workflow

Create Windows CI workflow #22

Workflow file for this run

name: Windows
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
Windows:
runs-on: windows-latest
strategy:
matrix:
ccompiler: gcc

Check failure on line 15 in .github/workflows/windows.yml

View workflow run for this annotation

GitHub Actions / Windows

Invalid workflow file

The workflow is not valid. .github/workflows/windows.yml (Line: 15, Col: 20): Unexpected value 'gcc'
defaults:
run:
shell: msys2 {0}
steps:
- name: install-dependencies
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-clang
mingw-w64-x86_64-cmake
mingw-w64-x86_64-libgnurx
mingw-w64-x86_64-ninja
mingw-w64-x86_64-libaec
mingw-w64-x86_64-libpng
mingw-w64-x86_64-openjpeg2
- name: checkout
uses: actions/checkout@v4
with:
path: wgrib2
- name: build
run: |
if [[ ${{ matrix.ccompiler }} == "clang" ]]; then
export CC=clang
elif [[ ${{ matrix.ccompiler }} == "gcc" ]]; then
export CC=gcc
fi
cd wgrib2
mkdir build
cd build
# Windows CI fails when building with shared libs, turn off
cmake -DDISABLE_ALARM=ON ..
cmake --build .
- name: test
run: |
cd wgrib2/build
ctest --output-on-failure --extra-verbose --output-log log.txt