Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed NodeJS event emitter in common library. #330

Merged
merged 29 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e97b2ad
Removed NodeJS event emitter in common and rolled our own.
lukehb Nov 26, 2024
1d29db3
Fix linting issues in Common
lukehb Nov 27, 2024
73d3914
Added continue of error to healthcheck actions that build in isolation
lukehb Nov 27, 2024
039160e
Fixing up a few linting issues.
mcottontensor Nov 27, 2024
aac97ee
Disabling some extra linting on the new EventEmitter file for now.
mcottontensor Nov 27, 2024
28c2346
Trying to fix locked mouse tests failing
lukehb Nov 27, 2024
1a38d04
Disable Chrome locked mouse tests and add npm run build to the repo r…
lukehb Nov 27, 2024
a69ee14
Merge branch 'EventEmitter' of https://github.com/EpicGamesExt/PixelS…
lukehb Nov 27, 2024
9bb73cc
Fix linting on file endings.
lukehb Nov 27, 2024
d03023d
Add missing package.json from root into SS dockerfile
lukehb Nov 27, 2024
c9b28e2
Decouple healthcheck of public libs from healthcheck of local libs
lukehb Nov 27, 2024
97f7e22
Disable Linux stream test and make continue on error still fail
lukehb Nov 27, 2024
5456520
make healthcheck on public libs report failure if a step fails but st…
lukehb Nov 27, 2024
9b8a02b
Adding support for and testing #bypass-publish-check
lukehb Nov 27, 2024
1eb99d2
Add extra docs about releasing and bypassing publishing checks.
lukehb Nov 27, 2024
23f7c1a
Modify action to get it to run at all
lukehb Nov 27, 2024
63b53d3
Debugging extracting commit message from GHA
lukehb Nov 27, 2024
96e6476
Trying to get commit message a different way
lukehb Nov 27, 2024
6ab2385
Attempting to add bypass logic another different way.
lukehb Nov 27, 2024
57ece18
Try yet another way
lukehb Nov 27, 2024
1cf8b57
Added pulling source in the bypass check step
lukehb Nov 27, 2024
0b90d03
Testing #bypass-publish-check
lukehb Nov 27, 2024
bf26169
Printing the commit
lukehb Nov 27, 2024
37c1e27
Add special handling for the case of PRs
lukehb Nov 27, 2024
c7d2904
Increase fetch depth to contain triggering commit
lukehb Nov 27, 2024
f66e417
Ammend reading of COMMIT env variable in bash
lukehb Nov 27, 2024
1b201b5
#bypass-publish-check
lukehb Nov 27, 2024
aacebd1
Actually write commit to env #bypass-publish-check
lukehb Nov 27, 2024
cd0a54a
[#bypass-publish-check] Revert some of the playwright frontend test c…
lukehb Nov 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 1 addition & 97 deletions .github/workflows/healthcheck-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,100 +57,4 @@ jobs:

- name: Clean build of frontend implementation
working-directory: Frontend/implementations/typescript
run: npm install && npm run build

build-signalling-only:
if: github.repository == 'EpicGamesExt/PixelStreamingInfrastructure'
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
sparse-checkout: 'Signalling'
sparse-checkout-cone-mode: false

- uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE_VERSION }}"
registry-url: 'https://registry.npmjs.org'

- name: Build signalling using published packages only
working-directory: Signalling
run: npm install && npm run build && npm run lint

build-wilbur-only:
if: github.repository == 'EpicGamesExt/PixelStreamingInfrastructure'
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
sparse-checkout: 'SignallingWebServer'
sparse-checkout-cone-mode: false

- uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE_VERSION }}"
registry-url: 'https://registry.npmjs.org'

- name: Build Wilbur using published packages only
working-directory: SignallingWebServer
run: npm install && npm run build && npm run lint

build-frontend-only:
if: github.repository == 'EpicGamesExt/PixelStreamingInfrastructure'
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
sparse-checkout: 'Frontend/library'
sparse-checkout-cone-mode: false

- uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE_VERSION }}"
registry-url: 'https://registry.npmjs.org'

- name: Build Frontend/library using published packages only
working-directory: Frontend/library
run: npm install && npm run build && npm run lint && npm run test

build-frontend-ui-only:
if: github.repository == 'EpicGamesExt/PixelStreamingInfrastructure'
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
sparse-checkout: 'Frontend/ui-library'
sparse-checkout-cone-mode: false

- uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE_VERSION }}"
registry-url: 'https://registry.npmjs.org'

- name: Build Frontend/ui-library using published packages only
working-directory: Frontend/ui-library
run: npm install && npm run build && npm run lint

build-implementation-typescript-only:
if: github.repository == 'EpicGamesExt/PixelStreamingInfrastructure'
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
sparse-checkout: 'Frontend/implementations/typescript'
sparse-checkout-cone-mode: false

- uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE_VERSION }}"
registry-url: 'https://registry.npmjs.org'

- name: Build Frontend/implementations/typescript using published packages only
working-directory: Frontend/implementations/typescript
run: npm install && npm run build

run: npm install && npm run build
105 changes: 105 additions & 0 deletions .github/workflows/healthcheck-libs-with-public-deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Check health of libraries (public deps)

