2022-10-07 07:50:16 +03:00
|
|
|
name: Configure
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
ci-configure:
|
|
|
|
name: ${{ matrix.name }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- name: Ubuntu GCC
|
|
|
|
os: ubuntu-latest
|
|
|
|
compiler: gcc
|
|
|
|
configure-args: --warn
|
|
|
|
|
2022-10-11 04:38:33 +03:00
|
|
|
# Test out of source builds
|
|
|
|
- name: Ubuntu GCC OSB
|
2022-10-07 07:50:16 +03:00
|
|
|
os: ubuntu-latest
|
|
|
|
compiler: gcc
|
|
|
|
configure-args: --warn
|
2022-10-11 04:38:33 +03:00
|
|
|
build-dir: ../build
|
|
|
|
src-dir: ../zlib
|
2022-10-07 07:50:16 +03:00
|
|
|
|
2022-10-11 21:08:38 +03:00
|
|
|
- name: Ubuntu GCC ARM SF
|
|
|
|
os: ubuntu-latest
|
|
|
|
compiler: arm-linux-gnueabi-gcc
|
|
|
|
configure-args: --warn
|
|
|
|
chost: arm-linux-gnueabi
|
|
|
|
packages: qemu qemu-user gcc-arm-linux-gnueabi libc-dev-armel-cross
|
|
|
|
qemu-run: qemu-arm -L /usr/arm-linux-gnueabi
|
|
|
|
|
|
|
|
- name: Ubuntu GCC ARM HF
|
|
|
|
os: ubuntu-latest
|
|
|
|
compiler: arm-linux-gnueabihf-gcc
|
|
|
|
configure-args: --warn
|
|
|
|
chost: arm-linux-gnueabihf
|
|
|
|
packages: qemu qemu-user gcc-arm-linux-gnueabihf libc-dev-armhf-cross
|
|
|
|
qemu-run: qemu-arm -L /usr/arm-linux-gnueabihf
|
|
|
|
|
|
|
|
- name: Ubuntu GCC AARCH64
|
|
|
|
os: ubuntu-latest
|
|
|
|
compiler: aarch64-linux-gnu-gcc
|
|
|
|
configure-args: --warn
|
|
|
|
chost: aarch64-linux-gnu
|
|
|
|
packages: qemu qemu-user gcc-aarch64-linux-gnu libc-dev-arm64-cross
|
|
|
|
qemu-run: qemu-aarch64 -L /usr/aarch64-linux-gnu
|
|
|
|
|
2022-10-11 04:50:44 +03:00
|
|
|
- name: Ubuntu GCC PPC
|
|
|
|
os: ubuntu-latest
|
|
|
|
compiler: powerpc-linux-gnu-gcc
|
|
|
|
configure-args: --warn --static
|
|
|
|
chost: powerpc-linux-gnu
|
|
|
|
packages: qemu qemu-user gcc-powerpc-linux-gnu libc-dev-powerpc-cross
|
|
|
|
qemu-run: qemu-ppc -L /usr/powerpc-linux-gnu
|
|
|
|
cflags: -static
|
|
|
|
ldflags: -static
|
|
|
|
|
|
|
|
- name: Ubuntu GCC PPC64
|
|
|
|
os: ubuntu-latest
|
|
|
|
compiler: powerpc64-linux-gnu-gcc
|
|
|
|
configure-args: --warn --static
|
|
|
|
chost: powerpc-linux-gnu
|
|
|
|
packages: qemu qemu-user gcc-powerpc64-linux-gnu libc-dev-ppc64-cross
|
|
|
|
qemu-run: qemu-ppc64 -L /usr/powerpc64-linux-gnu
|
|
|
|
cflags: -static
|
|
|
|
ldflags: -static
|
|
|
|
|
|
|
|
- name: Ubuntu GCC PPC64LE
|
|
|
|
os: ubuntu-latest
|
|
|
|
compiler: powerpc64le-linux-gnu-gcc
|
|
|
|
configure-args: --warn
|
|
|
|
chost: powerpc64le-linux-gnu
|
|
|
|
packages: qemu qemu-user gcc-powerpc64le-linux-gnu libc-dev-ppc64el-cross
|
|
|
|
qemu-run: qemu-ppc64le -L /usr/powerpc64le-linux-gnu
|
|
|
|
|
2022-10-11 04:51:30 +03:00
|
|
|
- name: Ubuntu GCC S390X
|
|
|
|
os: ubuntu-latest
|
|
|
|
compiler: s390x-linux-gnu-gcc
|
|
|
|
configure-args: --warn --static
|
|
|
|
chost: s390x-linux-gnu
|
|
|
|
packages: qemu qemu-user gcc-s390x-linux-gnu libc-dev-s390x-cross
|
|
|
|
qemu-run: qemu-s390x -L /usr/s390x-linux-gnu
|
|
|
|
cflags: -static
|
|
|
|
ldflags: -static
|
|
|
|
|
2022-10-07 07:50:16 +03:00
|
|
|
- name: macOS GCC
|
|
|
|
os: macos-latest
|
2023-08-06 15:28:31 +03:00
|
|
|
compiler: gcc-11
|
2022-10-07 07:50:16 +03:00
|
|
|
configure-args: --warn
|
|
|
|
|
2022-10-11 04:49:46 +03:00
|
|
|
- name: macOS Clang
|
|
|
|
os: macos-latest
|
|
|
|
compiler: clang
|
|
|
|
configure-args: --warn
|
|
|
|
|
2022-10-07 07:50:16 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2024-02-09 20:21:03 +03:00
|
|
|
uses: actions/checkout@v4
|
2022-10-07 07:50:16 +03:00
|
|
|
|
2022-10-11 21:08:38 +03:00
|
|
|
- name: Install packages (Ubuntu)
|
|
|
|
if: runner.os == 'Linux' && matrix.packages
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y ${{ matrix.packages }}
|
|
|
|
|
2022-10-07 07:50:16 +03:00
|
|
|
- name: Generate project files
|
|
|
|
run: |
|
2022-10-11 04:38:33 +03:00
|
|
|
[ -d ${{ matrix.build-dir || '.' }} ] || mkdir ${{ matrix.build-dir || '.' }}
|
|
|
|
cd ${{ matrix.build-dir || '.' }}
|
|
|
|
${{ matrix.src-dir || '.' }}/configure ${{ matrix.configure-args }}
|
2022-10-07 07:50:16 +03:00
|
|
|
env:
|
|
|
|
CC: ${{ matrix.compiler }}
|
2024-02-10 15:34:50 +03:00
|
|
|
CFLAGS: ${{ matrix.cflags }} -Werror
|
2022-10-11 04:50:44 +03:00
|
|
|
LDFLAGS: ${{ matrix.ldflags }}
|
2022-10-11 21:08:38 +03:00
|
|
|
CHOST: ${{ matrix.chost }}
|
2022-10-07 07:50:16 +03:00
|
|
|
|
|
|
|
- name: Compile source code
|
|
|
|
run: make -j2
|
|
|
|
working-directory: ${{ matrix.build-dir }}
|
|
|
|
|
|
|
|
- name: Run test cases
|
2022-10-11 04:40:09 +03:00
|
|
|
run: |
|
|
|
|
make test
|
|
|
|
make cover
|
2022-10-07 07:50:16 +03:00
|
|
|
working-directory: ${{ matrix.build-dir }}
|
2022-10-11 21:10:17 +03:00
|
|
|
env:
|
|
|
|
QEMU_RUN: ${{ matrix.qemu-run }}
|
2022-10-11 04:39:14 +03:00
|
|
|
|
|
|
|
- name: Upload build errors
|
2024-02-09 20:21:03 +03:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-10-11 04:39:14 +03:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.name }} (configure)
|
|
|
|
path: |
|
|
|
|
${{ matrix.build-dir || '.' }}/configure.log
|
|
|
|
retention-days: 7
|