[MAINT] Add fixes for CI configuration based on latest dev (#3232)

* [MAINT] Add fixes for CI configuration based on latest dev

* Added fixes from another PR

* Added lacking scripts and repos

* Fixed error reported in CI. Fixed ABI entry

---------

Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
This commit is contained in:
Sektor van Skijlen
2025-10-15 13:23:41 +02:00
committed by GitHub
parent bab403744b
commit 5c5f5b5f3a
17 changed files with 402 additions and 106 deletions
+110 -29
View File
@@ -2,60 +2,141 @@ name: ABI checks
on:
push:
branches: [ master ]
branches: [ "master", "dev" ]
pull_request:
branches: [ master ]
branches: [ "master", "dev" ]
env:
SRT_BASE: v1.5.0
jobs:
build:
name: ABI checks
build_pr:
name: Build current version
runs-on: ubuntu-latest
outputs:
base_version: ${{ steps.build.outputs.SRT_BASE }}
tag_version: ${{ steps.build.outputs.SRT_TAG_VERSION }}
steps:
- uses: actions/checkout@v3
with:
path: pull_request
- name: configure
path: gitview_pr
- id: configure
name: Configure (cmake)
run: |
cd pull_request
cd gitview_pr
mkdir _build && cd _build
cmake -DCMAKE_BUILD_TYPE=Debug ../
- name: build
- id: build
name: Build and dump
run: |
sudo apt install -y abi-dumper
cd pull_request/_build && cmake --build ./
sudo apt install -y tcl
cd gitview_pr/_build && cmake --build ./
make install DESTDIR=./installdir
SRT_TAG_VERSION=$(cat version.h |grep SRT_VERSION_MINOR |head -n1 |awk {'print $3'})
abi-dumper libsrt.so -o libsrt-pr.dump -public-headers installdir/usr/local/include/srt/ -lver 0
SRT_BASE="v1.$SRT_TAG_VERSION.0"
echo "SRT_BASE=$SRT_BASE" >> "$GITHUB_ENV"
SRT_TAG_VERSION=v$(../scripts/get-build-version.tcl full)
echo "SRT_TAG_VERSION=$SRT_TAG_VERSION" >> "$GITHUB_OUTPUT"
SRT_TAG=${SRT_TAG_VERSION}dev-$(git rev-parse --short HEAD)
echo "TAGGING PR BUILD: $SRT_TAG"
abi-dumper libsrt.so -o libsrt-pr.dump -public-headers installdir/usr/local/include/srt/ -lver $SRT_TAG
ls -ld libsrt-pr.dump
sha256sum libsrt-pr.dump
SRT_BASE=v$(../scripts/get-build-version.tcl base)
if [[ $SRT_TAG_VERSION == $SRT_BASE ]]; then
echo "NOT CHECKING ABI: base version is being built: $SRT_TAG (not emitting SRT_BASE)"
#echo "SRT_BASE=''" >> "$GITHUB_OUTPUT"
else
echo "WILL CHECK ABI changes $SRT_BASE - $SRT_TAG_VERSION"
echo "SRT_BASE=$SRT_BASE" >> "$GITHUB_OUTPUT"
fi
- id: upload_pr_dump
uses: actions/upload-artifact@v4
with:
name: abidump_pr
path: gitview_pr/_build/libsrt-pr.dump
build_base:
name: Build base version
runs-on: ubuntu-latest
needs: build_pr
if: ${{ needs.build_pr.outputs.base_version != '' }}
env:
SRT_BASE: ${{ needs.build_pr.outputs.base_version }}
SRT_TAG_VERSION: ${{ needs.build_pr.outputs.tag_version }}
steps:
- uses: actions/checkout@v3
with:
path: tag
path: gitview_base
ref: ${{ env.SRT_BASE }}
- name: configure_tag
- id: configure_tag
name: Configure (cmake)
run: |
echo $SRT_TAG_VERSION
cd tag
echo "TAG:$SRT_TAG_VERSION BASE:$SRT_BASE"
#This is currently a paranoid check - the if should do the job
if [[ -z $SRT_BASE ]]; then
echo "NO BASE DEFINED. NOT BUILDING"
exit 1
fi
cd gitview_base
mkdir _build && cd _build
cmake -DCMAKE_BUILD_TYPE=Debug ../
- name: build_tag
- id: build_tag
name: Build and dump
if: ${{ success() }}
run: |
cd tag
sudo apt install -y abi-dumper
sudo apt install -y tcl
cd gitview_base
cd _build && cmake --build ./
make install DESTDIR=./installdir
abi-dumper libsrt.so -o libsrt-tag.dump -public-headers installdir/usr/local/include/srt/ -lver 1
echo "TAGGING BASE BUILD: $SRT_BASE"
abi-dumper libsrt.so -o libsrt-base.dump -public-headers installdir/usr/local/include/srt/ -lver $SRT_BASE
ls -ld libsrt-base.dump
sha256sum libsrt-base.dump
- id: upload_base_dump
uses: actions/upload-artifact@v4
with:
name: abidump_base
path: gitview_base/_build/libsrt-base.dump
check_abi:
name: Compare ABI
runs-on: ubuntu-latest
needs: [build_pr, build_base]
env:
SRT_BASE: ${{ needs.build_pr.outputs.base_version }}
steps:
- name: Download base dump
uses: actions/download-artifact@v4
with:
name: abidump_base
path: .
- name: Download pr dump
uses: actions/download-artifact@v4
with:
name: abidump_pr
path: .
- name: abi-check
run: |
git clone https://github.com/lvc/abi-compliance-checker.git
cd abi-compliance-checker && sudo make install && cd ../
abi-compliance-checker -l libsrt -old tag/_build/libsrt-tag.dump -new pull_request/_build/libsrt-pr.dump
RES=$?
if (( $RES != 0 ))
then
echo "ABI/API Compatibility check failed with value $?"
exit $RES
fi
git clone https://github.com/lvc/abi-compliance-checker.git
#cd gitview_pr/submodules
#git submodule update --init abi-compliance-checker
cd abi-compliance-checker && sudo make install && cd ../
#cd ../..
echo "FILESYSTEM state before running abi-check at $PWD"
ls -l
sha256sum libsrt-base.dump
sha256sum libsrt-pr.dump
abi-compliance-checker -l libsrt -old libsrt-base.dump -new libsrt-pr.dump
RES=$?
if (( $RES != 0 )); then
echo "ABI/API Compatibility check failed with value $?"
exit $RES
fi
- name: Download report
uses: actions/download-artifact@v4
with:
path: compat_reports
+2 -2
View File
@@ -2,9 +2,9 @@ name: Android
on:
push:
branches: [ master ]
branches: [ "master", "dev" ]
pull_request:
branches: [ master ]
branches: [ "master", "dev" ]
jobs:
build:
+2 -2
View File
@@ -2,9 +2,9 @@ name: "CodeQL"
on:
push:
branches: [ "master", "experimental/socket-groups" ]
branches: [ "master", "dev" ]
pull_request:
branches: [ "master" ]
branches: [ "master", "dev" ]
jobs:
analyze:
+29
View File
@@ -0,0 +1,29 @@
name: C++03 (old compat)
on:
push:
branches: [ "master", "dev" ]
pull_request:
branches: [ "master", "dev" ]
types: [opened, synchronize, reopened]
jobs:
build:
name: ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: configure
run: |
mkdir _build && cd _build
cmake ../ -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DENABLE_STDCXX_SYNC=OFF -DUSE_CXX_STD=c++03 -DENABLE_ENCRYPTION=ON -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON -DENABLE_TESTING=ON -DENABLE_EXAMPLES=ON -DENABLE_CODE_COVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: build
# That below is likely SonarQube remains, which was removed earlier.
#run: cd _build && build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build .
run: cd _build && cmake --build .
- name: test
run: |
cd _build && ctest --extra-verbose
- name: codecov
run: |
source ./scripts/collect-gcov.sh
bash <(curl -s https://codecov.io/bash)
+10 -6
View File
@@ -1,10 +1,10 @@
name: cxx11
name: C++11
on:
push:
branches: [ master ]
branches: [ "master", "dev" ]
pull_request:
branches: [ master ]
branches: [ "master", "dev" ]
jobs:
build:
@@ -14,13 +14,17 @@ jobs:
steps:
- name: GoogleTest
run: |
curl -o googletest.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/23e7fb4dc0cc73facc3772815741e1deb87d6406/Formula/googletest.rb
brew install -s googletest.rb
brew tap-new Haivision/gt-local
brew extract --version=1.12.1 --force googletest Haivision/gt-local
brew install googletest@1.12.1
# NOTE: 1.12.1 is the last version that requires C++11; might need update later
# curl -o googletest.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/23e7fb4dc0cc73facc3772815741e1deb87d6406/Formula/googletest.rb
# brew install -s googletest.rb
- uses: actions/checkout@v3
- name: configure
run: |
mkdir _build && cd _build
cmake ../ -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DENABLE_STDCXX_SYNC=ON -DENABLE_ENCRYPTION=OFF -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON -DUSE_CXX_STD=14
cmake ../ -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DENABLE_STDCXX_SYNC=ON -DENABLE_ENCRYPTION=OFF -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON -DUSE_CXX_STD=17
- name: build
run: cd _build && cmake --build ./
- name: test
+3 -3
View File
@@ -1,10 +1,10 @@
name: cxx11
name: C++11
on:
push:
branches: [ master ]
branches: [ "master", "dev" ]
pull_request:
branches: [ master ]
branches: [ "master", "dev" ]
types: [opened, synchronize, reopened]
jobs:
build:
+4 -4
View File
@@ -1,10 +1,10 @@
name: cxx11
name: C++11
on:
push:
branches: [ master ]
branches: [ "master", "dev" ]
pull_request:
branches: [ master ]
branches: [ "master", "dev" ]
jobs:
build:
@@ -17,7 +17,7 @@ jobs:
- name: configure
run: |
md _build && cd _build
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_ENCRYPTION=OFF -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON -DUSE_CXX_STD=c++11
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_ENCRYPTION=OFF -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON -DENABLE_LOCALIF_WIN32=ON -DUSE_CXX_STD=c++11
- name: build
run: cd _build && cmake --build ./ --config Release --verbose
- name: test
+7 -3
View File
@@ -2,9 +2,9 @@ name: iOS
on:
push:
branches: [ master ]
branches: [ "master", "dev" ]
pull_request:
branches: [ master ]
branches: [ "master", "dev" ]
jobs:
build:
@@ -17,9 +17,13 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install dependency packages
run: |
brew install make llvm
- name: configure
run: |
mkdir _build && cd _build
cmake ../ -DENABLE_ENCRYPTION=OFF -DENABLE_STDCXX_SYNC=${{matrix.cxxstdsync}} -DENABLE_UNITTESTS=OFF -DENABLE_BONDING=ON --toolchain scripts/iOS.cmake
export PATH="/opt/homebrew/opt/llvm/bin:$PATH" CC=clang CXX=clang++
cmake .. -DCMAKE_MAKE_PROGRAM=gmake -DENABLE_ENCRYPTION=OFF -DENABLE_STDCXX_SYNC=${{matrix.cxxstdsync}} -DENABLE_MONOTONIC_CLOCK=OFF -DENABLE_UNITTESTS=OFF -DUSE_CXX_STD=c++11 -DENABLE_BONDING=ON --toolchain scripts/iOS.cmake
- name: build
run: cd _build && cmake --build ./
+2 -2
View File
@@ -2,9 +2,9 @@ name: QEMU to run s390x-focal
on:
push:
branches: [ master ]
branches: [ "master", "dev" ]
pull_request:
branches: [ master ]
branches: [ "master", "dev" ]
jobs:
Tests:
+3
View File
@@ -0,0 +1,3 @@
[submodule "submodules/abi-compliance-checker"]
path = submodules/abi-compliance-checker
url = https://github.com/lvc/abi-compliance-checker.git
+78 -38
View File
@@ -1,3 +1,10 @@
# TRAVIS Configuration file
#
# XXX MIND SYNTAX TRICKS:
# - Keep column consistency
# - TAB characters NOT ALLOWED anywhere
# - COLON characters (in freestanding strings) not allowed in the script
language: cpp
dist: xenial
@@ -16,27 +23,27 @@ addons:
packages:
- openssl
matrix:
jobs:
include:
- os: linux
env:
- BUILD_TYPE=Debug
- BUILD_OPTS='-DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
- BUILD_TYPE=Debug CFG="monotonic openssl werror"
- CMAKE_OPTS='-DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
- env:
- BUILD_TYPE=Debug
- BUILD_OPTS='-DENABLE_LOGGING=OFF -DUSE_ENCLIB=mbedtls -DENABLE_MONOTONIC_CLOCK=ON -DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
- BUILD_TYPE=Debug CFG="nologging mbedtls monotonic werror"
- CMAKE_OPTS='-DENABLE_LOGGING=OFF -DUSE_ENCLIB=mbedtls -DENABLE_MONOTONIC_CLOCK=ON -DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
- os: linux
env: BUILD_TYPE=Release
- os: osx
osx_image: xcode11.1
env:
- BUILD_TYPE=Debug
- BUILD_OPTS='-DCMAKE_CXX_FLAGS="-Werror"'
- os: osx
osx_image: xcode11.1
env:
- BUILD_TYPE=Release
- BUILD_OPTS='-DCMAKE_CXX_FLAGS="-Werror"'
env: BUILD_TYPE=Release CFG=default
# - os: osx
# osx_image: xcode11.1
# env:
# - BUILD_TYPE=Debug CFG=werror
# - CMAKE_OPTS='-DCMAKE_CXX_FLAGS="-Werror"'
# - os: osx
# osx_image: xcode11.1
# env:
# - BUILD_TYPE=Release CFG=werror
# - CMAKE_OPTS='-DCMAKE_CXX_FLAGS="-Werror"'
- os: linux
compiler: x86_64-w64-mingw32-g++
addons:
@@ -53,37 +60,70 @@ matrix:
- ./Configure --cross-compile-prefix=x86_64-w64-mingw32- mingw64
- make
- cd ..
env: BUILD_TYPE=Release
env: BUILD_TYPE=Release CFG=no-UT
# Power jobs
# Forcing Focal distro because Xenial
# has somehow outdated CMake
- os: linux
arch: ppc64le
dist: focal
env:
- BUILD_TYPE=Debug
- ARCH=PowerPC BUILD_TYPE=Debug
- arch: ppc64le
dist: focal
env:
- BUILD_TYPE=Release
- BUILD_OPTS='-DENABLE_MONOTONIC_CLOCK=ON'
- ARCH=PowerPC BUILD_TYPE=Release CFG=monotonic
- CMAKE_OPTS='-DENABLE_MONOTONIC_CLOCK=ON'
script:
- CMAKE_VERSION=$(cmake --version | head -1 | awk '{print $3}')
- echo CMAKE version $CMAKE_VERSION
- CMAKE_VERSION_OK=$(echo "puts [package vcompare $CMAKE_VERSION 3.10]" | tclsh);
- if [ "$CMAKE_VERSION_OK" == "-1" ]; then
echo "ERROR - cmake version too old, >=3.10 required";
exit 1;
fi;
- export REQUIRE_UNITTESTS=1
- if [ "$TRAVIS_COMPILER" == "x86_64-w64-mingw32-g++" ]; then
CMAKE_OPTS+=" -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc";
CMAKE_OPTS+=" -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++";
CMAKE_OPTS+=" -DENABLE_STDCXX_SYNC=OFF -DENABLE_LOCALIF_WIN32=OFF -DENABLE_UNITTESTS=OFF -DUSE_OPENSSL_PC=OFF";
CMAKE_OPTS+=" -DOPENSSL_ROOT_DIR=$PWD/openssl";
CMAKE_OPTS+=" -DOPENSSL_CRYPTO_LIBRARY=$PWD/openssl/libcrypto-1_1-x64.dll";
CMAKE_OPTS+=" -DCMAKE_SYSTEM_NAME=Windows";
REQUIRE_UNITTESTS=0;
fi;
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
export PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig";
fi;
if (( $REQUIRE_UNITTESTS )); then
CMAKE_OPTS+=" -DENABLE_UNITTESTS=ON";
fi;
- echo COMPILER $TRAVIS_COMPILER
- echo SYSTEM $TRAVIS_OS_NAME
- echo BUILD_TYPE $BUILD_TYPE
- echo BUILD_OPTS $BUILD_OPTS
- if [ "$TRAVIS_COMPILER" == "x86_64-w64-mingw32-g++" ]; then
export CC="x86_64-w64-mingw32-gcc";
export CXX="x86_64-w64-mingw32-g++";
cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_OPTS -DENABLE_UNITTESTS="OFF" -DUSE_OPENSSL_PC="OFF" -DOPENSSL_ROOT_DIR="$PWD/openssl" -DCMAKE_SYSTEM_NAME="Windows";
elif [ "$TRAVIS_OS_NAME" == "linux" ]; then
cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_OPTS -DENABLE_UNITTESTS="ON";
elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
export PKG_CONFIG_PATH=$(brew --prefix openssl)"/lib/pkgconfig";
cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_OPTS -DENABLE_UNITTESTS="ON";
fi
- make -j$(nproc);
- if [ "$TRAVIS_COMPILER" != "x86_64-w64-mingw32-g++" ]; then
- echo CMAKE_OPTS $CMAKE_OPTS
- export SUCCESS=0
- cmake . --debug-output -DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_OPTS 2>&1 || SUCCESS=$?;
- if (($SUCCESS == 0)); then
echo "Configure OK";
else
echo "-- OUTPUT --";
cat CMakeFiles/CMakeOutput.log || echo "NO OUTPUT";
echo "-- ERRORS --";
cat CMakeFiles/CMakeError.log || echo "NO LOGS";
exit 1;
fi;
- make VERBOSE=1 -j$(nproc);
- if (( $REQUIRE_UNITTESTS )); then
ulimit -c unlimited;
./test-srt -disable-ipv6;
SUCCESS=$?;
if [ -f core ]; then gdb -batch ./test-srt -c core -ex bt -ex "info thread" -ex quit; else echo "NO CORE - NO CRY!"; fi;
test $SUCCESS == 0;
fi
if [ ! -f ./test-srt ]; then
echo "ERROR - UT application not found";
false;
else
./test-srt -disable-ipv6;
SUCCESS=$?;
if [ -f core ]; then gdb -batch ./test-srt -c core -ex bt -ex "info thread" -ex quit; else echo "NO CORE - NO CRY!"; fi;
test $SUCCESS == 0;
fi;
fi;
+76
View File
@@ -0,0 +1,76 @@
#!/usr/bin/tclsh
set here [file dirname $argv0] ;# points to [git top]/scripts
set top [file normalize $here/..]
set abichecker [file normalize [file join $top submodules abi-compliance-checker abi-compliance-checker.pl]]
if { ![file exists $abichecker] } {
puts stderr "Please update submodules first (compliance checker not found in the current view)"
exit 1
}
# Check if abi-dumper is installed
set abidumper [auto_execok abi-dumper]
if {$abidumper == ""} {
set installer ""
foreach ii {zypper dnf apt} {
if {[auto_execok $ii] != ""} {
set installer $ii
break
}
}
if {$installer != ""} {
puts stderr "ABI dumper not installed. Use such commands to install\n"
puts stderr " $installer install abi-dumper"
} else {
puts stderr "ABI dumper not installed. Find out how to install abi-dumper in your system."
}
exit 1
}
# Arguments:
# <abi-check> [directory-with-base] [directory-with-pr]
# NOTE: ABI dump will be done in every build directory as specified.
proc generate-abi-dump {directory lver} {
set wd [pwd]
cd $directory
global top
# You should have libsrt.so in this directory.
# Use [glob] to use exception if no file exists
glob libsrt.so
exec >@stdout 2>@stderr abi-dumper libsrt.so -o libsrt-abi.dump -public-headers $top/srtcore -lver $lver
cd $wd
}
set olddir [lindex $argv 0]
set newdir [lindex $argv 1]
if {![file isdirectory $olddir] || ![file isdirectory $newdir]} {
puts stderr "Wrong arguments. Required <old> <new> build directory"
exit 1
}
set wd [pwd]
cd $olddir
set base_ver [exec $top/scripts/get-build-version.tcl]
cd $wd
cd $newdir
set new_ver [exec $top/scripts/get-build-version.tcl]
cd $wd
generate-abi-dump $olddir $base_ver
generate-abi-dump $newdir $new_ver
set res [catch {exec >@stdout 2>@stderr $abichecker -l libsrt -old $olddir/libsrt-abi.dump -new $newdir/libsrt-abi.dump} out]
if {$res} {
puts stderr "ABI compat problems found!!!\nSee the HTML report"
}
+19 -5
View File
@@ -49,11 +49,25 @@ if ( $Env:APPVEYOR ) {
$CONFIGURATION = $Env:CONFIGURATION
#appveyor has many openssl installations - place the latest one in the default location unless VS2013
Remove-Item -Path "C:\OpenSSL-Win32" -Recurse -Force -ErrorAction SilentlyContinue | Out-Null
Remove-Item -Path "C:\OpenSSL-Win64" -Recurse -Force -ErrorAction SilentlyContinue | Out-Null
Copy-Item -Path "C:\OpenSSL-v111-Win32" "C:\OpenSSL-Win32" -Recurse | Out-Null
Copy-Item -Path "C:\OpenSSL-v111-Win64" "C:\OpenSSL-Win64" -Recurse | Out-Null
# See https://www.appveyor.com/docs/windows-images-software/#visual-studio-2022
# According to AppVeyor environment definition:
#
# 2013 - 2017: C:\OpenSSL-Win*: v1.0.2p, C:\OpenSSL-v111-Win*: v1.1.1 (v1.1.1d for 2015+)
# 2019 - 2022: C:\OpenSSL-Win*: v1.1.1w and C:\OpenSSL-v3* with version 3+
# SO:
# For 2013 - 2017: Delete C:\OpenSSL-Win* and replace it with contents of C:\OpenSSL-v111-Win*
# For 2019 - 2022: Do nothing.
# Note: No guarantee that C:\OpenSSL-Win* directories will always contain version v1.1.1+ in
# any future versions for AppVeyor Windows environment, but then probably the SRT project
# would have to be adjusted to this version anyway.
if ($VS_VERSION -lt 2019) {
#appveyor has many openssl installations - place the latest one in the default location unless VS2013
Remove-Item -Path "C:\OpenSSL-Win32" -Recurse -Force -ErrorAction SilentlyContinue | Out-Null
Remove-Item -Path "C:\OpenSSL-Win64" -Recurse -Force -ErrorAction SilentlyContinue | Out-Null
Copy-Item -Path "C:\OpenSSL-v111-Win32" "C:\OpenSSL-Win32" -Recurse | Out-Null
Copy-Item -Path "C:\OpenSSL-v111-Win64" "C:\OpenSSL-Win64" -Recurse | Out-Null
}
}
# persist VS_VERSION so it can be used in an artifact name later
+47
View File
@@ -0,0 +1,47 @@
#!/usr/bin/tclsh
if {![file exists version.h]} {
puts stderr "No version.h file found - run this in the build directory!"
exit 1
}
set fd [open version.h r]
set version ""
set line ""
while {[gets $fd line] != -1} {
# Use regexp because this is safer to avoid
# unexpected list interpretation mistakes
if {[regexp {#define SRT_VERSION_STRING} $line]} {
# Once matched this way, we can safely use tcl-list-like access
set version [lindex $line 2 0]
break
}
}
close $fd
if {$version == ""} {
puts stderr "No version extracted (no SRT_VERSION_STRING found)"
exit 1
}
lassign $argv model part
if {$model == ""} {
set model current
}
lassign [split $version .] major minor patch
if {$part == "minor"} {
set prefix "$minor"
} else {
set prefix "$major.$minor"
}
if {$model == "base"} {
puts "$prefix.0"
} else {
puts "$prefix.$patch"
}
+2 -2
View File
@@ -1,7 +1,7 @@
# code copied from https://crascit.com/2015/07/25/cmake-gtest/
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
project(googletest-download NONE)
project(GOOGLETEST_DOWNLOAD)
include(ExternalProject)
+7 -10
View File
@@ -828,17 +828,14 @@ struct CallbackHolder
// Test if the pointer is a pointer to function. Don't let
// other type of pointers here.
#if HAVE_CXX11
// NOTE: No poor-man's replacement can be done for C++03 because it's
// not possible to fake calling a function without calling it and no
// other operation can be done without extensive transformations on
// the Signature type, still in C++03 possible only on functions up to
// 2 arguments (callbacks in SRT usually have more).
static_assert(std::is_function<Signature>::value, "CallbackHolder is for functions only!");
#else
// This is a poor-man's replacement, which should in most compilers
// generate a warning, if `Signature` resolves to a value type.
// This would make an illegal pointer cast from a value to a function type.
// Casting function-to-function, however, should not. Unfortunately
// newer compilers disallow that, too (when a signature differs), but
// then they should better use the C++11 way, much more reliable and safer.
void* (*testfn)(void*) = (void*(*)(void*))f;
(void)(testfn);
#endif
opaque = o;
fn = f;
}
@@ -1111,7 +1108,7 @@ struct MapProxy
{
typename std::map<KeyType, ValueType>::const_iterator p = find();
if (p == mp.end())
return "";
return ValueType();
return p->second;
}