Skip to content

Commit 8b21db6

Browse files
Merge pull request #2388 from LizardByte/nightly
v0.23.1
2 parents 14ed89d + 067efc7 commit 8b21db6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1213
-352
lines changed

.codeql-prebuild-cpp.sh renamed to .codeql-prebuild-cpp-Linux.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# install dependencies for C++ analysis
2+
set -e
23

34
sudo apt-get update -y
45
sudo apt-get install -y \
@@ -54,3 +55,12 @@ sudo wget \
5455
sudo chmod a+x /root/cuda.run
5556
sudo /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm
5657
sudo rm /root/cuda.run
58+
59+
# build
60+
mkdir -p build
61+
cd build || exit 1
62+
cmake -G "Unix Makefiles" ..
63+
make -j"$(nproc)"
64+
65+
# skip autobuild
66+
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"

.codeql-prebuild-cpp-Windows.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# install dependencies for C++ analysis
2+
set -e
3+
4+
# update pacman
5+
pacman --noconfirm -Suy
6+
7+
# install dependencies
8+
pacman --noconfirm -S \
9+
base-devel \
10+
diffutils \
11+
gcc \
12+
git \
13+
make \
14+
mingw-w64-x86_64-binutils \
15+
mingw-w64-x86_64-boost \
16+
mingw-w64-x86_64-cmake \
17+
mingw-w64-x86_64-curl \
18+
mingw-w64-x86_64-miniupnpc \
19+
mingw-w64-x86_64-nlohmann-json \
20+
mingw-w64-x86_64-nodejs \
21+
mingw-w64-x86_64-onevpl \
22+
mingw-w64-x86_64-openssl \
23+
mingw-w64-x86_64-opus \
24+
mingw-w64-x86_64-rust \
25+
mingw-w64-x86_64-toolchain
26+
27+
# build
28+
mkdir -p build
29+
cd build || exit 1
30+
cmake -G "MinGW Makefiles" ..
31+
mingw32-make -j"$(nproc)"
32+
33+
# skip autobuild
34+
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"

.codeql-prebuild-cpp-macOS.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# install dependencies for C++ analysis
2+
set -e
3+
4+
# install dependencies
5+
brew install \
6+
boost \
7+
cmake \
8+
miniupnpc \
9+
node \
10+
opus \
11+
pkg-config
12+
13+
# build
14+
mkdir -p build
15+
cd build || exit 1
16+
cmake -G "Unix Makefiles" ..
17+
make -j"$(sysctl -n hw.logicalcpu)"
18+
19+
# skip autobuild
20+
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"

.github/workflows/CI.yml

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ jobs:
211211
then
212212
echo "This is a PUSH event"
213213
branch=${{ github.ref_name }}
214+
build_version=${{ needs.check_changelog.outputs.next_version }}
214215
commit=${{ github.sha }}
215216
clone_url=${{ github.event.repository.clone_url }}
216217
else
@@ -227,6 +228,7 @@ jobs:
227228
228229
cd build
229230
cmake -DGITHUB_CLONE_URL=${clone_url} \
231+
-DBUILD_VERSION=${build_version} \
230232
-DGITHUB_BRANCH=${branch} \
231233
-DGITHUB_COMMIT=${commit} \
232234
-DSUNSHINE_CONFIGURE_FLATPAK_MAN=ON \
@@ -377,7 +379,7 @@ jobs:
377379
- name: Build Linux
378380
env:
379381
BRANCH: ${{ github.head_ref || github.ref_name }}
380-
BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version_bare }}
382+
BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version }}
381383
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
382384
timeout-minutes: 5
383385
run: |
@@ -500,18 +502,24 @@ jobs:
500502
run: |
501503
${{ steps.python.outputs.python-path }} -m pip install gcovr
502504
${{ steps.python.outputs.python-path }} -m gcovr -r .. \
503-
--exclude ../tests/ \
504-
--exclude ../third-party/ \
505+
--exclude '.*tests/.*' \
506+
--exclude '.*tests/.*' \
505507
--xml-pretty \
506508
-o coverage.xml
507509
508510
- name: Upload coverage
509511
# any except canceled or skipped
510-
if: always() && (steps.test_report.outcome == 'success')
511-
uses: codecov/codecov-action@v3
512+
if: >-
513+
always() &&
514+
(steps.test_report.outcome == 'success') &&
515+
startsWith(github.repository, 'LizardByte/')
516+
uses: codecov/codecov-action@v4
512517
with:
518+
disable_search: true
519+
fail_ci_if_error: true
513520
files: ./build/coverage.xml
514521
flags: ${{ runner.os }}
522+
token: ${{ secrets.CODECOV_TOKEN }}
515523

