summaryrefslogtreecommitdiff
path: root/.github/workflows/cmake.yml
diff options
context:
space:
mode:
authorMark Adler <fork@madler.net>2022-10-06 21:50:16 -0700
committerMark Adler <fork@madler.net>2022-10-06 21:59:53 -0700
commit67eb09a20bac154d658a9aae91f7539202606941 (patch)
tree17893d54af81f706b6e432fb3c96f8060ecb91d2 /.github/workflows/cmake.yml
parent352cb28d12baf02863ff5d4d96be0587ced419a1 (diff)
downloadzlib-67eb09a20bac154d658a9aae91f7539202606941.tar.gz
zlib-67eb09a20bac154d658a9aae91f7539202606941.tar.bz2
zlib-67eb09a20bac154d658a9aae91f7539202606941.zip
Add continuous integration workflows. [nmoinvaz]
These workflows will be run to verify that project generation, source file compilation, and test cases run successfully.
Diffstat (limited to '.github/workflows/cmake.yml')
-rw-r--r--.github/workflows/cmake.yml62
1 files changed, 62 insertions, 0 deletions
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
new file mode 100644
index 0000000..ed3a79b
--- /dev/null
+++ b/.github/workflows/cmake.yml
@@ -0,0 +1,62 @@
1name: CMake
2on: [push, pull_request]
3jobs:
4 ci-cmake:
5 name: ${{ matrix.name }}
6 runs-on: ${{ matrix.os }}
7 strategy:
8 fail-fast: false
9 matrix:
10 include:
11 - name: Ubuntu GCC
12 os: ubuntu-latest
13 compiler: gcc
14
15 - name: Ubuntu GCC ISB
16 os: ubuntu-latest
17 compiler: gcc
18 build-dir: "."
19 src-dir: "."
20
21 - name: Ubuntu Clang
22 os: ubuntu-latest
23 compiler: clang
24
25 - name: Ubuntu Clang Debug
26 os: ubuntu-latest
27 compiler: clang
28 build-config: Debug
29
30 - name: Windows MSVC Win32
31 os: windows-latest
32 compiler: cl
33 cmake-args: -A Win32
34
35 - name: Windows MSVC Win64
36 os: windows-latest
37 compiler: cl
38 cmake-args: -A x64
39
40 - name: macOS Clang
41 os: macos-latest
42 compiler: clang
43
44 - name: macOS GCC
45 os: macos-latest
46 compiler: gcc-9
47
48 steps:
49 - name: Checkout repository
50 uses: actions/checkout@v3
51
52 - name: Generate project files
53 run: cmake -S ${{ matrix.src-dir || '../zlib' }} -B ${{ matrix.build-dir || '../build' }} ${{ matrix.cmake-args }} -D CMAKE_BUILD_TYPE=${{ matrix.build-config || 'Release' }}
54 env:
55 CC: ${{ matrix.compiler }}
56
57 - name: Compile source code
58 run: cmake --build ${{ matrix.build-dir || '../build' }} --config ${{ matrix.build-config || 'Release' }}
59
60 - name: Run test cases
61 run: ctest -C Release --output-on-failure --max-width 120
62 working-directory: ${{ matrix.build-dir || '../build' }}