on:
workflow_dispatch:
push:
paths:
- "Common/**"
- "Signalling/**"
- "SignallingWebServer/**"
- "Frontend/library/**"
- "Frontend/ui-library/**"
- "Frontend/implementations/typescript/**"
pull_request:
paths:
- "Common/**"
- "Signalling/**"
- "SignallingWebServer/**"
- "Frontend/library/**"
- "Frontend/ui-library/**"
- "Frontend/implementations/typescript/**"

env:
NODE_VERSION: 18.17.x

jobs:
check-if-bypass:
runs-on: ubuntu-latest
outputs:
bypass: ${{ steps.checkbypass.outputs.bypass }}
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
fetch-depth: 5 # This should be enough history to contain the commit that triggered the PR

- name: Check commit message for push event
if: github.event_name == 'push'
run: |
COMMIT=${{ github.event.head_commit.message }}
echo "Commit message: $COMMIT"
echo "COMMIT=$COMMIT" >> $GITHUB_ENV

- name: Check commit message for pull request event
if: github.event_name == 'pull_request'
run: |
# Get the latest commit SHA for the pull request
COMMIT_SHA="${{ github.event.pull_request.head.sha }}"
echo "Fetching commit message for PR commit: $COMMIT_SHA"
COMMIT_MESSAGE=$(git log -1 --pretty=%B "$COMMIT_SHA")
echo "Commit message: $COMMIT_MESSAGE"
echo "COMMIT=$COMMIT_MESSAGE" >> $GITHUB_ENV

- name: Check commit message for bypass
id: checkbypass
run: |
echo "$COMMIT"
if echo "$COMMIT" | grep -q "#bypass-publish-check"; then
echo "bypass=true" >> $GITHUB_OUTPUT
echo "bypass=true"
else
echo "bypass=false" >> $GITHUB_OUTPUT
echo "bypass=false"
fi

build-using-public-deps:
needs: check-if-bypass
if: github.repository == 'EpicGamesExt/PixelStreamingInfrastructure' && needs.check-if-bypass.outputs.bypass == 'false' # Only run if bypass is false
runs-on: ubuntu-latest
steps:

- name: Checkout source code
uses: actions/checkout@v3

- uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE_VERSION }}"
registry-url: 'https://registry.npmjs.org'

- name: Remove NPM workspaces
run: rm package.json && rm package-lock.json

- name: Build signalling using published packages only
if: always()
working-directory: Signalling
run: npm install && npm run build && npm run lint

- name: Build Wilbur using published packages only
if: always()
working-directory: SignallingWebServer
run: npm install && npm run build && npm run lint

- name: Build Frontend/library using published packages only
if: always()
working-directory: Frontend/library
run: npm install && npm run build && npm run lint && npm run test

- name: Build Frontend/ui-library using published packages only
if: always()
working-directory: Frontend/ui-library
run: npm install && npm run build && npm run lint

- name: Build Frontend/implementations/typescript using published packages only
if: always()
working-directory: Frontend/implementations/typescript
run: npm install && npm run build
47 changes: 24 additions & 23 deletions .github/workflows/healthcheck-streaming.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,32 @@ on:
- "Extras/**"

jobs:
streaming-test-linux:
if: github.repository == 'EpicGamesExt/PixelStreamingInfrastructure'
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
# Uncomment when we can Linux test to capture a non-black screenshot using software renderer.
# streaming-test-linux:
# if: github.repository == 'EpicGamesExt/PixelStreamingInfrastructure'
# runs-on: ubuntu-latest
# steps:
# - name: Checkout source code
# uses: actions/checkout@v3

- name: Create results directory
run: mkdir Extras/MinimalStreamTester/results

- name: Launch stream test in docker containers
uses: isbang/[email protected]
with:
compose-file: "Extras/MinimalStreamTester/docker-compose.yml"
up-flags: "--build --abort-on-container-exit --exit-code-from tester"

- name: Get short sha
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
# - name: Create results directory
# run: mkdir Extras/MinimalStreamTester/results

# - name: Launch stream test in docker containers
# uses: isbang/[email protected]
# with:
# compose-file: "Extras/MinimalStreamTester/docker-compose.yml"
# up-flags: "--build --abort-on-container-exit --exit-code-from tester"

# - name: Get short sha
# id: vars
# run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Upload results
uses: actions/upload-artifact@v4
with:
name: Results-${{ steps.vars.outputs.sha_short }}-Linux
path: Extras/MinimalStreamTester/results
# - name: Upload results
# uses: actions/upload-artifact@v4
# with:
# name: Results-${{ steps.vars.outputs.sha_short }}-Linux
# path: Extras/MinimalStreamTester/results

streaming-test-win:
if: github.repository == 'EpicGamesExt/PixelStreamingInfrastructure'
Expand Down
2 changes: 1 addition & 1 deletion Common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epicgames-ps/lib-pixelstreamingcommon-ue5.5",
"version": "0.1.1",
"version": "0.1.2",
"description": "Common utilities library for Unreal Engine 5.5 Pixel Streaming",
"main": "build/commonjs/pixelstreamingcommon.js",
"module": "build/esm/pixelstreamingcommon.js",
Expand Down
Loading