mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
Compare commits
3 Commits
build/deps
...
ci/homebre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6cf5e8a51c | ||
|
|
2acc57e8d6 | ||
|
|
3d731a21e6 |
63
.github/workflows/CI.yml
vendored
63
.github/workflows/CI.yml
vendored
@@ -535,12 +535,6 @@ jobs:
|
||||
rm '/usr/local/bin/python3.13-config'
|
||||
brew install python
|
||||
|
||||
- name: Setup python
|
||||
id: python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Configure formula
|
||||
run: |
|
||||
# variables for formula
|
||||
@@ -621,7 +615,7 @@ jobs:
|
||||
- name: Validate Homebrew Formula
|
||||
id: test
|
||||
if: matrix.release != true
|
||||
uses: LizardByte/homebrew-release-action@v2025.503.165455
|
||||
uses: LizardByte/homebrew-release-action@v2025.506.15440
|
||||
with:
|
||||
formula_file: ${{ github.workspace }}/homebrew/sunshine.rb
|
||||
git_email: ${{ secrets.GH_BOT_EMAIL }}
|
||||
@@ -630,29 +624,26 @@ jobs:
|
||||
token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
validate: true
|
||||
|
||||
- name: Generate gcov report
|
||||
id: test_report
|
||||
# any except canceled or skipped
|
||||
# TODO: fix coverage, no .gcno files are being created
|
||||
# TODO: .gcno files are supposed to be created next to .o files
|
||||
if: false
|
||||
# if: >-
|
||||
# always() &&
|
||||
# matrix.release != true &&
|
||||
# (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
|
||||
- name: Debug upload gcda artifact
|
||||
if: always() && matrix.release != true
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: homebrew-gcda-${{ matrix.os_name }}-${{ matrix.os_version }}
|
||||
path: ${{ steps.test.outputs.buildpath }}/build/tests/CMakeFiles/test_sunshine.dir/__/src/audio.cpp.gcda
|
||||
|
||||
- name: Debug homebrew buildpath
|
||||
if: always() && matrix.release != true
|
||||
run: |
|
||||
cp -rf ${{ steps.test.outputs.buildpath }}/build/ ./build/
|
||||
cd build
|
||||
# print the build path
|
||||
echo "Build path: ${{ steps.test.outputs.buildpath }}"
|
||||
echo "contents:"
|
||||
ls -Ra
|
||||
|
||||
${{ steps.python.outputs.python-path }} -m pip install gcovr
|
||||
${{ steps.python.outputs.python-path }} -m gcovr . -r ../src \
|
||||
--exclude-noncode-lines \
|
||||
--exclude-throw-branches \
|
||||
--exclude-unreachable-branches \
|
||||
--verbose \
|
||||
--xml-pretty \
|
||||
-o coverage.xml
|
||||
# print the test path
|
||||
echo "----"
|
||||
echo "Test path: ${{ steps.test.outputs.testpath }}"
|
||||
echo "contents:"
|
||||
ls -Ra
|
||||
|
||||
- name: Upload test results to Codecov
|
||||
# any except canceled or skipped
|
||||
@@ -673,18 +664,16 @@ jobs:
|
||||
|
||||
- name: Upload coverage
|
||||
# any except canceled or skipped
|
||||
# TODO: enable this once coverage report is fixed
|
||||
if: false
|
||||
# if: >-
|
||||
# always() &&
|
||||
# matrix.release != true &&
|
||||
# (steps.test_report.outcome == 'success') &&
|
||||
# startsWith(github.repository, 'LizardByte/')
|
||||
if: >-
|
||||
always() &&
|
||||
matrix.release != true &&
|
||||
(steps.test_report.outcome == 'success') &&
|
||||
startsWith(github.repository, 'LizardByte/')
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
disable_search: true
|
||||
fail_ci_if_error: true
|
||||
files: ./build/coverage.xml
|
||||
files: ${{ steps.test.outputs.testpath }}/build/coverage.xml
|
||||
flags: ${{ matrix.os_name }}-${{ matrix.os_version }} (Homebrew)
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
verbose: true
|
||||
@@ -992,7 +981,9 @@ jobs:
|
||||
- name: Generate gcov report
|
||||
id: test_report
|
||||
# any except canceled or skipped
|
||||
if: always() && (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
|
||||
if: >-
|
||||
always() &&
|
||||
(steps.test.outcome == 'success' || steps.test.outcome == 'failure')
|
||||
shell: msys2 {0}
|
||||
working-directory: build
|
||||
run: |
|
||||
|
||||
@@ -32,6 +32,7 @@ class @PROJECT_NAME@ < Formula
|
||||
depends_on "ninja" => :build
|
||||
depends_on "node" => :build
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on "gcovr" => :test
|
||||
depends_on "curl"
|
||||
depends_on "miniupnpc"
|
||||
depends_on "openssl"
|
||||
@@ -353,5 +354,21 @@ index 5b3638d..aca9481 100644
|
||||
# run the test suite
|
||||
system bin/"test_sunshine", "--gtest_color=yes", "--gtest_output=xml:test_results.xml"
|
||||
assert_path_exists testpath/"test_results.xml"
|
||||
|
||||
# create gcovr report
|
||||
if ENV["HOMEBREW_BUILDPATH"]
|
||||
|
||||
cd File.join(ENV["HOMEBREW_BUILDPATH"], "build") do
|
||||
system "gcovr", ".",
|
||||
"-r", "../src",
|
||||
"--exclude-noncode-lines",
|
||||
"--exclude-throw-branches",
|
||||
"--exclude-unreachable-branches",
|
||||
"--verbose",
|
||||
"--xml-pretty",
|
||||
"-o=coverage.xml"
|
||||
end
|
||||
assert_path_exists File.join(ENV["HOMEBREW_BUILDPATH"], "build", "coverage.xml")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user