516524
- name: Create/Update GitHub Release
517525
if: ${{ needs.setup_release.outputs.create_release == 'true' }}
@@ -560,13 +568,16 @@ jobs:
560568
if [ -z "$branch" ]
561569
then
562570
echo "This is a PUSH event"
571+
build_version=${{ needs.check_changelog.outputs.next_version }}
563572
clone_url=${{ github.event.repository.clone_url }}
564573
branch="${{ github.ref_name }}"
574+
commit=${{ github.sha }}
565575
default_branch="${{ github.event.repository.default_branch }}"
566576
else
567577
echo "This is a PR event"
568578
clone_url=${{ github.event.pull_request.head.repo.clone_url }}
569579
branch="${{ github.event.pull_request.head.ref }}"
580+
commit=${{ github.event.pull_request.head.sha }}
570581
default_branch="${{ github.event.pull_request.head.repo.default_branch }}"
571582
fi
572583
echo "Branch: ${branch}"
@@ -575,7 +586,9 @@ jobs:
575586
mkdir build
576587
cd build
577588
cmake \
589+
-DBUILD_VERSION="${build_version}" \
578590
-DGITHUB_BRANCH="${branch}" \
591+
-DGITHUB_COMMIT="${commit}" \
579592
-DGITHUB_CLONE_URL="${clone_url}" \
580593
-DGITHUB_DEFAULT_BRANCH="${default_branch}" \
581594
-DSUNSHINE_CONFIGURE_HOMEBREW=ON \
@@ -613,7 +626,7 @@ jobs:
613626
echo "publish=${PUBLISH}" >> $GITHUB_OUTPUT
614627
615628
- name: Validate and Publish Homebrew Formula
616-
uses: LizardByte/homebrew-release-action@v2024.314.134529
629+
uses: LizardByte/homebrew-release-action@v2024.417.220943
617630
with:
618631
formula_file: ${{ github.workspace }}/homebrew/sunshine.rb
619632
git_email: ${{ secrets.GH_BOT_EMAIL }}
@@ -673,6 +686,8 @@ jobs:
673686
if [ -z "$branch" ]
674687
then
675688
echo "This is a PUSH event"
689+
branch="${{ github.ref_name }}"
690+
build_version=${{ needs.check_changelog.outputs.next_version }}
676691
commit=${{ github.sha }}
677692
clone_url=${{ github.event.repository.clone_url }}
678693
else
@@ -686,6 +701,8 @@ jobs:
686701
mkdir build
687702
cd build
688703
cmake \
704+
-DBUILD_VERSION=${build_version} \
705+
-DGITHUB_BRANCH=${branch} \
689706
-DGITHUB_COMMIT=${commit} \
690707
-DGITHUB_CLONE_URL=${clone_url} \
691708
-DSUNSHINE_CONFIGURE_PORTFILE=ON \
@@ -821,20 +838,26 @@ jobs:
821838
cd ${build_dir}
822839
${{ steps.python.outputs.python-path }} -m pip install gcovr
823840
sudo ${{ steps.python.outputs.python-path }} -m gcovr -r ../${dir} \
824-
--exclude ../${dir}/tests/ \
825-
--exclude ../${dir}/third-party/ \
841+
--exclude '.*${dir}/tests/.*' \
842+
--exclude '.*${dir}/third-party/.*' \
826843
--gcov-object-directory $(pwd) \
827844
--verbose \
828845
--xml-pretty \
829846
-o ${{ github.workspace }}/build/coverage.xml
830847
831848
- name: Upload coverage
832849
# any except canceled or skipped
833-
if: always() && (steps.test_report.outcome == 'success')
834-
uses: codecov/codecov-action@v3
850+
if: >-
851+
always() &&
852+
(steps.test_report.outcome == 'success') &&
853+
startsWith(github.repository, 'LizardByte/')
854+
uses: codecov/codecov-action@v4
835855
with:
856+
disable_search: true
857+
fail_ci_if_error: false # todo: re-enable this when action is fixed
836858
files: ./build/coverage.xml
837859
flags: ${{ runner.os }}-${{ matrix.os_version }}
860+
token: ${{ secrets.CODECOV_TOKEN }}
838861

