Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/actions/cryptopp/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ runs:
steps:

- id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ runner.os }}-cryptopp-${{ inputs.version }}-${{ inputs.architecture }}-${{ inputs.runtime }}-${{ inputs.toolset }}
path: |
Expand Down Expand Up @@ -71,10 +71,10 @@ runs:
- name: Build
if: steps.cache.outputs.cache-hit != 'true'
run: |
msbuild cryptlib.vcxproj /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }} /p:PlatformToolset=${{ inputs.toolset }}
msbuild cryptdll.vcxproj /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }} /p:PlatformToolset=${{ inputs.toolset }}
msbuild cryptlib.vcxproj /p:Configuration=Debug /p:Platform=${{ steps.setup.outputs.platform }} /p:PlatformToolset=${{ inputs.toolset }}
msbuild cryptdll.vcxproj /p:Configuration=Debug /p:Platform=${{ steps.setup.outputs.platform }} /p:PlatformToolset=${{ inputs.toolset }}
msbuild cryptlib.vcxproj /m /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }} /p:PlatformToolset=${{ inputs.toolset }}
msbuild cryptdll.vcxproj /m /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }} /p:PlatformToolset=${{ inputs.toolset }}
msbuild cryptlib.vcxproj /m /p:Configuration=Debug /p:Platform=${{ steps.setup.outputs.platform }} /p:PlatformToolset=${{ inputs.toolset }}
msbuild cryptdll.vcxproj /m /p:Configuration=Debug /p:Platform=${{ steps.setup.outputs.platform }} /p:PlatformToolset=${{ inputs.toolset }}
working-directory: tmp/cryptopp
shell: cmd

Expand Down
28 changes: 19 additions & 9 deletions .github/actions/google-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ outputs:
runs:
using: composite
steps:
- name: Clone Google Test
working-directory: tmp
shell: bash
run: |
git clone --depth 1 --branch release-${{ inputs.version }} https://github.com/google/googletest.git
- id: setup
run: |
if ("${{ inputs.architecture }}" -eq "x64") {
Expand All @@ -45,20 +40,35 @@ runs:
} else {
echo "shared_libs=FALSE" >> $env:GITHUB_OUTPUT
}


shell: pwsh
- name: Build Google Test

- id: cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-googletest-${{ inputs.version }}-${{ inputs.architecture }}-${{ inputs.runtime }}-${{ inputs.toolset }}
path: |
tmp/googletest/install

- name: Clone Google Test
if: steps.cache.outputs.cache-hit != 'true'
working-directory: tmp
shell: bash
run: |
git clone --depth 1 --branch release-${{ inputs.version }} https://github.com/google/googletest.git

- name: Configure Google Test
if: steps.cache.outputs.cache-hit != 'true'
working-directory: tmp/googletest
shell: cmd
run: |
cmake -S . -G "Visual Studio 17" -B build -DCMAKE_INSTALL_PREFIX=install -DBUILD_SHARED_LIBS=${{ steps.setup.outputs.shared_libs }} -T ${{ inputs.toolset }} -A ${{ steps.setup.outputs.platform }}

- name: Build Google Test
if: steps.cache.outputs.cache-hit != 'true'
working-directory: tmp/googletest
shell: cmd
run: |
msbuild build\INSTALL.vcxproj /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }}
msbuild build\INSTALL.vcxproj /m /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }}

- name: Copy Google Test dlls
if: ${{ steps.setup.outputs.shared_libs == 'TRUE' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/lua/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ runs:
using: composite
steps:
- id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ runner.os }}-lua-${{ inputs.version }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/openssl/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ runs:
shell: cmd

- id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ runner.os }}-openssl-${{ inputs.version }}-no-shared-${{ inputs.architecture }}-${{ inputs.runtime }}
path: |
Expand Down
10 changes: 5 additions & 5 deletions .github/actions/protobuf/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ runs:
shell: cmd

