mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-15 04:24:36 +00:00
56 lines
1.8 KiB
YAML
56 lines
1.8 KiB
YAML
name: emscripten
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container: archlinux:base-devel
|
|
steps:
|
|
- name: Install dependencies
|
|
run: pacman -Syu --noconfirm && pacman -S --noconfirm --needed cmake git unzip python ninja
|
|
- name: Setup emscripten
|
|
uses: mymindstorm/setup-emsdk@v14
|
|
with:
|
|
version: 3.1.67
|
|
- name: Trust git repo
|
|
run: git config --global --add safe.directory '*'
|
|
- uses: actions/checkout@v4
|
|
- name: Profiler GUI
|
|
run: |
|
|
cmake -G Ninja -B profiler/build -S profiler -DCMAKE_BUILD_TYPE=MinSizeRel -DGIT_REV=${{ github.sha }} -DCMAKE_TOOLCHAIN_FILE=${{env.EMSDK}}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
|
|
cmake --build profiler/build --parallel
|
|
- name: Compress artifacts
|
|
run: |
|
|
gzip -9 profiler/build/tracy-profiler.js profiler/build/tracy-profiler.wasm
|
|
- name: Find Artifacts
|
|
id: find_artifacts
|
|
run: |
|
|
mkdir -p bin
|
|
cp profiler/build/index.html bin
|
|
cp profiler/build/tracy-profiler.data bin
|
|
cp profiler/build/tracy-profiler.js.gz bin
|
|
cp profiler/build/tracy-profiler.wasm.gz bin
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: emscripten
|
|
path: bin
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
if: github.ref == 'refs/heads/master'
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
- uses: wlixcc/SFTP-Deploy-Action@v1.2.4
|
|
with:
|
|
username: ${{ secrets.USERNAME }}
|
|
server: ${{ secrets.SERVER }}
|
|
port: ${{ secrets.PORT }}
|
|
ssh_private_key: ${{ secrets.PRIVATE_KEY }}
|
|
local_path: './emscripten/*'
|
|
remote_path: ${{ secrets.REMOTE_PATH }}
|
|
sftp_only: true |