| 1 | name: Configure |
| 2 | on: [push, pull_request] |
| 3 | jobs: |
| 4 | configure: |
| 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 | configure-args: --warn |
| 15 | |
| 16 | - name: Ubuntu 18.04 GCC |
| 17 | os: ubuntu-18.04 |
| 18 | compiler: gcc |
| 19 | configure-args: --warn |
| 20 | |
| 21 | - name: Ubuntu GCC OSB |
| 22 | os: ubuntu-latest |
| 23 | compiler: gcc |
| 24 | configure-args: --warn |
| 25 | build-dir: ../build |
| 26 | build-src-dir: ../zlib-ng |
| 27 | |
| 28 | - name: Ubuntu GCC Compat No Opt |
| 29 | os: ubuntu-latest |
| 30 | compiler: gcc |
| 31 | configure-args: --warn --zlib-compat --without-optimizations --without-new-strategies |
| 32 | |
| 33 | - name: Ubuntu GCC ARM SF |
| 34 | os: ubuntu-latest |
| 35 | compiler: arm-linux-gnueabi-gcc |
| 36 | configure-args: --warn |
| 37 | chost: arm-linux-gnueabi |
| 38 | packages: qemu qemu-user gcc-arm-linux-gnueabi libc-dev-armel-cross |
| 39 | qemu-run: qemu-arm |
| 40 | |
| 41 | - name: Ubuntu GCC ARM SF Compat No Opt |
| 42 | os: ubuntu-latest |
| 43 | compiler: arm-linux-gnueabi-gcc |
| 44 | configure-args: --warn --zlib-compat --without-optimizations --without-new-strategies |
| 45 | chost: arm-linux-gnueabi |
| 46 | packages: qemu qemu-user gcc-arm-linux-gnueabi libc-dev-armel-cross |
| 47 | qemu-run: qemu-arm |
| 48 | |
| 49 | - name: Ubuntu GCC ARM HF |
| 50 | os: ubuntu-latest |
| 51 | compiler: arm-linux-gnueabihf-gcc |
| 52 | configure-args: --warn |
| 53 | chost: arm-linux-gnueabihf |
| 54 | packages: qemu qemu-user gcc-arm-linux-gnueabihf libc-dev-armel-cross |
| 55 | qemu-run: qemu-arm |
| 56 | |
| 57 | - name: Ubuntu GCC ARM HF No ACLE |
| 58 | os: ubuntu-latest |
| 59 | compiler: arm-linux-gnueabihf-gcc |
| 60 | configure-args: --warn --without-acle |
| 61 | chost: arm-linux-gnueabihf |
| 62 | packages: qemu qemu-user gcc-arm-linux-gnueabihf libc-dev-armel-cross |
| 63 | qemu-run: qemu-arm |
| 64 | |
| 65 | - name: Ubuntu GCC ARM HF No NEON |
| 66 | os: ubuntu-latest |
| 67 | compiler: arm-linux-gnueabihf-gcc |
| 68 | configure-args: --warn --without-neon |
| 69 | chost: arm-linux-gnueabihf |
| 70 | packages: qemu qemu-user gcc-arm-linux-gnueabihf libc-dev-armel-cross |
| 71 | qemu-run: qemu-arm |
| 72 | |
| 73 | - name: Ubuntu GCC ARM HF Compat No Opt |
| 74 | os: ubuntu-latest |
| 75 | compiler: arm-linux-gnueabihf-gcc |
| 76 | configure-args: --warn --zlib-compat --without-optimizations --without-new-strategies |
| 77 | chost: arm-linux-gnueabihf |
| 78 | packages: qemu qemu-user gcc-arm-linux-gnueabihf libc-dev-armel-cross |
| 79 | qemu-run: qemu-arm |
| 80 | |
| 81 | - name: Ubuntu GCC AARCH64 |
| 82 | os: ubuntu-latest |
| 83 | compiler: aarch64-linux-gnu-gcc |
| 84 | configure-args: --warn |
| 85 | chost: aarch64-linux-gnu |
| 86 | packages: qemu qemu-user gcc-aarch64-linux-gnu libc-dev-arm64-cross |
| 87 | qemu-run: qemu-aarch64 |
| 88 | |
| 89 | - name: Ubuntu GCC AARCH64 No ACLE |
| 90 | os: ubuntu-latest |
| 91 | compiler: aarch64-linux-gnu-gcc |
| 92 | configure-args: --warn --without-acle |
| 93 | chost: aarch64-linux-gnu |
| 94 | packages: qemu qemu-user gcc-aarch64-linux-gnu libc-dev-arm64-cross |
| 95 | qemu-run: qemu-aarch64 |
| 96 | |
| 97 | - name: Ubuntu GCC AARCH64 No NEON |
| 98 | os: ubuntu-latest |
| 99 | compiler: aarch64-linux-gnu-gcc |
| 100 | configure-args: --warn --without-neon |
| 101 | chost: aarch64-linux-gnu |
| 102 | packages: qemu qemu-user gcc-aarch64-linux-gnu libc-dev-arm64-cross |
| 103 | qemu-run: qemu-aarch64 |
| 104 | |
| 105 | - name: Ubuntu GCC AARCH64 Compat No Opt |
| 106 | os: ubuntu-latest |
| 107 | compiler: aarch64-linux-gnu-gcc |
| 108 | configure-args: --warn --zlib-compat --without-optimizations --without-new-strategies |
| 109 | chost: aarch64-linux-gnu |
| 110 | packages: qemu qemu-user gcc-aarch64-linux-gnu libc-dev-arm64-cross |
| 111 | qemu-run: qemu-aarch64 |
| 112 | |
| 113 | - name: Ubuntu GCC PPC |
| 114 | os: ubuntu-latest |
| 115 | compiler: powerpc-linux-gnu-gcc |
| 116 | configure-args: --warn --static |
| 117 | chost: powerpc-linux-gnu |
| 118 | packages: qemu qemu-user gcc-powerpc-linux-gnu libc-dev-powerpc-cross |
| 119 | qemu-run: qemu-ppc |
| 120 | cflags: -static |
| 121 | ldflags: -static |
| 122 | |
| 123 | - name: Ubuntu GCC PPC No Power8 |
| 124 | os: ubuntu-latest |
| 125 | compiler: powerpc-linux-gnu-gcc |
| 126 | configure-args: --warn --without-power8 |
| 127 | chost: powerpc-linux-gnu |
| 128 | packages: qemu qemu-user gcc-powerpc-linux-gnu libc-dev-powerpc-cross |
| 129 | qemu-run: qemu-ppc |
| 130 | |
| 131 | - name: Ubuntu GCC PPC64 |
| 132 | os: ubuntu-latest |
| 133 | compiler: powerpc64-linux-gnu-gcc |
| 134 | configure-args: --warn --static |
| 135 | chost: powerpc-linux-gnu |
| 136 | packages: qemu qemu-user gcc-powerpc64-linux-gnu libc-dev-ppc64-cross |
| 137 | qemu-run: qemu-ppc64 |
| 138 | cflags: -static |
| 139 | ldflags: -static |
| 140 | |
| 141 | - name: Ubuntu GCC PPC64LE |
| 142 | os: ubuntu-latest |
| 143 | compiler: powerpc64le-linux-gnu-gcc |
| 144 | configure-args: --warn |
| 145 | chost: powerpc64le-linux-gnu |
| 146 | packages: qemu qemu-user gcc-powerpc64le-linux-gnu libc-dev-ppc64el-cross |
| 147 | qemu-run: qemu-ppc64le |
| 148 | |
| 149 | - name: Ubuntu GCC S390X |
| 150 | os: ubuntu-latest |
| 151 | compiler: s390x-linux-gnu-gcc |
| 152 | configure-args: --warn --static |
| 153 | chost: s390x-linux-gnu |
| 154 | packages: qemu qemu-user gcc-s390x-linux-gnu libc-dev-s390x-cross |
| 155 | qemu-run: qemu-s390x |
| 156 | cflags: -static |
| 157 | ldflags: -static |
| 158 | |
| 159 | - name: Ubuntu GCC S390X No vectorized CRC32 |
| 160 | os: ubuntu-latest |
| 161 | compiler: s390x-linux-gnu-gcc |
| 162 | configure-args: --warn --static --without-crc32-vx |
| 163 | chost: s390x-linux-gnu |
| 164 | packages: qemu qemu-user gcc-s390x-linux-gnu libc-dev-s390x-cross |
| 165 | qemu-run: qemu-s390x |
| 166 | cflags: -static |
| 167 | ldflags: -static |
| 168 | |
| 169 | - name: Ubuntu GCC S390X DFLTCC |
| 170 | os: z15 |
| 171 | compiler: gcc |
| 172 | configure-args: --warn --static --with-dfltcc-deflate --with-dfltcc-inflate |
| 173 | |
| 174 | - name: Ubuntu GCC S390X DFLTCC Compat |
| 175 | os: z15 |
| 176 | compiler: gcc |
| 177 | configure-args: --warn --zlib-compat --static --with-dfltcc-deflate --with-dfltcc-inflate |
| 178 | |
| 179 | - name: macOS GCC Symbol Prefix |
| 180 | os: macOS-latest |
| 181 | compiler: gcc-9 |
| 182 | configure-args: --sprefix=zTest_ |
| 183 | |
| 184 | - name: macOS GCC Symbol Prefix & Compat |
| 185 | os: macOS-latest |
| 186 | compiler: gcc-9 |
| 187 | configure-args: --zlib-compat --sprefix=zTest_ |
| 188 | |
| 189 | - name: macOS GCC |
| 190 | os: macOS-latest |
| 191 | compiler: gcc-9 |
| 192 | configure-args: --warn |
| 193 | |
| 194 | steps: |
| 195 | - name: Checkout repository |
| 196 | uses: actions/checkout@v3 |
| 197 | |
| 198 | - name: Install packages (Ubuntu) |
| 199 | if: runner.os == 'Linux' && matrix.packages |
| 200 | run: | |
| 201 | sudo apt-get update |
| 202 | sudo apt-get install -y ${{ matrix.packages }} |
| 203 | |
| 204 | - name: Generate project files |
| 205 | run: | |
| 206 | mkdir ${{ matrix.build-dir || '.not-used' }} |
| 207 | cd ${{ matrix.build-dir || '.' }} |
| 208 | ${{ matrix.build-src-dir || '.' }}/configure ${{ matrix.configure-args }} |
| 209 | env: |
| 210 | CC: ${{ matrix.compiler }} |
| 211 | CFLAGS: ${{ matrix.cflags }} |
| 212 | LDFLAGS: ${{ matrix.ldflags }} |
| 213 | CHOST: ${{ matrix.chost }} |
| 214 | CI: true |
| 215 | |
| 216 | - name: Compile source code |
| 217 | run: make -j2 |
| 218 | working-directory: ${{ matrix.build-dir }} |
| 219 | |
| 220 | - name: Run test cases |
| 221 | run: make test |
| 222 | working-directory: ${{ matrix.build-dir }} |
| 223 | env: |
| 224 | QEMU_RUN: ${{ matrix.qemu-run }} |
| 225 | |
| 226 | - name: Upload build errors |
| 227 | uses: actions/upload-artifact@v2 |
| 228 | if: failure() |
| 229 | with: |
| 230 | name: ${{ matrix.name }} (configure) |
| 231 | path: | |
| 232 | ${{ matrix.build-dir || '.' }}/configure.log |
| 233 | retention-days: 30 |