- id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ runner.os }}-protobuf-${{ inputs.version }}-${{ inputs.architecture }}-${{ inputs.runtime }}-${{ inputs.toolset }}
path: |
Expand Down Expand Up @@ -82,10 +82,10 @@ runs:

- name: Build
run: |
echo msbuild libprotobuf.vcxproj /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }} /p:PlatformToolset=${{ inputs.toolset }} ${{ steps.setup.outputs.vctools_version }} ${{ steps.setup.outputs.additional_options }}
msbuild libprotobuf.vcxproj /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }} /p:PlatformToolset=${{ inputs.toolset }} ${{ steps.setup.outputs.vctools_version }} ${{ steps.setup.outputs.additional_options }}
msbuild libprotoc.vcxproj /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }} /p:PlatformToolset=${{ inputs.toolset }} ${{ steps.setup.outputs.vctools_version }}
msbuild protoc.vcxproj /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }} /p:PlatformToolset=${{ inputs.toolset }} ${{ steps.setup.outputs.vctools_version }}
echo msbuild libprotobuf.vcxproj /m /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }} /p:PlatformToolset=${{ inputs.toolset }} ${{ steps.setup.outputs.vctools_version }} ${{ steps.setup.outputs.additional_options }}
msbuild libprotobuf.vcxproj /m /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }} /p:PlatformToolset=${{ inputs.toolset }} ${{ steps.setup.outputs.vctools_version }} ${{ steps.setup.outputs.additional_options }}
msbuild libprotoc.vcxproj /m /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }} /p:PlatformToolset=${{ inputs.toolset }} ${{ steps.setup.outputs.vctools_version }}
msbuild protoc.vcxproj /m /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }} /p:PlatformToolset=${{ inputs.toolset }} ${{ steps.setup.outputs.vctools_version }}
working-directory: tmp/protobuf-${{ inputs.version }}/build
shell: cmd
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
- name: Build nsclient
working-directory: tmp/nscp
run: |
make
make -j$(nproc)

- name: CPack
working-directory: tmp/nscp
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
- name: Build nsclient
working-directory: tmp/nscp
run: |
make
make -j$(nproc)

- name: CPack
working-directory: tmp/nscp
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/build-windows-legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ jobs:
with:
version: ${{ ENV.MINIZ_VERSION }}

- name: Cache Boost (static)
id: static_boost_cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-boost-legacy-${{ env.BOOST_VERSION }}-${{ inputs.architecture }}-static-runtime-static-msvc141-xp
path: |
${{ runner.workspace }}/static_boost

- name: Build Boost (static)
id: static_boost
uses: mickem/build-boost@42c59d10fc12f919a986f7e1c2f7c752d4960190
Expand Down Expand Up @@ -220,7 +228,7 @@ jobs:
- name: Build installer_lib
working-directory: tmp/installer_lib
run: |
msbuild installer_lib.sln /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }}
msbuild installer_lib.sln /m /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }}

- name: CMake (NSCP)
working-directory: tmp/nscp
Expand All @@ -230,7 +238,7 @@ jobs:
- name: Build nsclient
working-directory: tmp/nscp
run: |
msbuild NSCP.sln /p:Configuration=RelWithDebInfo /p:Platform=${{ steps.setup.outputs.platform }}
msbuild NSCP.sln /m /p:Configuration=RelWithDebInfo /p:Platform=${{ steps.setup.outputs.platform }}

- name: Run tests
working-directory: tmp/nscp
Expand All @@ -248,7 +256,7 @@ jobs:
- name: Build installer
working-directory: tmp/nscp
run: |
msbuild installers\installer-NSCP\installer_NSCP.vcxproj /p:Configuration=RelWithDebInfo /p:Platform=${{ steps.setup.outputs.platform }} /p:BuildProjectReferences=false
msbuild installers\installer-NSCP\installer_NSCP.vcxproj /m /p:Configuration=RelWithDebInfo /p:Platform=${{ steps.setup.outputs.platform }} /p:BuildProjectReferences=false

