Debian Codegraph @

ext/zlib-ng/.github/workflows/pkgcheck.yml

raw symbols SCIP
1 name: Package Check
2 on: [push, pull_request]
3 jobs:
4 pkgcheck:
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 cxx-compiler: g++
15
16 - name: Ubuntu GCC -m32
17 os: ubuntu-latest
18 compiler: gcc
19 cxx-compiler: g++
20 packages: gcc-multilib g++-multilib
21 cmake-args: -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32
22 cflags: -m32
23 cxxflags: -m32
24 ldflags: -m32
25
26 - name: Ubuntu GCC ARM HF
27 os: ubuntu-latest
28 chost: arm-linux-gnueabihf
29 compiler: arm-linux-gnueabihf-gcc
30 cxx-compiler: g++-arm-linux-gnueabihf
31 cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-armhf.cmake
32 packages: qemu gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libc6-dev-armhf-cross
33
34 - name: Ubuntu GCC AARCH64
35 os: ubuntu-latest
36 chost: aarch64-linux-gnu
37 compiler: aarch64-linux-gnu-gcc
38 cxx-compiler: g++-aarch64-linux-gnu
39 cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-aarch64.cmake
40 packages: qemu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross
41
42 - name: Ubuntu GCC PPC
43 os: ubuntu-latest
44 chost: powerpc-linux-gnu
45 compiler: powerpc-linux-gnu-gcc
46 cxx-compiler: g++-powerpc-linux-gnu
47 cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-powerpc.cmake
48 packages: qemu gcc-powerpc-linux-gnu g++-powerpc-linux-gnu libc6-dev-powerpc-cross
49
50 - name: Ubuntu GCC PPC64LE
51 os: ubuntu-latest
52 chost: powerpc64le-linux-gnu
53 compiler: powerpc64le-linux-gnu-gcc
54 cxx-compiler: g++-powerpc64le-linux-gnu
55 cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-powerpc64le.cmake
56 packages: qemu gcc-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu libc6-dev-ppc64el-cross
57
58 - name: macOS Clang
59 os: macOS-latest
60 compiler: clang
61 cxx-compiler: clang++
62
63 - name: macOS Clang Native
64 os: macOS-latest
65 compiler: clang
66 cxx-compiler: clang++
67 cmake-args: -DWITH_NATIVE_INSTRUCTIONS=ON
68 configure-args: --native
69
70 - name: macOS Clang Symbol Prefix
71 os: macOS-latest
72 compiler: clang
73 cxx-compiler: clang++
74 cmake-args: -DZLIB_SYMBOL_PREFIX=zTest_
75 configure-args: --sprefix=zTest_
76
77 steps:
78 - name: Checkout repository
79 uses: actions/checkout@v3
80
81 - name: Install packages (Ubuntu)
82 if: runner.os == 'Linux'
83 run: |
84 sudo apt-get update
85 sudo apt-get install -y --no-install-recommends ${{ matrix.packages }} \
86 abigail-tools \
87 diffoscope \
88 ninja-build
89
90 - name: Install packages (macOS)
91 if: runner.os == 'macOS'
92 run: brew install ninja diffoscope ${{ matrix.packages }}
93 env:
94 HOMEBREW_NO_INSTALL_CLEANUP: 1
95
96 - name: Select Xcode version (macOS)
97 # Use a version of Xcode that supports ZERO_AR_DATE until CMake supports
98 # AppleClang linking with libtool using -D argument
99 # https://gitlab.kitware.com/cmake/cmake/-/issues/19852
100 if: runner.os == 'macOS'
101 uses: maxim-lobanov/setup-xcode@v1
102 with:
103 xcode-version: '11.7.0'
104
105 - name: Compare builds
106 run: sh test/pkgcheck.sh
107 env:
108 CC: ${{ matrix.compiler }}
109 CXX: ${{ matrix.cxx-compiler }}
110 CFLAGS: ${{ matrix.cflags }}
111 CXXFLAGS: ${{ matrix.cxxflags }}
112 CHOST: ${{ matrix.chost }}
113 CMAKE_ARGS: ${{ matrix.cmake-args }}
114 CONFIGURE_ARGS: ${{ matrix.configure-args }}
115 LDFLAGS: ${{ matrix.ldflags }}
116
117 - name: Compare builds (compat)
118 run: sh test/pkgcheck.sh --zlib-compat
119 env:
120 CC: ${{ matrix.compiler }}
121 CFLAGS: ${{ matrix.cflags }}
122 CHOST: ${{ matrix.chost }}
123 CMAKE_ARGS: ${{ matrix.cmake-args }}
124 CONFIGURE_ARGS: ${{ matrix.configure-args }}
125 LDFLAGS: ${{ matrix.ldflags }}
126
127 - name: Check ABI
128 # macOS runner does not contain abigail
129 if: runner.os != 'macOS'
130 run: sh test/abicheck.sh --refresh-if
131 env:
132 CC: ${{ matrix.compiler }}
133 CXX: ${{ matrix.cxx-compiler }}
134 CFLAGS: ${{ matrix.cflags }}
135 CXXFLAGS: ${{ matrix.cxxflags }}
136 CHOST: ${{ matrix.chost }}
137 CMAKE_ARGS: ${{ matrix.cmake-args }}
138 CONFIGURE_ARGS: ${{ matrix.configure-args }}
139 LDFLAGS: ${{ matrix.ldflags }}
140
141 - name: Check ABI (compat)
142 # macOS runner does not contain abigail
143 if: runner.os != 'macOS'
144 run: sh test/abicheck.sh --zlib-compat --refresh-if
145 env:
146 CC: ${{ matrix.compiler }}
147 CXX: ${{ matrix.cxx-compiler }}
148 CFLAGS: ${{ matrix.cflags }}
149 CXXFLAGS: ${{ matrix.cxxflags }}
150 CHOST: ${{ matrix.chost }}
151 CMAKE_ARGS: ${{ matrix.cmake-args }}
152 CONFIGURE_ARGS: ${{ matrix.configure-args }}
153 LDFLAGS: ${{ matrix.ldflags }}
154
155 - name: Upload build errors
156 uses: actions/upload-artifact@v2
157 if: failure()
158 with:
159 name: ${{ matrix.name }}
160 path: |
161 **/*.abi
162 btmp1/configure.log
163 btmp1/CMakeFiles/CMakeOutput.log
164 btmp1/CMakeFiles/CMakeError.log
165 btmp2/configure.log
166 btmp2/CMakeFiles/CMakeOutput.log
167 btmp2/CMakeFiles/CMakeError.log
168 retention-days: 30