forked from MediaArea/ZenLib
-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (108 loc) · 3.08 KB
/
ZenLib_Checks.yml
File metadata and controls
113 lines (108 loc) · 3.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Checks
on: [push, pull_request]
jobs:
Unix:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
env:
CXXFLAGS: -Werror
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Dependencies
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
brew install automake libtool
fi
- name: Configure
run: |
cd Project/GNU/Library
autoreconf -if
./configure
- name: Build
run: |
cd Project/GNU/Library
make -j4
- name: Check
run: |
cd Project/GNU/Library
make check
- name: CMake Build
run: |
mkdir Project/CMake/Build
cd Project/CMake/Build
cmake -DBUILD_ZENLIB=1 ..
make -j4
Windows:
runs-on: windows-latest
strategy:
matrix:
architecture: [ Win32, x64, ARM64 ]
fail-fast: false
steps:
- name: Checkout ZenLib
uses: actions/checkout@v6
with:
path: ZenLib
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x64
- name: Build
run: msbuild -p:Configuration=Release -p:Platform=${{ matrix.architecture }} ${{ github.workspace }}\ZenLib\Project\MSVC2022\ZenLib_MSVC.sln -verbosity:quiet -warnaserror
CMake:
strategy:
matrix:
include:
- runner: windows-latest
CXXFLAGS: "/WX"
- runner: ubuntu-latest
CXXFLAGS: "-Werror"
- runner: macos-latest
CXXFLAGS: "-Werror"
fail-fast: false
name: CMake (${{ matrix.runner }})
runs-on: ${{ matrix.runner }}
env:
CXXFLAGS: ${{ matrix.CXXFLAGS }}
steps:
- name: Checkout ZenLib
uses: actions/checkout@v6
- name: Configure CMake project
run: cmake -S Project/CMake -B build -DCMAKE_BUILD_TYPE=Release
- name: Build CMake project
run: cmake --build build ${{ runner.os == 'Windows' && '--config Release' || '-j4' }}
MinGW:
runs-on: windows-latest
strategy:
matrix:
include:
- platform: Win32
msystem: MINGW32
- platform: x64
msystem: UCRT64
fail-fast: false
env:
GENERATOR: "Unix Makefiles"
CONFIGURATION: "Release"
CXXFLAGS: -Werror
steps:
- name: Checkout ZenLib
uses: actions/checkout@v6
- name: Setup MSYS2 environment
uses: msys2/setup-msys2@v2
with:
release: false
msystem: ${{ matrix.msystem }}
install: make
- name: Configure CMake project
shell: bash
run: |
# Set the build configuration flag for CMake
cmake -S Project/CMake -B build -G "$GENERATOR" -DCMAKE_BUILD_TYPE=$CONFIGURATION
- name: Build project using make
shell: bash
run: make -C build -j4