Skip to content

Benchmarking for the DisplayServer and its spawned application #274

Benchmarking for the DisplayServer and its spawned application

Benchmarking for the DisplayServer and its spawned application #274

Workflow file for this run

name: Test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
merge_group:
types: [checks_requested]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
RunTests:
strategy:
fail-fast: false
matrix:
python:
- '3.8'
- '3.10'
server:
- mir_kiosk
- ubuntu_frame
- confined_shell
- mir_test_tools
- mir_demo_server
include:
- python: '3.10'
server: null
mark: self
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- uses: actions/checkout@v3
- id: pytest-args
name: Determine pytest arguments
run: |
ARGS=( --verbose --capture=no )
[ -n '${{ matrix.server }}' ] && ARGS+=( -k ${{ matrix.server }} )
[ -n '${{ matrix.mark }}' ] && ARGS+=( -m ${{ matrix.mark }} )
[ '${{ matrix.mark }}' == 'self' ] && ARGS+=( --cov --cov-branch --cov-report=xml )
echo args=${ARGS[@]} >> $GITHUB_OUTPUT
- name: Set up dependencies
working-directory: mir-ci/mir_ci
run: |
sudo apt-get --yes install pkg-config libwayland-dev
pip install -e ..
[ '${{ matrix.mark }}' == 'self' ] && pip install pytest-cov
python -m pytest ${{ steps.pytest-args.outputs.args }} --deps
- name: Run the tests
working-directory: mir-ci/mir_ci
run: |
# set up coredumps
ulimit -c unlimited
echo "/tmp/corefile-%e-%p-%t" | sudo tee /proc/sys/kernel/core_pattern
sudo adduser $USER video
sudo adduser $USER input
sg video "
sg input '
python -m pytest ${{ steps.pytest-args.outputs.args }} --junitxml=junit-${{ matrix.server || matrix.mark }}-${{ matrix.python }}.xml
'
"
- name: Upload junit report
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: test-results
path: mir-ci/mir_ci/junit-*.xml
- if: ${{ matrix.mark == 'self' }}
name: Upload coverage data
uses: codecov/codecov-action@v3
with:
directory: mir-ci/mir_ci
fail_ci_if_error: true
verbose: true
- if: ${{ failure() }}
name: Collect any core dumps
run: |
sudo find /tmp/ -name corefile-* -exec chown $UID {} \; -exec mv -v {} . \;
- if: ${{ failure() }}
name: Upload any core dumps
uses: actions/upload-artifact@v3
with:
name: core-dumps
path: corefile-*
if-no-files-found: ignore
- if: ${{ failure() && runner.debug }}
name: Setup upterm session
uses: lhotari/action-upterm@v1
with:
limit-access-to-actor: true