Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
phnzb committed Nov 21, 2024
1 parent 323f2ce commit 1f2e21b
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 101 deletions.
48 changes: 0 additions & 48 deletions .github/workflows/posix-tests.yml

This file was deleted.

88 changes: 88 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: tests

on:
push:
branches:
- develop
- main
- feature/*
pull_request:
branches:
- develop
- main
workflow_call:
workflow_dispatch:

jobs:

windows-tests:
runs-on: windows-2022
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
VCPKG_DEFAULT_TRIPLET: "x64-windows-static"
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Setup vcpkg environment
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Setup vcpkg packages
run: |
vcpkg install openssl libxml2 zlib boost-json boost-asio boost-test
- name: Build
run: |
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=$VCPKG_DEFAULT_TRIPLET -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

linux-tests:
runs-on: ubuntu-24.04
steps:

- name: Prepare environment
run: |
sudo apt-get install cmake libxml2-dev libssl-dev libncurses-dev libboost-all-dev
- 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-windows-test-log
path: build/Testing/Temporary/LastTest.log
retention-days: 5
53 changes: 0 additions & 53 deletions .github/workflows/windows-tests.yml

This file was deleted.

0 comments on commit 1f2e21b

Please sign in to comment.