build.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. name: build
  2. on: [push, pull_request]
  3. jobs:
  4. build:
  5. runs-on: ${{ matrix.os }}
  6. strategy:
  7. matrix:
  8. os: [ubuntu-20.04, macos-10.15]
  9. compiler: [gcc, clang]
  10. steps:
  11. - uses: actions/checkout@v2
  12. - name: Linux setup
  13. if: runner.os == 'Linux'
  14. run: |
  15. sudo apt-get install \
  16. g++-8 \
  17. autoconf \
  18. automake \
  19. autotools-dev \
  20. autopoint \
  21. libtool \
  22. pkg-config \
  23. libssl-dev \
  24. libc-ares-dev \
  25. zlib1g-dev \
  26. libsqlite3-dev \
  27. libssh2-1-dev \
  28. libcppunit-dev
  29. - name: MacOS setup
  30. if: runner.os == 'macOS'
  31. run: |
  32. brew install cppunit gettext openssl libssh2 c-ares sqlite3 \
  33. autoconf automake pkg-config libtool
  34. - name: Setup clang
  35. if: matrix.compiler == 'clang'
  36. run: |
  37. echo 'CC=clang' >> $GITHUB_ENV
  38. echo 'CXX=clang++' >> $GITHUB_ENV
  39. - name: Setup gcc
  40. if: runner.os == 'Linux' && matrix.compiler == 'gcc'
  41. run: |
  42. echo 'CC=gcc-8' >> $GITHUB_ENV
  43. echo 'CXX=g++-8' >> $GITHUB_ENV
  44. - name: Libtool
  45. run: |
  46. autoreconf -i
  47. - name: Configure autotools (Linux)
  48. if: runner.os == 'Linux'
  49. run: |
  50. ./configure \
  51. CPPFLAGS="-fsanitize=address" LDFLAGS="-fsanitize=address"
  52. - name: Configure autotools (macOS)
  53. if: runner.os == 'macOS'
  54. run: |
  55. ./configure \
  56. --without-openssl --without-gnutls --with-appletls \
  57. --disable-nls \
  58. CPPFLAGS="-fsanitize=address" LDFLAGS="-fsanitize=address"
  59. - name: Build aria2
  60. run: |
  61. make -j$(nproc) check