839862
- name: Create/Update GitHub Release
840863
if: ${{ needs.setup_release.outputs.create_release == 'true' && matrix.release }}
@@ -1014,7 +1037,7 @@ jobs:
10141037
shell: msys2 {0}
10151038
env:
10161039
BRANCH: ${{ github.head_ref || github.ref_name }}
1017-
BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version_bare }}
1040+
BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version }}
10181041
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
10191042
run: |
10201043
mkdir build
@@ -1059,18 +1082,24 @@ jobs:
10591082
run: |
10601083
${{ steps.python-path.outputs.python-path }} -m pip install gcovr
10611084
${{ steps.python-path.outputs.python-path }} -m gcovr -r .. \
1062-
--exclude ../tests/ \
1063-
--exclude ../third-party/ \
1085+
--exclude '.*tests/.*' \
1086+
--exclude '.*tests/.*' \
10641087
--xml-pretty \
10651088
-o coverage.xml
10661089
10671090
- name: Upload coverage
10681091
# any except canceled or skipped
1069-
if: always() && (steps.test_report.outcome == 'success')
1070-
uses: codecov/codecov-action@v3
1092+
if: >-
1093+
always() &&
1094+
(steps.test_report.outcome == 'success') &&
1095+
startsWith(github.repository, 'LizardByte/')
1096+
uses: codecov/codecov-action@v4
10711097
with:
1098+
disable_search: true
1099+
fail_ci_if_error: true
10721100
files: ./build/coverage.xml
10731101
flags: ${{ runner.os }}
1102+
token: ${{ secrets.CODECOV_TOKEN }}
10741103

10751104
- name: Package Windows Debug Info
10761105
working-directory: build

.github/workflows/automerge.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
- name: Autoapproving
29-
uses: hmarr/auto-approve-action@v3
29+
uses: hmarr/auto-approve-action@v4
3030
with:
3131
github-token: "${{ secrets.GITHUB_TOKEN }}"
3232

@@ -49,7 +49,7 @@ jobs:
4949

5050
steps:
5151
- name: Automerging
52-
uses: pascalgn/automerge-action@v0.15.6
52+
uses: pascalgn/automerge-action@v0.16.3
5353
env:
5454
BASE_BRANCHES: nightly
5555
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}

.github/workflows/codeql.yml

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
- cron: '00 12 * * 0' # every Sunday at 12:00 UTC
1717

1818
concurrency:
19-
group: ${{ github.workflow }}-${{ github.ref }}
19+
group: "${{ github.workflow }}-${{ github.ref }}"
2020
cancel-in-progress: true
2121

