summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2020-12-28 11:04:37 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2020-12-28 12:05:07 +0900
commitfaa6955c8d7bb7b6541e0b7fbb84f7d213f761ab (patch)
tree9cd2a9694ed4eea31186dcdc83f6fe1fb96f00b0
parentf292bbba857fe559d79de80ca1fc180739b7b22f (diff)
Add GitHub Actions workflow build
-rw-r--r--.github/workflows/build.yml66
1 files changed, 66 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 00000000..58b7b4e2
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,66 @@
+name: build
+
+on: push
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+
+ strategy:
+ matrix:
+ os: [ubuntu-20.04, macos-10.15]
+ compiler: [gcc, clang]
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Linux setup
+ if: runner.os == 'Linux'
+ run: |
+ sudo apt-get install \
+ g++-8 \
+ 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
+ if: matrix.compiler == 'clang'
+ run: |
+ echo 'CC=clang' >> $GITHUB_ENV
+ echo 'CXX=clang++' >> $GITHUB_ENV
+ - name: Setup gcc
+ if: runner.os == 'Linux' && matrix.compiler == 'gcc'
+ run: |
+ echo 'CC=gcc-8' >> $GITHUB_ENV
+ echo 'CXX=g++-8' >> $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
+ make check