-
Notifications
You must be signed in to change notification settings - Fork 7
82 lines (67 loc) · 2.11 KB
/
Copy pathbrowser-pages.yml
File metadata and controls
82 lines (67 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Browser Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: github-pages
cancel-in-progress: false
jobs:
build:
name: Publish browser sample with WebAssembly AOT
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
global-json-file: global.json
- name: Setup Emscripten
uses: mymindstorm/setup-emsdk@v16
with:
version: 4.0.18
actions-cache-folder: artifacts/emsdk-cache
- name: Restore WebAssembly workload
run: dotnet workload restore src/ProGPU.Samples.Browser/ProGPU.Samples.Browser.csproj
- name: Restore browser sample
run: dotnet restore src/ProGPU.Samples.Browser/ProGPU.Samples.Browser.csproj --runtime browser-wasm
- name: Configure GitHub Pages
uses: actions/configure-pages@v5
- name: Publish AOT browser sample
run: >-
dotnet publish src/ProGPU.Samples.Browser/ProGPU.Samples.Browser.csproj
--configuration Release
--runtime browser-wasm
--no-restore
--output artifacts/browser-aot
-p:ContinuousIntegrationBuild=true
- name: Publish pure C++ WebAssembly AOT gallery
env:
PROGPU_NATIVE_BROWSER_GALLERY_PUBLISH_DIR: ${{ github.workspace }}/artifacts/browser-aot/wwwroot/native
run: ./eng/publish-progpu-native-browser-gallery.sh
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: artifacts/browser-aot/wwwroot
deploy:
name: Deploy browser sample to GitHub Pages
needs: build
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4