Skip to content

feat: browser support (#894) #2653

feat: browser support (#894)

feat: browser support (#894) #2653

Workflow file for this run

---
name: Build - Windows
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
env:
CMAKE_BUILD_PARALLEL_LEVEL: 2
MAKEFLAGS: '-j 2'
jobs:
job:
name: ${{ matrix.os }}-${{ matrix.buildtype }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022]
buildtype: [windows-release, windows-release-asan, windows-debug]
include:
- os: windows-2022
triplet: x64-windows
packages: >
sccache
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: CCache
uses: hendrikmuhs/ccache-action@main
with:
max-size: "1G"
variant: "sccache"
key: ccache-${{ matrix.os }}-${{ matrix.buildtype }}
restore-keys: |
ccache-${{ matrix.os }}
- name: Restore artifacts and install vcpkg
id: vcpkg-step
run: |
$json=Get-Content vcpkg.json -Raw | ConvertFrom-Json
$vcpkgCommitId=$json.'builtin-baseline'
Write-Host "vcpkg commit ID: $vcpkgCommitId"
echo "vcpkgGitCommitId=$vcpkgCommitId" >> "$GITHUB_OUTPUT"
- name: Get vcpkg commit id from vcpkg.json
uses: lukka/run-vcpkg@main
with:
vcpkgGitURL: "https://github.com/microsoft/vcpkg.git"
vcpkgGitCommitId: ${{ steps.vcpkg-step.outputs.vcpkgGitCommitId }}
vcpkgJsonIgnores: "['**/vcpkg/**', '**/browser/overlay-ports/**']"
- name: Get latest CMake and ninja
uses: lukka/get-cmake@main
- name: Run CMake
uses: lukka/run-cmake@main
with:
configurePreset: ${{ matrix.buildtype }}
buildPreset: ${{ matrix.buildtype }}
- name: Create and Upload Artifact (exe)
uses: actions/upload-artifact@main
with:
name: otclient-${{ matrix.os }}-${{ matrix.buildtype }}-${{ github.sha }}
path: |
${{ github.workspace }}/otclient.exe
- name: Create and Upload Artifact (dlls)
uses: actions/upload-artifact@main
with:
name: otclient-dlls-${{ matrix.os }}-${{ matrix.buildtype }}-${{ github.sha }}
path: |
${{ github.workspace }}/*.dll