Skip to content

Commit

Permalink
browser cpp example workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarSdt-EC committed Aug 23, 2021
1 parent bde3e24 commit e30d79b
Show file tree
Hide file tree
Showing 5 changed files with 3,788 additions and 6 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/browser-cpp-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Browser Cpp Example

on:
push:
branches:
- os/cpp_BrowserExample

jobs:

build:
name: Build the blueprint browser package, create a docker image from it and run some tests
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [12.x]

steps:
- name: Checkout Repository code
uses: actions/checkout@v2
- name: Install Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Yarn
run : npm install yarn
- name: Run Yarn
run : yarn
- name: Bundle Blueprint Browser
run : yarn browser bundle
- name: Package Blueprint Browser
run : yarn browser package
- name: Create image
run : |
docker build --no-cache -t cpp_image -f ./applications/browser/Dockerfile .
docker images
- name: Run image
run : docker run -d -p 3000:3000 cpp_image
- name: Set a timeout
run : node -e "setTimeout(process.exit, 10000, 0)"
- name: Run headless test
run : yarn browser test
2 changes: 1 addition & 1 deletion applications/browser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
COPY dist /home/blueprint_cpp
COPY ./applications/browser/dist /home/blueprint_cpp
RUN apt-get update && apt-get -y install build-essential clangd-12 git
ENTRYPOINT ["/home/blueprint_cpp/blueprint.exe", "-h", "0.0.0.0"]
Loading

0 comments on commit e30d79b

Please sign in to comment.