| language: c |
| |
| os: |
| - linux |
| |
| sudo: required |
| |
| compiler: |
| - gcc |
| - clang |
| |
| env: |
| matrix: |
| - BUILD_ARCH="x86_64" |
| - BUILD_ARCH="x86" |
| |
| addons: |
| apt: |
| packages: |
| - clang |
| - gcc |
| - make |
| |
| before_install: |
| - sudo apt update || true |
| - sudo apt install -y gcc-multilib g++-multilib |
| - curl -L "https://storage.googleapis.com/shellcheck/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJ |
| - sudo cp shellcheck-stable/shellcheck /usr/local/bin/ |
| - CFLAGS="-Werror" |
| - CXXFLAGS="-Werror" |
| - if [ "$BUILD_ARCH" == "x86" ]; then |
| CFLAGS="$CFLAGS -m32"; |
| CXXFLAGS="$CXXFLAGS -m32"; |
| LDFLAGS="$LDFLAGS -m32"; |
| fi |
| |
| script: |
| - make CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" |
| - make check |