Skip to content

Fix: macOS x64 Mojave support #314

Fix: macOS x64 Mojave support

Fix: macOS x64 Mojave support #314

Workflow file for this run

name: tests
on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main
workflow_call:
workflow_dispatch:
jobs:
tests-windows:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download and extract vcpkg cache and unpackers
run: |
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest https://github.com/nzbgetcom/build-files/releases/download/v2.0/vcpkg-windows-tests.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/v2.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@v4
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 unrar 7zip
- name: Checkout
uses: actions/checkout@v4
- 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@v4
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 unrar 7zip
- name: Checkout
uses: actions/checkout@v4
- 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@v4
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@v4
- 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@v4
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@v4
- name: OpenBSD build and test
uses: cross-platform-actions/[email protected]
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@v4
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@v4
- name: FreeBSD build and test
uses: cross-platform-actions/[email protected]
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@v4
if: failure()
with:
name: nzbget-freebsd-test-log
path: build/Testing/Temporary/LastTest.log
retention-days: 5
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@v4
- name: Build
run: |
mkdir build
cd build
cmake .. -DDISABLE_PARCHECK=yes
cmake --build . --config Release -j 4
build-openbsd:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: OpenBSD build
uses: cross-platform-actions/[email protected]
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 nzbget --formula --head --verbose