2222
jobs:
@@ -57,10 +57,25 @@ jobs:
5757
console.log(`Remapping language: ${key} to ${remap_languages[key.toLowerCase()]}`)
5858
key = remap_languages[key.toLowerCase()]
5959
}
60-
if (supported_languages.includes(key.toLowerCase()) &&
61-
!matrix['include'].includes({"language": key.toLowerCase()})) {
60+
if (supported_languages.includes(key.toLowerCase())) {
6261
console.log(`Found supported language: ${key}`)
63-
matrix['include'].push({"language": key.toLowerCase()})
62+
let osList = ['ubuntu-latest'];
63+
if (key.toLowerCase() === 'swift') {
64+
osList = ['macos-latest'];
65+
} else if (key.toLowerCase() === 'cpp') {
66+
osList = ['macos-latest', 'ubuntu-latest', 'windows-latest'];
67+
}
68+
for (let os of osList) {
69+
// set name for matrix
70+
if (osList.length == 1) {
71+
name = key.toLowerCase()
72+
} else {
73+
name = `${key.toLowerCase()}, ${os}`
74+
}
75+
76+
// add to matrix
77+
matrix['include'].push({"language": key.toLowerCase(), "os": os, "name": name})
78+
}
6479
}
6580
}
6681
@@ -84,10 +99,15 @@ jobs:
8499
}
85100
86101
analyze:
87-
name: Analyze
102+
name: Analyze (${{ matrix.name }})
88103
if: ${{ needs.languages.outputs.continue == 'true' }}
104+
defaults:
105+
run:
106+
shell: ${{ matrix.os == 'windows-latest' && 'msys2 {0}' || 'bash' }}
107+
env:
108+
GITHUB_CODEQL_BUILD: true
89109
needs: [languages]
90-
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
110+
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
91111
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
92112
permissions:
93113
actions: read
@@ -100,6 +120,7 @@ jobs:
100120

101121
steps:
102122
- name: Maximize build space
123+
if: runner.os == 'Linux'
103124
uses: easimon/maximize-build-space@v8
104125
with:
105126
root-reserve-mb: 20480
@@ -114,6 +135,12 @@ jobs:
114135
with:
115136
submodules: recursive
116137

138+
- name: Setup msys2
139+
if: runner.os == 'Windows'
140+
uses: msys2/setup-msys2@v2
141+
with:
142+
update: true
143+
117144
# Initializes the CodeQL tools for scanning.
118145
- name: Initialize CodeQL
119146
uses: github/codeql-action/init@v3
@@ -129,16 +156,20 @@ jobs:
129156

130157
# Pre autobuild
131158
# create a file named .codeql-prebuild-${{ matrix.language }}.sh in the root of your repository
159+
# create a file named .codeql-build-${{ matrix.language }}.sh in the root of your repository
132160
- name: Prebuild
161+
id: prebuild
133162
run: |
134-
# check if .qodeql-prebuild-${{ matrix.language }}.sh exists
135-
if [ -f "./.codeql-prebuild-${{ matrix.language }}.sh" ]; then
136-
echo "Running .codeql-prebuild-${{ matrix.language }}.sh"
137-
./.codeql-prebuild-${{ matrix.language }}.sh
163+
# check if prebuild script exists
164+
filename=".codeql-prebuild-${{ matrix.language }}-${{ runner.os }}.sh"
165+
if [ -f "./${filename}" ]; then
166+
echo "Running prebuild script: ${filename}"
167+
./${filename}
138168
fi
139169
140170
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
141171
- name: Autobuild
172+
if: steps.prebuild.outputs.skip_autobuild != 'true'
142173
uses: github/codeql-action/autobuild@v3
143174

144175
- name: Perform CodeQL Analysis

.github/workflows/cpp-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
5656
- name: Clang format lint
5757
if: ${{ steps.find_files.outputs.found_files }}
58-
uses: DoozyX/clang-format-lint-action@v0.16.2
58+
uses: DoozyX/clang-format-lint-action@v0.17
5959
with:
6060
source: ${{ steps.find_files.outputs.found_files }}
6161
extensions: 'cpp,h,m,mm'

.github/workflows/update-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
if: >-
5252
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
5353
(github.event_name == 'workflow_dispatch')
54-
uses: actions-js/push@v1.4
54+
uses: actions-js/push@v1.5
5555
with:
5656
github_token: ${{ secrets.GH_BOT_TOKEN }}
5757
author_email: ${{ secrets.GH_BOT_EMAIL }}

0 commit comments

Comments
 (0)