Merge pull request #1414 from azat/build/deprecate-autotools

Deprecate autotools build
This commit is contained in:
Azat Khuzhin 2023-02-13 08:09:21 +01:00 committed by GitHub
commit 28c28f075b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 104 additions and 246 deletions

View File

@ -9,23 +9,21 @@ on:
- opened
branches:
- master
push:
paths-ignore:
- '**.md'
- '.mailmap'
- 'ChangeLog*'
- 'whatsnew*'
- 'LICENSE'
paths-ignore:
- '**.md'
- '.mailmap'
- 'ChangeLog*'
- 'whatsnew*'
- 'LICENSE'
push:
branches:
- master
push:
paths-ignore:
- '**.md'
- '.mailmap'
- 'ChangeLog*'
- 'whatsnew*'
- 'LICENSE'
paths-ignore:
- '**.md'
- '.mailmap'
- 'ChangeLog*'
- 'whatsnew*'
- 'LICENSE'
jobs:
linux-cmake-job:
@ -58,14 +56,14 @@ jobs:
EVENT_MATRIX: UBSAN
steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v3
- name: Cache Build
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: build
key: ${{ matrix.os }}-cmake-${{ matrix.EVENT_MATRIX }}-v3
- name: Cache Dist Build
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: dist
key: ${{ matrix.os }}-cmake-dist-${{ matrix.EVENT_MATRIX }}-v3
@ -172,31 +170,17 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-18.04]
EVENT_MATRIX:
- DIST
- NONE
- NO_SSL
- DISABLE_OPENSSL
- DISABLE_THREAD_SUPPORT
- DISABLE_DEBUG_MODE
- DISABLE_MM_REPLACEMENT
- COMPILER_CLANG
include:
# openssl 3.0
- os: ubuntu-22.04
EVENT_MATRIX: OPENSSL_3
steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v3
- name: Cache Build
uses: actions/cache@v2
with:
path: build
key: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-v3
- name: Cache Dist Build
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: dist
key: ${{ matrix.os }}-autotools-dist-${{ matrix.EVENT_MATRIX }}-v3
key: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-v3
- name: Install Depends
run: |
@ -206,46 +190,23 @@ jobs:
- name: Build
shell: bash
run: |
if [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_OPENSSL" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-openssl"
elif [ "${{ matrix.EVENT_MATRIX }}" == "NO_SSL" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-openssl --disable-mbedtls"
elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_THREAD_SUPPORT" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-thread-support"
elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_DEBUG_MODE" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-debug-mode"
elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_MM_REPLACEMENT" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-malloc-replacement"
elif [ "${{ matrix.EVENT_MATRIX }}" == "COMPILER_CLANG" ]; then
EVENT_CONFIGURE_OPTIONS=""
export CC=clang
else
EVENT_CONFIGURE_OPTIONS=""
fi
./autogen.sh
if [ "${{ matrix.EVENT_MATRIX }}" == "DIST" ]; then
mkdir -p dist
cd dist
rm -fr *.tar.gz
../configure $EVENT_CONFIGURE_OPTIONS
make dist
archive=$(echo *.tar.gz)
tar -vxf $archive
cd $(basename $archive .tar.gz)
fi
# dist archive
mkdir -p dist
cd dist
rm -fr *.tar.gz
../configure
make dist
archive=$(echo *.tar.gz)
tar -vxf $archive
cd $(basename $archive .tar.gz)
# \dist archive
mkdir -p build
cd build
echo [configure]: ../configure --enable-gcc-warnings $EVENT_CONFIGURE_OPTIONS
../configure --enable-gcc-warnings $EVENT_CONFIGURE_OPTIONS
echo [configure]: ../configure --enable-gcc-warnings
../configure --enable-gcc-warnings
make
- name: Test
uses: nick-fields/retry@v2
@ -255,21 +216,16 @@ jobs:
shell: bash
command: |
JOBS=20
if [ "${{ matrix.EVENT_MATRIX }}" == "DIST" ]; then
cd dist
archive=$(echo *.tar.gz)
cd $(basename $archive .tar.gz)
fi
cd dist
archive=$(echo *.tar.gz)
cd $(basename $archive .tar.gz)
cd build
make -j $JOBS verify
- uses: actions/upload-artifact@v1
if: failure() && matrix.EVENT_MATRIX != 'DIST'
with:
name: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-build
path: build
- uses: actions/upload-artifact@v1
if: failure() && matrix.EVENT_MATRIX == 'DIST'
if: failure()
with:
name: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-dist
path: dist
@ -295,10 +251,10 @@ jobs:
- TEST_EXPORT_STATIC
steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v3
- name: Cache Build
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: build
key: ${{ matrix.os }}-${{ matrix.EVENT_MATRIX }}-v4
@ -422,22 +378,14 @@ jobs:
if: "!contains(github.event.head_commit.message, 'ci/mingw skip') && !contains(github.event.head_commit.message, 'ci/mingw/autotools skip')"
strategy:
fail-fast: false
matrix:
EVENT_MATRIX:
- none
- no-ssl
- disable-openssl
- disable-thread-support
- disable-debug-mode
- disable-malloc-replacement
steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v3
- name: Cache Build
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: build
key: mingw-autotools-${{ matrix.EVENT_MATRIX }}-v5
key: mingw-autotools-v5
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
@ -448,13 +396,6 @@ jobs:
- name: Build
shell: powershell
run: |
$env:EVENT_CONFIGURE_OPTIONS=""
if ( "${{ matrix.EVENT_MATRIX }}" -eq "no-ssl" ) {
$env:EVENT_CONFIGURE_OPTIONS="--disable-openssl --disable-mbedtls"
}
elseif ( "${{ matrix.EVENT_MATRIX }}" -ne "none" ) {
$env:EVENT_CONFIGURE_OPTIONS="--${{ matrix.EVENT_MATRIX }}"
}
$env:EVENT_BUILD_PARALLEL=10
$script='
@ -464,7 +405,7 @@ jobs:
mkdir -p build
cd build
[[ $? -ne 0 ]] && exit 1
LDFLAGS="-L/mingw64/lib" CFLAGS="-I/mingw64/include" ../configure $EVENT_CONFIGURE_OPTIONS 2>&1
LDFLAGS="-L/mingw64/lib" CFLAGS="-I/mingw64/include" ../configure 2>&1
[[ $? -ne 0 ]] && exit 1
make -j $EVENT_BUILD_PARALLEL 2>&1
[[ $? -ne 0 ]] && exit 1
@ -510,9 +451,9 @@ jobs:
- DISABLE_MM_REPLACEMENT
steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v3
- name: Cache Build
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: build
key: mingw-cmake-${{ matrix.EVENT_MATRIX }}-v4
@ -527,12 +468,12 @@ jobs:
- name: Build
shell: powershell
run: |
$EVENT_CONFIGURE_OPTIONS=""
$EVENT_CMAKE_OPTIONS=""
if ( "${{ matrix.EVENT_MATRIX }}" -ne "NO_SSL" ) {
$EVENT_CONFIGURE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON -DEVENT__DISABLE_MBEDTLS=ON"
$EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON -DEVENT__DISABLE_MBEDTLS=ON"
}
elseif ( "${{ matrix.EVENT_MATRIX }}" -ne "NONE" ) {
$EVENT_CONFIGURE_OPTIONS="-DEVENT__${{ matrix.EVENT_MATRIX }}=ON"
$EVENT_CMAKE_OPTIONS="-DEVENT__${{ matrix.EVENT_MATRIX }}=ON"
}
$env:PATH="D:\a\_temp\msys64\mingw64\bin;D:\a\_temp\msys64\usr\bin;$env:PATH"
mkdir build -ea 0
@ -541,7 +482,7 @@ jobs:
{
$errcode=0
try {
cmake .. -G "MSYS Makefiles" $EVENT_CONFIGURE_OPTIONS -DCMAKE_C_FLAGS=-w
cmake .. -G "MSYS Makefiles" $EVENT_CMAKE_OPTIONS -DCMAKE_C_FLAGS=-w
$errcode=$LastExitCode
}
catch {
@ -596,13 +537,13 @@ jobs:
- TEST_EXPORT_SHARED
steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v3
- name: Cache Build
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: build
key: macos-10.15-cmake-${{ matrix.EVENT_MATRIX }}-v3
key: ${{ matrix.os }}-cmake-${{ matrix.EVENT_MATRIX }}-v3
- name: Install Depends
run: brew install mbedtls@2
@ -679,22 +620,15 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest]
EVENT_MATRIX:
- NONE
- NO_SSL
- DISABLE_OPENSSL
- DISABLE_THREAD_SUPPORT
- DISABLE_DEBUG_MODE
- DISABLE_MM_REPLACEMENT
steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v3
- name: Cache Build
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: build
key: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-v3
key: ${{ matrix.os }}-autotools-v3
- name: Install Depends
run: brew install autoconf automake libtool pkg-config mbedtls@2
@ -705,30 +639,11 @@ jobs:
export CPPFLAGS="-I/usr/local/opt/mbedtls@2/include"
export LDFLAGS="-L/usr/local/opt/mbedtls@2/lib"
if [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_OPENSSL" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-openssl"
elif [ "${{ matrix.EVENT_MATRIX }}" == "NO_SSL" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-openssl --disable-mbedtls"
elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_THREAD_SUPPORT" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-thread-support"
elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_DEBUG_MODE" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-debug-mode"
elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_MM_REPLACEMENT" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-malloc-replacement"
else
EVENT_CONFIGURE_OPTIONS=""
fi
./autogen.sh
mkdir -p build
cd build
echo [configure]: ../configure $EVENT_CONFIGURE_OPTIONS
../configure $EVENT_CONFIGURE_OPTIONS
echo [configure]: ../configure
../configure
make
- name: Test
@ -768,10 +683,10 @@ jobs:
- TEST_EXPORT_SHARED
steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v3
- name: Cache Build
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: build
key: freebsd-${{ matrix.release }}-cmake-${{ matrix.EVENT_MATRIX }}-v1
@ -850,25 +765,16 @@ jobs:
strategy:
fail-fast: false
matrix:
# NOTE: 13.0 has some issues:
# ld-elf.so.1: /lib/libc.so.7: version FBSD_1.7 required by /usr/local/lib/libpython3.9.so.1.0 not found
release: ["12.3", "13.1"]
EVENT_MATRIX:
- NONE
- NO_SSL
- DISABLE_OPENSSL
- DISABLE_THREAD_SUPPORT
- DISABLE_DEBUG_MODE
- DISABLE_MM_REPLACEMENT
release: ["13.1"]
steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v3
- name: Cache Build
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: build
key: freebsd-${{ matrix.release }}-autotools-${{ matrix.EVENT_MATRIX }}-v1
key: freebsd-${{ matrix.release }}-autotools-v1
- name: Build
@ -879,30 +785,11 @@ jobs:
pkg install -y mbedtls python3 autoconf automake libtool pkgconf
usesh: true
run: |
if [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_OPENSSL" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-openssl"
elif [ "${{ matrix.EVENT_MATRIX }}" == "NO_SSL" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-openssl --disable-mbedtls"
elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_THREAD_SUPPORT" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-thread-support"
elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_DEBUG_MODE" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-debug-mode"
elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_MM_REPLACEMENT" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-malloc-replacement"
else
EVENT_CONFIGURE_OPTIONS=""
fi
./autogen.sh
mkdir -p build
cd build
echo [configure]: ../configure $EVENT_CONFIGURE_OPTIONS
../configure $EVENT_CONFIGURE_OPTIONS
echo [configure]: ../configure
../configure
make
- name: Test
@ -951,10 +838,10 @@ jobs:
# - TEST_EXPORT_SHARED
steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v3
- name: Cache Build
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: build
key: openbsd-${{ matrix.release }}-cmake-${{ matrix.EVENT_MATRIX }}-v1
@ -969,30 +856,30 @@ jobs:
run: |
if [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_OPENSSL" ]; then
EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON"
elif [ "${{ matrix.EVENT_MATRIX }}" == "NO_SSL" ]; then
EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON -DEVENT__DISABLE_MBEDTLS=ON"
elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_THREAD_SUPPORT" ]; then
EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_THREAD_SUPPORT=ON"
elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_DEBUG_MODE" ]; then
EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_DEBUG_MODE=ON"
elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_MM_REPLACEMENT" ]; then
EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_MM_REPLACEMENT=ON"
elif [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_STATIC" ]; then
EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=STATIC -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
elif [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_SHARED" ]; then
EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=SHARED -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
else
EVENT_CMAKE_OPTIONS=""
fi
EVENT_CMAKE_OPTIONS="$EVENT_CMAKE_OPTIONS -DMBEDTLS_ROOT_DIR=/usr/local/opt/mbedtls@2"
mkdir -p build
cd build
echo [cmake]: cmake .. $EVENT_CMAKE_OPTIONS
@ -1033,28 +920,16 @@ jobs:
strategy:
fail-fast: false
matrix:
release: [
# 6.9 has some issues with autoconf/autotools [1].
# [1]: https://github.com/libevent/libevent/pull/1326#issuecomment-1229531718
#"6.9",
"7.1",
]
EVENT_MATRIX:
- NONE
- NO_SSL
- DISABLE_OPENSSL
- DISABLE_THREAD_SUPPORT
- DISABLE_DEBUG_MODE
- DISABLE_MM_REPLACEMENT
release: ["7.1"]
steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v3
- name: Cache Build
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: build
key: openbsd-${{ matrix.release }}-autotools-${{ matrix.EVENT_MATRIX }}-v1
key: openbsd-${{ matrix.release }}-autotools-v1
- name: Build
@ -1067,31 +942,12 @@ jobs:
run: |
export AUTOMAKE_VERSION=1.16
export AUTOCONF_VERSION=2.71
if [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_OPENSSL" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-openssl"
elif [ "${{ matrix.EVENT_MATRIX }}" == "NO_SSL" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-openssl --disable-mbedtls"
elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_THREAD_SUPPORT" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-thread-support"
elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_DEBUG_MODE" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-debug-mode"
elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_MM_REPLACEMENT" ]; then
EVENT_CONFIGURE_OPTIONS="--disable-malloc-replacement"
else
EVENT_CONFIGURE_OPTIONS=""
fi
./autogen.sh
mkdir -p build
cd build
echo [configure]: ../configure $EVENT_CONFIGURE_OPTIONS
../configure $EVENT_CONFIGURE_OPTIONS
echo [configure]: ../configure
../configure
make V=1
- name: Test

View File

@ -13,17 +13,19 @@
# 1. BUILDING AND INSTALLATION
## Autoconf
```
$ ./configure
$ make
$ make verify # (optional)
$ sudo make install
```
See [Documentation/Building#Autoconf](/Documentation/Building.md#autoconf) for more information
## CMake (Unix)
```
$ mkdir build && cd build
$ cmake .. # Default to Unix Makefiles.
$ make
$ make verify # (optional)
```
See [Documentation/Building#Building on Unix (With CMake)](/Documentation/Building.md#building-on-unix-cmake) for more information
## CMake (Windows)
Install CMake: <https://www.cmake.org>
@ -36,17 +38,6 @@ $ cmake --build . --config Release # Or "start libevent.sln" and build with menu
See [Documentation/Building#Building on Windows](/Documentation/Building.md#building-on-windows) for more information
## CMake (Unix)
```
$ mkdir build && cd build
$ cmake .. # Default to Unix Makefiles.
$ make
$ make verify # (optional)
```
See [Documentation/Building#Building on Unix (With CMake)](/Documentation/Building.md#building-on-unix-cmake) for more information
## Package Managers
You can download and install libevent using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
@ -59,6 +50,17 @@ You can download and install libevent using the [vcpkg](https://github.com/Micro
The libevent port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
## Autoconf
*Note, since 2.2 it is deprecated*
```
$ ./configure
$ make
$ make verify # (optional)
$ sudo make install
```
# 2. USEFUL LINKS:
For the latest released version of Libevent, see the official website at