12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- name: build
- on: [push, pull_request]
- jobs:
- build:
- strategy:
- matrix:
- os: [ubuntu-22.04, macos-11]
- compiler: [gcc, clang]
- runs-on: ${{ matrix.os }}
- steps:
- - uses: actions/checkout@v3
- - name: Linux setup
- if: runner.os == 'Linux'
- run: |
- sudo apt-get install \
- g++-11 \
- clang-12 \
- autoconf \
- automake \
- autotools-dev \
- autopoint \
- libtool \
- pkg-config \
- libssl-dev \
- libc-ares-dev \
- zlib1g-dev \
- libsqlite3-dev \
- libssh2-1-dev \
- libcppunit-dev
- - name: MacOS setup
- if: runner.os == 'macOS'
- run: |
- brew install cppunit gettext openssl libssh2 c-ares sqlite3 \
- autoconf automake pkg-config libtool
- - name: Setup clang (Linux)
- if: runner.os == 'Linux' && matrix.compiler == 'clang'
- run: |
- echo 'CC=clang-12' >> $GITHUB_ENV
- echo 'CXX=clang++-12' >> $GITHUB_ENV
- - name: Setup clang (MacOS)
- if: runner.os == 'macOS' && matrix.compiler == 'clang'
- run: |
- echo 'CC=clang' >> $GITHUB_ENV
- echo 'CXX=clang++' >> $GITHUB_ENV
- - name: Setup gcc (Linux)
- if: runner.os == 'Linux' && matrix.compiler == 'gcc'
- run: |
- echo 'CC=gcc-11' >> $GITHUB_ENV
- echo 'CXX=g++-11' >> $GITHUB_ENV
- - name: Setup gcc (MacOS)
- if: runner.os == 'macOS' && matrix.compiler == 'gcc'
- run: |
- echo 'CC=gcc' >> $GITHUB_ENV
- echo 'CXX=g++' >> $GITHUB_ENV
- - name: Libtool
- run: |
- autoreconf -i
- - name: Configure autotools (Linux)
- if: runner.os == 'Linux'
- run: |
- ./configure \
- CPPFLAGS="-fsanitize=address" LDFLAGS="-fsanitize=address"
- - name: Configure autotools (macOS)
- if: runner.os == 'macOS'
- run: |
- ./configure \
- --without-openssl --without-gnutls --with-appletls \
- --disable-nls \
- CPPFLAGS="-fsanitize=address" LDFLAGS="-fsanitize=address"
- - name: Build aria2
- run: |
- make -j"$(nproc 2> /dev/null || sysctl -n hw.ncpu)" check
|