Add DupeArticleFallback: recover missing articles from duplicate releases #1055
Workflow file for this run
This file contains hidden or 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: tests | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| pull_request: | |
| branches: | |
| - develop | |
| - main | |
| workflow_call: | |
| workflow_dispatch: | |
| jobs: | |
| tests-windows: | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Download and extract vcpkg cache and unpackers | |
| run: | | |
| $ProgressPreference = "SilentlyContinue" | |
| Invoke-WebRequest https://github.com/nzbgetcom/build-files/releases/download/v5.0/vcpkg-windows-x64.zip -OutFile "${{ github.workspace }}\vcpkg.zip" | |
| Expand-Archive -Path "${{ github.workspace }}\vcpkg.zip" -DestinationPath "${{ github.workspace }}" | |
| Invoke-WebRequest https://github.com/nzbgetcom/build-files/releases/download/v10.0/nzbget-windows-tools.zip -OutFile "${{ github.workspace }}\tools.zip" | |
| Expand-Archive -Path "${{ github.workspace }}\tools.zip" -DestinationPath C:\ | |
| Copy-Item "C:\nzbget\image\64\unrar.exe" -Destination "C:\Windows\System32" | |
| Copy-Item "C:\nzbget\image\64\7za.exe" -Destination "C:\Windows\System32\7z.exe" | |
| - name: Build | |
| run: | | |
| New-Item build -ItemType Directory -Force | Out-Null | |
| cd build | |
| cmake .. -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DBUILD_ONLY_TESTS=ON | |
| cmake --build . --config Release -j 4 | |
| - name: Test | |
| run: | | |
| cd build | |
| ctest -C Release | |
| - name: Upload test artifacts | |
| uses: actions/upload-artifact@v7 | |
| if: failure() | |
| with: | |
| name: nzbget-windows-test-log | |
| path: build/Testing/Temporary/LastTest.log | |
| retention-days: 5 | |
| tests-linux: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Prepare environment | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake libxml2-dev libssl-dev libncurses-dev libboost-all-dev python3-cryptography unrar 7zip | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Build | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -DBUILD_ONLY_TESTS=ON | |
| cmake --build . --config Release -j 4 | |
| - name: Test | |
| run: | | |
| cd build | |
| ctest -C Release | |
| - name: Upload test artifacts | |
| uses: actions/upload-artifact@v7 | |
| if: failure() | |
| with: | |
| name: nzbget-linux-test-log | |
| path: build/Testing/Temporary/LastTest.log | |
| retention-days: 5 | |
| tests-linux-disabled-parcheck: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Prepare environment | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake libxml2-dev libssl-dev libncurses-dev libboost-all-dev python3-cryptography unrar 7zip | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Build | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -DBUILD_ONLY_TESTS=ON -DDISABLE_PARCHECK=yes | |
| cmake --build . --config Release -j 4 | |
| - name: Test | |
| run: | | |
| cd build | |
| ctest -C Release | |
| - name: Upload test artifacts | |
| uses: actions/upload-artifact@v7 | |
| if: failure() | |
| with: | |
| name: nzbget-linux-test-log | |
| path: build/Testing/Temporary/LastTest.log | |
| retention-days: 5 | |
| tests-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| brew install --formula boost sevenzip | |
| brew install --cask rar | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Build | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -DBUILD_ONLY_TESTS=ON | |
| cmake --build . --config Release -j 4 | |
| - name: Test | |
| run: | | |
| cd build | |
| ctest -C Release | |
| - name: Upload test artifacts | |
| uses: actions/upload-artifact@v7 | |
| if: failure() | |
| with: | |
| name: nzbget-linux-test-log | |
| path: build/Testing/Temporary/LastTest.log | |
| retention-days: 5 | |
| tests-openbsd: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: OpenBSD build and test | |
| uses: cross-platform-actions/action@v0.28.0 | |
| with: | |
| operating_system: openbsd | |
| version: '7.7' | |
| run: | | |
| sudo pkg_add git cmake libxml boost unrar p7zip | |
| mkdir build | |
| cd build | |
| cmake .. -DBUILD_ONLY_TESTS=ON -DCURSES_INCLUDE_PATH=/usr/include | |
| cmake --build . --config Release -j 4 | |
| ctest -C Release --repeat until-pass:5 | |
| - name: Upload test artifacts | |
| uses: actions/upload-artifact@v7 | |
| if: failure() | |
| with: | |
| name: nzbget-openbsd-test-log | |
| path: build/Testing/Temporary/LastTest.log | |
| retention-days: 5 | |
| tests-freebsd: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: FreeBSD build and test | |
| uses: cross-platform-actions/action@v0.27.0 | |
| with: | |
| operating_system: freebsd | |
| version: '14.2' | |
| run: | | |
| sudo pkg install -y git cmake libxml2 boost-all unrar 7-zip | |
| mkdir build | |
| cd build | |
| cmake .. -DBUILD_ONLY_TESTS=ON -DCURSES_INCLUDE_PATH=/usr/include | |
| cmake --build . --config Release -j 4 | |
| ctest -C Release | |
| - name: Upload test artifacts | |
| uses: actions/upload-artifact@v7 | |
| if: failure() | |
| with: | |
| name: nzbget-freebsd-test-log | |
| path: build/Testing/Temporary/LastTest.log | |
| retention-days: 5 | |
| cppcheck: | |
| runs-on: ubuntu-24.04 | |
| continue-on-error: true | |
| steps: | |
| - name: Prepare environment | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake libxml2-dev libssl-dev libncurses-dev libboost-all-dev cppcheck | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: cppcheck | |
| run: | | |
| mkdir build && cd build | |
| cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. | |
| cppcheck --error-exitcode=1 \ | |
| --project=compile_commands.json \ | |
| --enable=all \ | |
| --inline-suppr \ | |
| --check-level=exhaustive \ | |
| --suppress=missingIncludeSystem \ | |
| --suppress=unknownMacro:tests/ \ | |
| --suppress=preprocessorErrorDirective:build/par2-turbo/ \ | |
| -itests \ | |
| -ibuild/rapidyenc \ | |
| -ibuild/boost \ | |
| -ibuild/par2-turbo | |
| build-disabled-parcheck: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Prepare environment | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake libxml2-dev libssl-dev libncurses-dev libboost-all-dev | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Build | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -DDISABLE_PARCHECK=yes | |
| cmake --build . --config Release -j 4 | |
| build-disabled-pch: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Prepare environment | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake libxml2-dev libssl-dev libncurses-dev libboost-all-dev | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Build | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -DCMAKE_DISABLE_PRECOMPILE_HEADERS=yes | |
| cmake --build . --config Release -j 4 | |
| build-openbsd: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: OpenBSD build | |
| uses: cross-platform-actions/action@v0.28.0 | |
| with: | |
| operating_system: openbsd | |
| version: '7.7' | |
| run: | | |
| sudo pkg_add git cmake libxml boost | |
| mkdir build | |
| cd build | |
| cmake .. -DCURSES_INCLUDE_PATH=/usr/include | |
| cmake --build . --config Release -j 4 | |
| build-macos-brew-head: | |
| runs-on: macos-latest | |
| if: github.ref_name == 'develop' | |
| steps: | |
| - name: Build | |
| run: | | |
| brew install --formula boost sevenzip | |
| brew install nzbget --formula --head --verbose | |
| functional-dupefallback-smoke: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Prepare environment | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake libxml2-dev libssl-dev libncurses-dev libboost-all-dev python3-cryptography unrar 7zip | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Build daemon | |
| run: | | |
| cmake -S . -B build-functional -DCMAKE_BUILD_TYPE=Release | |
| cmake --build build-functional -j 4 | |
| - name: Run representative fallback scenarios | |
| run: | | |
| for scenario in complementary leadswitch stream repost xdecomp_zip xdecomp_symlink; do | |
| python3 tests/functional/dupefallback/harness.py \ | |
| --nzbget build-functional/nzbget --target local --scenario "$scenario" | |
| done |