Skip to content

feat: setup build and splash screen #10

feat: setup build and splash screen

feat: setup build and splash screen #10

Workflow file for this run

---
name: CI
on:
pull_request:
branches:
- master
types:
- opened
- synchronize
- reopened
push:
branches:
- master
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
shell: "bash"
- os: ubuntu-latest
shell: "bash"
- os: windows-latest
shell: "msys2 {0}"
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Dependencies Linux
if: runner.os == 'Linux'
run: |
dependencies=(
"bison"
"build-essential"
"clang"
"cmake"
"flex"
"git"
"lld"
"llvm"
)
sudo apt-get update
sudo apt-get install --no-install-recommends -y "${dependencies[@]}"
- name: Setup Dependencies macOS
if: runner.os == 'macOS'
run: |
dependencies=(
"cmake"
"coreutils"
"llvm"
)
brew install "${dependencies[@]}"
- name: Setup Dependencies Windows
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
make
cmake
git
bison
flex
mingw-w64-x86_64-gcc
mingw-w64-x86_64-llvm
mingw-w64-x86_64-clang
mingw-w64-x86_64-lld
- name: Setup python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Python Path
id: python-path
run: |
if [ "${{ runner.os }}" = "Windows" ]; then
# replace backslashes with double backslashes
python_path=$(echo "${{ steps.setup-python.outputs.python-path }}" | sed 's/\\/\\\\/g')
else
python_path=${{ steps.setup-python.outputs.python-path }}
fi
# step output
echo "python-path=${python_path}"
echo "python-path=${python_path}" >> $GITHUB_OUTPUT
- name: Build
run: |
source ./third-party/nxdk/bin/activate
make
ls -a build
- name: Run tests
id: test
if: false
working-directory: build/tests
run: |
./test_moonlight-xboxog --gtest_color=yes
- name: Generate gcov report
# any except canceled or skipped
if: always() && (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
id: test_report
working-directory: build
run: |
${{ steps.python-path.outputs.python-path }} -m pip install gcovr
${{ steps.python-path.outputs.python-path }} -m gcovr . -r ../src \
--exclude-noncode-lines \
--exclude-throw-branches \
--exclude-unreachable-branches \
--verbose \
--xml-pretty \
-o coverage.xml
- name: Debug coverage file
if: >-
always() &&
steps.test_report.outcome == 'success'
run: |
cat build/coverage.xml
# todo: upload coverage in separate job similar to LizardByte/libdisplaydevice
- name: Upload coverage
# any except canceled or skipped
if: >-
always() &&
steps.test_report.outcome == 'success' &&
startsWith(github.repository, 'LizardByte/')
uses: codecov/codecov-action@v4
with:
disable_search: true
fail_ci_if_error: true
files: ./build/coverage.xml
flags: "${{ runner.os }}"
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true