-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (62 loc) · 2.08 KB
/
Copy pathwindows-build.yaml
File metadata and controls
75 lines (62 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
##############################################################################
# Copyright 2022, 2024-2025 Leon Lynch
#
# This file is licensed under the terms of the LGPL v2.1 license.
# See LICENSE file.
##############################################################################
name: Windows build
on:
push:
schedule:
- cron: '0 0 15 * *'
jobs:
build-windows-msys2-debug:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- { sys: mingw64, env: x86_64, build_type: "Debug" }
- { sys: mingw64, env: x86_64, build_type: "Release" }
- { sys: ucrt64, env: ucrt-x86_64, build_type: "Debug" }
- { sys: ucrt64, env: ucrt-x86_64, build_type: "Release" }
- { sys: clang64, env: clang-x86_64, build_type: "Debug" }
- { sys: clang64, env: clang-x86_64, build_type: "Release" }
name: Windows MSYS2 ${{matrix.sys}} build (static/${{ matrix.build_type }})
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup MSYS2 ${{matrix.sys}}
uses: msys2/setup-msys2@v2
with:
release: false
msystem: ${{matrix.sys}}
install: >-
base-devel
mingw-w64-${{matrix.env}}-toolchain
mingw-w64-${{matrix.env}}-cmake
mingw-w64-${{matrix.env}}-ninja
git
# MSYS2 Git assumes CRLF by default
- name: Configure Git
run: |
git config --global core.autocrlf true
echo "GIT_DESCRIBE=$(git describe --always --dirty)" >> $GITHUB_ENV
- name: Configure CMake
run: cmake -G Ninja -B build -DCMAKE_BUILD_TYPE="${{ matrix.build_type }}"
- name: Build
run: cmake --build build
- name: Test
run: ctest --test-dir build --output-on-failure
- name: Upload build directory if failed
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: libargp-${{ env.GIT_DESCRIBE }}-windows-build
path: ./
if-no-files-found: error