supervisor: Fix unused parameter in handle_kqueue #168
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
name: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
env: | |
BUILD_DEPS: cmake libconfig++-dev libxxhash-dev libjemalloc-dev libtsl-hopscotch-map-dev pkg-config python3-jinja2 | |
TEST_DEPS: bc bats clang node-d3 graphviz moreutils fakeroot | |
jobs: | |
build-on-ubuntu-lts: | |
needs: style-checks | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/debs | |
key: build-on-ubuntu-lts-debs-${{ needs.style-checks.outputs.week }} | |
# TODO: This and saving the debs can be dropped and and the debs can be saved directly like in docker | |
# when https://github.com/actions/cache/issues/324 gets fixed | |
- name: restore-cached-debs | |
run: | | |
[ -d ~/.cache/debs ] && sudo cp ~/.cache/debs/* /var/cache/apt/archives/ || mkdir -p ~/.cache/debs | |
- uses: firebuild/firebuild-action@v3 | |
with: | |
key: build-on-ubuntu-lts | |
- name: install-deps | |
run: | | |
sudo eatmydata apt-get -y install $BUILD_DEPS $TEST_DEPS doxygen lcov | |
- name: build-out-of-tree | |
run: | | |
mkdir build | |
cd build | |
firebuild cmake -DCMAKE_BUILD_TYPE=Release .. | |
firebuild make -j2 | |
- name: doc | |
run: | | |
cd build | |
firebuild doxygen | |
- name: build-in-tree | |
run: | | |
firebuild cmake -DWITH_JEMALLOC=OFF -DCMAKE_BUILD_TYPE=Debug . | |
firebuild make -j2 all check-bins | |
- name: test | |
run: | | |
make check | |
- name: coverage | |
# tests don't run with out of tree builds at the moment | |
run: | | |
git clean -dxf | |
firebuild cmake -DCOVERAGE=1 -DCMAKE_BUILD_TYPE=Debug . | |
firebuild make all check-bins | |
make -j2 check coverage-info | |
[ $(echo "$(make coverage-info | grep '^[\.0-9]*$') >= 75" | bc) = 1 ] | |
- name: save-cached-debs | |
run: | | |
rm -f ~/.cache/debs/* | |
cp /var/cache/apt/archives/*deb ~/.cache/debs/ | |
test-with-valgrind: | |
needs: style-checks | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/debs | |
key: test-with-valgrind-debs-${{ needs.style-checks.outputs.week }} | |
# TODO: This and saving the debs can be dropped and and the debs can be saved directly like in docker | |
# when https://github.com/actions/cache/issues/324 gets fixed | |
- name: restore-cached-debs | |
run: | | |
[ -d ~/.cache/debs ] && sudo cp ~/.cache/debs/* /var/cache/apt/archives/ || mkdir -p ~/.cache/debs | |
- uses: firebuild/firebuild-action@v3 | |
with: | |
key: test-with-valgrind | |
- name: install-deps | |
run: | | |
sudo eatmydata apt-get -y install $BUILD_DEPS $TEST_DEPS valgrind | |
- name: build-in-tree | |
run: | | |
firebuild cmake -DWITH_JEMALLOC=OFF -DCMAKE_BUILD_TYPE=Debug . | |
firebuild make -j2 all check-bins | |
- name: test | |
run: | | |
firebuild make -j3 close_fds_exec | |
test/close_fds_exec make valgrind-check | |
- name: save-cached-debs | |
run: | | |
rm -f ~/.cache/debs/* | |
cp /var/cache/apt/archives/*deb ~/.cache/debs/ | |
# build on various Debian derivative releases in docker | |
build-in-docker: | |
strategy: | |
matrix: | |
container: ["ubuntu:rolling", "ubuntu:devel", "i386/debian"] | |
needs: style-checks | |
runs-on: ubuntu-latest | |
container: ${{ matrix.container }} | |
timeout-minutes: 15 | |
steps: | |
- name: disable-apt-docker-clean | |
run: | | |
# don't clean apt archive cache to make deb caching work | |
rm -f /etc/apt/apt.conf.d/docker-clean | |
- name: apt update | |
run: | | |
sed -i 's|/archive.ubuntu.com|/azure.archive.ubuntu.com|' /etc/apt/sources.list || true | |
apt-get -qq update | |
- name: install-deps | |
run: | | |
# configure tzdata in advance to prevent hanging at the prompt | |
TZ=Europe/Budapest | |
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime | |
echo $TZ > /etc/timezone | |
apt-get install -y eatmydata | |
eatmydata apt-get -y install $BUILD_DEPS $TEST_DEPS g++ gcc git | |
# use checkout@v1 that works in i386 containers without node | |
- uses: actions/checkout@v1 | |
with: | |
fetch-depth: 0 | |
- name: build-out-of-tree | |
run: | | |
# avoid git error about repository ownership | |
git config --global --add safe.directory $PWD | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=Release .. | |
make -j2 | |
# Version should be set in the source before tagging a release, | |
# then the version should be unset right in the next commit. | |
BUILT_VERSION=$(src/firebuild/firebuild --version | head -n1 | cut -d" " -f2) | |
GIT_VERSION=$(git describe --tags | sed s/^v//) | |
dpkg --compare-versions $BUILT_VERSION ge $GIT_VERSION || (echo "ERROR: built version $BUILT_VERSION < git version $GIT_VERSION" ; exit 1) | |
- name: build-in-tree | |
run: | | |
cmake -DCMAKE_BUILD_TYPE=Debug . | |
make -j2 all check-bins | |
make -j2 check | |
clang-build: | |
needs: style-checks | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/debs | |
key: clang-build-debs-${{ needs.style-checks.outputs.week }} | |
- name: restore-cached-debs | |
run: | | |
[ -d ~/.cache/debs ] && sudo cp ~/.cache/debs/* /var/cache/apt/archives/ || mkdir -p ~/.cache/debs | |
- uses: firebuild/firebuild-action@v3 | |
with: | |
key: clang-build | |
- name: install-deps | |
run: | | |
sudo eatmydata apt-get -y install clang-tools $BUILD_DEPS $TEST_DEPS valgrind | |
- name: build | |
run: | | |
env CC=clang CXX=clang++ LD=ld.lld cmake . | |
firebuild make -j2 all check-bins | |
- name: test | |
run: | | |
make check | |
test/close_fds_exec make valgrind-check | |
- name: clean | |
run: make clean | |
- name: scan-build | |
run: | | |
# work around static analyzer report about emmintrin.h with XXH_INLINE_ALL | |
scan-build cmake -DENABLE_XXH_INLINE_ALL=OFF . | |
scan-build --status-bugs make -j2 | |
- name: save-cached-debs | |
run: | | |
rm -f ~/.cache/debs/* | |
cp /var/cache/apt/archives/*deb ~/.cache/debs/ | |
rebuild-self: | |
needs: style-checks | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/debs | |
key: rebuild-self-debs-${{ needs.style-checks.outputs.week }} | |
- name: restore-cached-debs | |
run: | | |
[ -d ~/.cache/debs ] && sudo cp ~/.cache/debs/* /var/cache/apt/archives/ || mkdir -p ~/.cache/debs | |
- uses: firebuild/firebuild-action@v3 | |
with: | |
key: rebuild-self | |
- name: install-deps | |
run: | | |
sudo eatmydata apt-get -y install $BUILD_DEPS | |
- name: rebuild self | |
run: | | |
tools/rebuild-self build | |
# rebuild again, to test shortcutting | |
cd build-first-build/test | |
./run-firebuild make -C ../../build clean | |
time ./run-firebuild make -j2 -C ../../build all | |
du -sh test_cache_dir | |
- name: rebuild self with -j8 | |
run: | | |
cd build-first-build/test | |
rm -r test_cache_dir | |
./run-firebuild make -C ../../build clean | |
time ./run-firebuild make -j8 -C ../../build all | |
./run-firebuild make -C ../../build clean | |
time ./run-firebuild make -j8 -C ../../build all | |
- name: save-cached-debs | |
run: | | |
rm -f ~/.cache/debs/* | |
cp /var/cache/apt/archives/*deb ~/.cache/debs/ | |
build-other-projects: | |
needs: style-checks | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/debs | |
key: build-other-projects-debs-${{ needs.style-checks.outputs.week }} | |
- name: restore-cached-debs | |
run: | | |
[ -d ~/.cache/debs ] && sudo cp ~/.cache/debs/* /var/cache/apt/archives/ || mkdir -p ~/.cache/debs | |
- uses: firebuild/firebuild-action@v3 | |
with: | |
key: build-other-projects | |
- name: install-deps | |
run: | | |
sudo sed -i 's/# deb-src/deb-src/' /etc/apt/sources.list | |
# work around https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1979244 | |
echo 'APT::Get::Always-Include-Phased-Updates "true";' | sudo tee /etc/apt/apt.conf.d/99-firebuild-phased-updates | |
sudo apt-get update | |
sudo eatmydata apt-get -y install devscripts $BUILD_DEPS $TEST_DEPS | |
sudo eatmydata apt-get build-dep vte2.91 | |
- name: build-in-tree | |
run: | | |
firebuild cmake -DWITH_JEMALLOC=OFF -DSANITIZE=ON . | |
firebuild make -j2 all check-bins | |
make -j2 check | |
- name: build-vte | |
run: | | |
apt-get source vte2.91 | |
cd vte2.91-* | |
meson build | |
cd ../test | |
./run-firebuild ninja -j8 -C ../vte2.91-*/build | |
ninja -C ../vte2.91-*/build clean | |
./run-firebuild ninja -j8 -C ../vte2.91-*/build | |
- name: save-cached-debs | |
run: | | |
rm -f ~/.cache/debs/* | |
cp /var/cache/apt/archives/*deb ~/.cache/debs/ | |
build-deb: | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, ubuntu-22.04] | |
needs: style-checks | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/debs | |
key: build-deb-debs-${{ matrix.os }}-${{ needs.style-checks.outputs.week }} | |
- name: restore-cached-debs | |
run: | | |
[ -d ~/.cache/debs ] && sudo cp ~/.cache/debs/* /var/cache/apt/archives/ || mkdir -p ~/.cache/debs | |
- uses: firebuild/firebuild-action@v3 | |
with: | |
key: build-deb-${{ matrix.os }} | |
- name: install-deps | |
run: | | |
! [ ${{ matrix.os }} == "ubuntu-20.04" ] || sudo add-apt-repository -y -n ppa:firebuild/build-deps | |
sudo apt update | |
sudo eatmydata apt-get build-dep . | |
- name: deb | |
run: | | |
# skip dh_buildinfo step | |
printf '\noverride_dh_buildinfo:\n' >> debian/rules | |
# don't intercept bats and ldd to avoid breaking firebuild's own tests | |
firebuild -o 'processes.dont_intercept += "bats"' -o 'processes.dont_intercept += "ldd"' dpkg-buildpackage -j2 -us -uc | |
echo debconf firebuild/license-accepted select true | sudo debconf-set-selections | |
sudo apt-get install -y --allow-downgrades ../*.deb | |
firebuild -- ls | |
- name: save-cached-debs | |
run: | | |
rm -f ~/.cache/debs/* | |
cp /var/cache/apt/archives/*deb ~/.cache/debs/ | |
build-on-macos: | |
needs: style-checks | |
runs-on: macos-12 | |
timeout-minutes: 30 | |
steps: | |
- name: check if SIP is enabled on this runner | |
run: | | |
csrutil status | grep "System Integrity Protection status: disabled" | |
- uses: actions/checkout@v3 | |
- uses: hendrikmuhs/ccache-action@v1 | |
with: | |
key: build-on-macos-12 | |
- name: install-deps | |
run: | | |
brew update | |
BREW_BUILD_DEPS="bats-core coreutils docbook-xsl hopscotch-map jemalloc jinja2-cli libconfig xxhash" | |
export HOMEBREW_NO_AUTO_UPDATE=1 | |
# brew often fails due to existing files, hence the --overwrite parameter and the retry | |
brew install --overwrite $BREW_BUILD_DEPS || (for v in 3.11 3.12; do brew link --overwrite python@${v} ; done; brew install --overwrite $BREW_BUILD_DEPS) | |
- name: configure vm | |
run: | | |
# library validation would prevent loading libfirebuild to some binaries | |
sudo defaults write /Library/Preferences/com.apple.security.libraryvalidation.plist DisableLibraryValidation -bool true | |
- name: build-in-tree | |
run: | | |
export PATH=/usr/local/opt/ccache/libexec:$(ls -d /usr/local/Cellar/jinja2-cli/*/libexec/bin):$PATH | |
cmake -DCMAKE_CXX_FLAGS="-I/usr/local/include" -DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/lib" -DCMAKE_BUILD_TYPE=Debug . | |
export XML_CATALOG_FILES=/usr/local/etc/xml/catalog | |
make -j2 | |
- name: test | |
run: | | |
make check | |
style-checks: | |
runs-on: ubuntu-22.04 | |
outputs: | |
week: ${{ steps.week-of-year.outputs.week }} # map step output to job output | |
timeout-minutes: 2 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install-deps | |
run: | | |
# TODO(rbalint) use packaged cpplint when it becomes available https://bugs.debian.org/960847 | |
pip3 install cpplint==1.5.4 | |
- name: style-check | |
run: env PATH=$HOME/.local/bin:$PATH cpplint --recursive src test | |
# this will be used by other jobs to invalidate cache after a week | |
- name: week of year | |
id: week-of-year | |
run: echo "week=$(/bin/date -u "+%V")" >> $GITHUB_OUTPUT |