- name: Post process files
uses: ./.github/actions/post-process-windows-binaries
Expand Down
22 changes: 19 additions & 3 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,14 @@ jobs:
with:
version: ${{ ENV.MINIZ_VERSION }}

- name: Cache Boost (static)
id: static_boost_cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-boost-${{ env.BOOST_VERSION }}-${{ inputs.architecture }}-static-runtime-static-libs-system_filesystem-${{ steps.setup.outputs.toolset }}
path: |
${{ runner.workspace }}/static_boost

- name: Build Boost (static)
id: static_boost
uses: mickem/build-boost@v1
Expand All @@ -190,6 +198,14 @@ jobs:
static-runtime: 1
directory: ${{ runner.workspace }}/static_boost

- name: Cache Boost (regular)
id: boost_cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-boost-${{ env.BOOST_VERSION }}-${{ inputs.architecture }}-shared-runtime-shared-libs-full-${{ steps.setup.outputs.toolset }}
path: |
${{ runner.workspace }}/boost

- name: Build Boost (regular)
id: boost
uses: mickem/build-boost@v1
Expand Down Expand Up @@ -256,7 +272,7 @@ jobs:
- name: Build installer_lib
working-directory: tmp/installer_lib
run: |
msbuild installer_lib.sln /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }}
msbuild installer_lib.sln /m /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }}

- name: CMake (NSCP)
working-directory: tmp/nscp
Expand All @@ -266,7 +282,7 @@ jobs:
- name: Build nsclient
working-directory: tmp/nscp
run: |
msbuild NSCP.sln /p:Configuration=RelWithDebInfo /p:Platform=${{ steps.setup.outputs.platform }}
msbuild NSCP.sln /m /p:Configuration=RelWithDebInfo /p:Platform=${{ steps.setup.outputs.platform }}

- name: Run tests
if: inputs.architecture != 'arm64'
Expand All @@ -285,7 +301,7 @@ jobs:
- name: Build installer
working-directory: tmp/nscp
run: |
msbuild installers\installer-NSCP\installer_NSCP.vcxproj /p:Configuration=RelWithDebInfo /p:Platform=${{ steps.setup.outputs.platform }} /p:BuildProjectReferences=false
msbuild installers\installer-NSCP\installer_NSCP.vcxproj /m /p:Configuration=RelWithDebInfo /p:Platform=${{ steps.setup.outputs.platform }} /p:BuildProjectReferences=false

- name: Post process files
uses: ./.github/actions/post-process-windows-binaries
Expand Down
25 changes: 18 additions & 7 deletions .github/workflows/tests-sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,25 @@ jobs:

steps:
- name: Install dependencies
# archive.ubuntu.com periodically drops connections mid-fetch, which
# bricks CI for transient reasons. Configure apt to retry each package
# itself, and then wrap the whole step in a shell-level retry loop so a
# full mirror outage can be ridden out without re-running the workflow.
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
git curl unzip cmake build-essential python3-pip \
libboost-all-dev libgtest-dev libgmock-dev \
protobuf-compiler libprotobuf-dev \
openssl libssl-dev libcrypto++-dev \
liblua5.4-dev libdbus-1-dev
echo 'Acquire::Retries "5";' > /etc/apt/apt.conf.d/80-retries
echo 'Acquire::http::Timeout "30";' >> /etc/apt/apt.conf.d/80-retries
echo 'Acquire::https::Timeout "30";' >> /etc/apt/apt.conf.d/80-retries
for attempt in 1 2 3; do
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --fix-missing \
git curl unzip cmake build-essential python3-pip \
libboost-all-dev libgtest-dev libgmock-dev \
protobuf-compiler libprotobuf-dev \
openssl libssl-dev libcrypto++-dev \
liblua5.4-dev libdbus-1-dev && break
echo "apt attempt $attempt failed, retrying in 30s..."
sleep 30
done

- uses: actions/checkout@v6

Expand Down
Loading