-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from Castaglia/github-ci-workflow
Move from Travis to GitHub Actions for our CI needs.
- Loading branch information
Showing
5 changed files
with
143 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
compiler: | ||
- gcc | ||
- clang | ||
|
||
container: ubuntu:18.04 | ||
|
||
steps: | ||
- name: Install git | ||
run: | | ||
apt-get update -qq | ||
apt-get install -y git | ||
- name: Checkout ProFTPD | ||
run: | | ||
git clone --depth 1 https://github.com/proftpd/proftpd.git proftpd | ||
- name: Checkout module source code | ||
uses: actions/checkout@v2 | ||
with: | ||
path: proftpd/contrib/mod_vroot | ||
|
||
- name: Whitespace check | ||
run: | | ||
cd proftpd/contrib/mod_vroot | ||
if [[ -n $(git diff --check HEAD^) ]]; then | ||
echo "You must remove whitespace before submitting a pull request" | ||
echo "" | ||
git diff --check HEAD^ | ||
exit 1 | ||
fi | ||
- name: Install packages | ||
run: | | ||
# Need to add other repos for e.g. libsodium | ||
apt-get update -qq | ||
# for builds | ||
apt-get install -y git make | ||
# for unit tests | ||
apt-get install -y check libsubunit-dev | ||
# module dependencies, if any | ||
# for integration/regression test | ||
# for test code coverage | ||
apt-get install -y lcov ruby | ||
gem install coveralls-lcov | ||
# for HTML validation | ||
apt-get install -y tidy | ||
# for clang | ||
apt-get install -y clang | ||
# for debugging | ||
clang --version | ||
gcc --version | ||
- name: Prepare code coverage | ||
run: | | ||
lcov --directory proftpd --zerocounters | ||
- name: Build with static modules | ||
env: | ||
CC: ${{ matrix.compiler }} | ||
run: | | ||
cd proftpd | ||
./configure LIBS="-lm -lsubunit -lrt -pthread" --enable-devel=coverage --enable-tests --with-modules=mod_vroot | ||
make | ||
- name: Run unit tests | ||
env: | ||
CC: ${{ matrix.compiler }} | ||
run: | | ||
cd proftpd/contrib/mod_vroot | ||
make TEST_VERBOSE=1 check | ||
- name: Install with static modules | ||
run: | | ||
cd proftpd | ||
make install | ||
- name: Build with shared modules | ||
env: | ||
CC: ${{ matrix.compiler }} | ||
run: | | ||
cd proftpd | ||
make clean | ||
./configure LIBS="-lm -lsubunit -lrt -pthread" --enable-devel --enable-dso --with-shared=mod_vroot | ||
make | ||
- name: Install with shared modules | ||
run: | | ||
cd proftpd | ||
make install | ||
# https://github.com/google/sanitizers/wiki/AddressSanitizer | ||
# https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer | ||
# https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html | ||
# | ||
# NOTE: Using MemorySanitizer is desirable, but currently unusable since | ||
# libcheck is not instrumented, resulting in unsuppressible false | ||
# positives. | ||
- name: Run unit tests under asan+lsan+ubsan | ||
env: | ||
ASAN_OPTIONS: abort_on_error=1,check_initialization_order=true,debug=true,detect_invalid_pointer_pairs=2,detect_leaks=1,detect_stack_use_after_return=true,strict_string_checks=true,verbosity=0 | ||
CC: ${{ matrix.compiler }} | ||
CFLAGS: -fsanitize=address,undefined | ||
LDFLAGS: -fsanitize=address,undefined --coverage | ||
if: ${{ matrix.compiler == 'clang' }} | ||
run: | | ||
cd proftpd | ||
make clean | ||
./configure LIBS="-lm -lsubunit -lrt -pthread" --enable-devel --enable-tests --with-modules=mod_vroot | ||
make | ||
cd contrib/mod_vroot | ||
export ASAN_SYMBOLIZER_PATH=$(readlink -f $(which llvm-symbolizer-10)) | ||
make TEST_VERBOSE=1 check | ||
- name: Check HTML docs | ||
run: | | ||
cd proftpd/contrib/mod_vroot | ||
echo "Processing mod_vroot.html" | ||
tidy -errors -omit -q mod_vroot.html | exit 0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters