tracy/.github/workflows/emscripten.yml

59 lines
2.0 KiB
YAML
Raw Normal View History

2024-09-20 18:54:46 +00:00
name: emscripten
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
container: archlinux:base-devel
steps:
- name: Install dependencies
2024-09-25 22:25:13 +00:00
run: pacman -Syu --noconfirm && pacman -S --noconfirm --needed cmake git unzip python ninja zstd
2024-09-20 18:54:46 +00:00
- name: Setup emscripten
uses: mymindstorm/setup-emsdk@v14
with:
version: 3.1.67
2024-09-20 20:36:41 +00:00
- name: Trust git repo
run: git config --global --add safe.directory '*'
2024-09-20 18:54:46 +00:00
- uses: actions/checkout@v4
- name: Profiler GUI
run: |
2024-09-20 20:09:30 +00:00
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
2024-09-20 18:54:46 +00:00
cmake --build profiler/build --parallel
- name: Compress artifacts
run: |
2024-09-25 22:25:13 +00:00
zstd -18 profiler/build/tracy-profiler.js profiler/build/tracy-profiler.wasm
2024-09-20 18:54:46 +00:00
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
2024-09-25 22:25:13 +00:00
cp profiler/build/tracy-profiler.js.zst bin
2024-09-20 18:54:46 +00:00
cp profiler/build/tracy-profiler.wasm.gz bin
2024-09-25 22:25:13 +00:00
cp profiler/build/tracy-profiler.wasm.zst bin
2024-09-20 18:54:46 +00:00
- uses: actions/upload-artifact@v4
with:
name: emscripten
path: bin
2024-09-20 19:40:10 +00:00
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