mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-02-06 18:40:37 +00:00
Merge pull request #140 from SunshineStream/general-cleanup
Workflow updates
This commit is contained in:
commit
3b49deac25
2
.github/workflows/CI.yml
vendored
2
.github/workflows/CI.yml
vendored
@ -3,7 +3,7 @@ name: CI
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master, nightly]
|
||||
types: [opened, synchronize, edited, reopened]
|
||||
types: [opened, synchronize, reopened]
|
||||
push:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
|
2
.github/workflows/clang.yml
vendored
2
.github/workflows/clang.yml
vendored
@ -3,7 +3,7 @@ name: clang-format-lint
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master, nightly]
|
||||
types: [opened, synchronize, edited, reopened]
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
4
.github/workflows/issues-stale.yml
vendored
4
.github/workflows/issues-stale.yml
vendored
@ -26,8 +26,8 @@ jobs:
|
||||
This PR was closed because it has been stalled for 5 days with no activity.
|
||||
stale-pr-label: 'stale'
|
||||
exempt-pr-labels: 'status:in-progress'
|
||||
days-before-stale: 30
|
||||
days-before-close: 5
|
||||
days-before-stale: 60
|
||||
days-before-close: 10
|
||||
|
||||
- name: Invalid Template
|
||||
uses: actions/stale@v5
|
||||
|
10
.github/workflows/localize.yml
vendored
10
.github/workflows/localize.yml
vendored
@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
branches: [nightly]
|
||||
paths: # prevents workflow from running unless these files change
|
||||
- '.github/workflows/localize.yml'
|
||||
- 'sunshine/**'
|
||||
- 'locale/sunshine.po'
|
||||
workflow_dispatch:
|
||||
@ -40,15 +41,18 @@ jobs:
|
||||
|
||||
- name: git diff
|
||||
run: |
|
||||
# disable the pager
|
||||
git config --global pager.diff false
|
||||
|
||||
# print the git diff
|
||||
git diff --exit-code locale/sunshine.po
|
||||
git diff locale/sunshine.po
|
||||
|
||||
# set the variable with minimal output
|
||||
OUTPUT=$(git diff --exit-code --numstat locale/sunshine.po)
|
||||
OUTPUT=$(git diff --numstat locale/sunshine.po)
|
||||
echo "git_diff=${OUTPUT}" >> $GITHUB_ENV
|
||||
|
||||
- name: git reset
|
||||
if: ${{ env.git_diff != '1 1 locale/sunshine.po' }} # only run if more than 1 line changed
|
||||
if: ${{ env.git_diff == '1 1 locale/sunshine.po' }} # only run if more than 1 line changed
|
||||
run: |
|
||||
git reset --hard
|
||||
|
||||
|
34
.github/workflows/pull-requests.yml
vendored
34
.github/workflows/pull-requests.yml
vendored
@ -5,31 +5,17 @@ on:
|
||||
types: [opened, synchronize, edited, reopened]
|
||||
|
||||
jobs:
|
||||
check-branch:
|
||||
check-pull-request:
|
||||
name: Check Pull Request
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Branch check
|
||||
if: ( github.head_ref == 'repo-sync/common-repo-files/default' && github.base_ref == 'master' ) || ( github.head_ref == 'nightly' && github.base_ref == 'master' )
|
||||
run: |
|
||||
echo Base: "$GITHUB_BASE_REF"
|
||||
echo Head: "$GITHUB_HEAD_REF"
|
||||
echo "branch=True" >> $GITHUB_ENV
|
||||
|
||||
- name: Comment on Pull Request
|
||||
uses: mshick/add-pr-comment@v1
|
||||
if: github.base_ref != 'nightly' && env.branch != 'True'
|
||||
- uses: Vankka/pr-target-branch-action@v2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
message: Pull requests must be made to the `nightly` branch. Thanks.
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
repo-token-user-login: 'github-actions[bot]'
|
||||
|
||||
- name: Fail Workflow
|
||||
if: github.base_ref != 'nightly' && env.branch != 'True'
|
||||
run: |
|
||||
echo Base: "$GITHUB_BASE_REF"
|
||||
echo Head: "$GITHUB_HEAD_REF"
|
||||
exit 1
|
||||
target: master
|
||||
exclude: nightly # Don't prevent going from nightly -> master
|
||||
change-to: nightly
|
||||
comment: |
|
||||
Your PR was set to `master`, PRs should be sent to `nightly`
|
||||
The base branch of this PR has been automatically changed to `nightly`, please check that there are no merge conflicts
|
||||
|
@ -11,6 +11,24 @@ build:
|
||||
tools:
|
||||
python: "3.9"
|
||||
|
||||
## apt packages required packages to run cmake on sunshine, note that additional packages are required
|
||||
# apt_packages:
|
||||
# - cmake
|
||||
# - ffmpeg
|
||||
# - libboost-filesystem-dev
|
||||
# - libboost-log-dev
|
||||
# - libboost-thread-dev
|
||||
|
||||
## run cmake
|
||||
# jobs:
|
||||
# pre_build:
|
||||
# - cmake .
|
||||
|
||||
## Include the submodules, required for cmake
|
||||
#submodules:
|
||||
# include: all
|
||||
# recursive: true
|
||||
|
||||
# Build documentation in the docs/ directory with Sphinx
|
||||
sphinx:
|
||||
builder: html
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
# standard imports
|
||||
from datetime import datetime
|
||||
import os
|
||||
import re
|
||||
|
||||
|
||||
# -- Path setup --------------------------------------------------------------
|
||||
@ -13,8 +15,6 @@ from datetime import datetime
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
import os
|
||||
# import sys
|
||||
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__)) # the directory of this file
|
||||
source_dir = os.path.dirname(script_dir) # the source folder directory
|
||||
@ -26,8 +26,16 @@ copyright = f'{datetime.now ().year}, {project}'
|
||||
author = 'ReenigneArcher'
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
# version = '0.13.0'
|
||||
|
||||
with open(os.path.join(root_dir, 'CMakeLists.txt'), 'r') as f:
|
||||
version = re.search(r"project\(Sunshine VERSION ((\d+)\.(\d+)\.(\d+))\)", str(f.read())).group(1)
|
||||
"""
|
||||
To use cmake method for obtaining version instead of regex,
|
||||
1. Within CMakeLists.txt add the following line without backticks:
|
||||
``configure_file(docs/source/conf.py.in "${CMAKE_CURRENT_SOURCE_DIR}/docs/source/conf.py" @ONLY)``
|
||||
2. Rename this file to ``conf.py.in``
|
||||
3. Uncomment the next line
|
||||
"""
|
||||
# version = '@PROJECT_VERSION@' # use this for cmake configure_file method
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
@ -60,7 +68,7 @@ source_suffix = ['.rst', '.md']
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
# html_static_path = ['_static']
|
||||
|
||||
html_logo = os.path.join(root_dir, 'sunshine.ico')
|
||||
html_logo = os.path.join(root_dir, 'sunshine.png')
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
|
BIN
sunshine.png
BIN
sunshine.png
Binary file not shown.
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 20 KiB |
Loading…
x
Reference in New Issue
Block a user