1name: CI Pkgcheck 2on: [push, pull_request] 3jobs: 4 ci-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@v2 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 abigail-tools ninja-build diffoscope ${{ matrix.packages }} 86 87 - name: Install packages (macOS) 88 if: runner.os == 'macOS' 89 run: | 90 brew install ninja diffoscope ${{ matrix.packages }} 91 env: 92 HOMEBREW_NO_INSTALL_CLEANUP: 1 93 94 - name: Select Xcode version (macOS) 95 # Use a version of Xcode that supports ZERO_AR_DATE until CMake supports 96 # AppleClang linking with libtool using -D argument 97 # https://gitlab.kitware.com/cmake/cmake/-/issues/19852 98 if: runner.os == 'macOS' 99 uses: maxim-lobanov/setup-xcode@v1 100 with: 101 xcode-version: '11.7.0' 102 103 - name: Compare builds 104 run: | 105 sh test/pkgcheck.sh 106 env: 107 CC: ${{ matrix.compiler }} 108 CXX: ${{ matrix.cxx-compiler }} 109 CFLAGS: ${{ matrix.cflags }} 110 CXXFLAGS: ${{ matrix.cxxflags }} 111 CHOST: ${{ matrix.chost }} 112 CMAKE_ARGS: ${{ matrix.cmake-args }} 113 CONFIGURE_ARGS: ${{ matrix.configure-args }} 114 LDFLAGS: ${{ matrix.ldflags }} 115 116 - name: Compare builds (compat) 117 run: | 118 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: | 131 sh test/abicheck.sh --refresh-if 132 env: 133 CC: ${{ matrix.compiler }} 134 CXX: ${{ matrix.cxx-compiler }} 135 CFLAGS: ${{ matrix.cflags }} 136 CXXFLAGS: ${{ matrix.cxxflags }} 137 CHOST: ${{ matrix.chost }} 138 CMAKE_ARGS: ${{ matrix.cmake-args }} 139 CONFIGURE_ARGS: ${{ matrix.configure-args }} 140 LDFLAGS: ${{ matrix.ldflags }} 141 142 - name: Check ABI (compat) 143 # macOS runner does not contain abigail 144 if: runner.os != 'macOS' 145 run: | 146 sh test/abicheck.sh --zlib-compat --refresh-if 147 env: 148 CC: ${{ matrix.compiler }} 149 CXX: ${{ matrix.cxx-compiler }} 150 CFLAGS: ${{ matrix.cflags }} 151 CXXFLAGS: ${{ matrix.cxxflags }} 152 CHOST: ${{ matrix.chost }} 153 CMAKE_ARGS: ${{ matrix.cmake-args }} 154 CONFIGURE_ARGS: ${{ matrix.configure-args }} 155 LDFLAGS: ${{ matrix.ldflags }} 156 157 - name: Upload build errors 158 uses: actions/upload-artifact@v2 159 if: failure() 160 with: 161 name: ${{ matrix.name }} 162 path: | 163 btmp1/configure.log 164 btmp1/CMakeFiles/CMakeOutput.log 165 btmp1/CMakeFiles/CMakeError.log 166 btmp2/configure.log 167 btmp2/CMakeFiles/CMakeOutput.log 168 btmp2/CMakeFiles/CMakeError.log 169 retention-days: 30 170