msvc #103
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: msvc | |
on: | |
workflow_dispatch: | |
jobs: | |
MSVC: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: [ | |
{ triple: x64, arch: x64 }, | |
{ triple: x86, arch: win32 }, | |
{ triple: arm64, arch: ARM64 }, | |
] | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
submodules: true | |
- name: Run setup | |
run: | | |
python -m venv _ | |
_/Scripts/Activate.ps1 | |
python -m pip install ninja | |
python -m pip install -r requirements.txt | |
Get-ChildItem Env: | Sort Name | |
- name: Run cmake | |
run: | | |
_/Scripts/Activate.ps1 | |
Set-PSDebug -Trace 1 | |
cmake -S . -B build -A ${{ matrix.arch }} ` | |
-DCMAKE_INSTALL_PREFIX=_ ` | |
-DBUILD_TESTING=1 ` | |
-DLIBA_WARNINGS=1 ` | |
-DLIBA_ANALYZER=1 ` | |
-DLIBA_SANITIZE=1 ` | |
-DLIBA_WITH_LUA=1 ` | |
-DLIBA_PYTHON=${{ matrix.arch == 'x64' }} ` | |
-DLIBA_JAVA=1 | |
- name: Run build | |
env: | |
LIBA_OPENMP: 1 | |
run: | | |
Set-PSDebug -Trace 1 | |
cmake --build build --config Debug --target package -- -noLogo | |
- name: Run ctest | |
if: ${{ startsWith(matrix.triple, 'x') }} | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
run: | | |
Set-PSDebug -Trace 1 | |
cmake --build build --config Debug --target run_tests -- -noLogo | |
- name: Run build | |
env: | |
LIBA_OPENMP: 1 | |
run: | | |
Set-PSDebug -Trace 1 | |
cmake --build build --config RelWithDebInfo --target package -- -noLogo | |
- name: Run ctest | |
if: ${{ startsWith(matrix.triple, 'x') }} | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
run: | | |
Set-PSDebug -Trace 1 | |
cmake --build build --config RelWithDebInfo --target run_tests -- -noLogo | |
- name: Run example | |
env: | |
CMAKE_PREFIX_PATH: ${{ github.workspace }}/_ | |
run: | | |
Set-PSDebug -Trace 1 | |
cmake --build build --config RelWithDebInfo --target install -- -noLogo | |
cmake -S example -B example/build -A ${{ matrix.arch }} | |
cmake --build example/build -v | |
- uses: actions/checkout@v4 | |
with: | |
repository: microsoft/vcpkg | |
path: _/vcpkg | |
- name: Run vcpkg | |
run: | | |
Set-PSDebug -Trace 1 | |
cmake -B build -DLIBA_VCPKG=_/vcpkg | |
_/vcpkg/bootstrap-vcpkg.bat -disableMetrics | |
_/vcpkg/vcpkg install liba[ipo,pkgconfig]:${{ matrix.triple }}-windows | |
_/vcpkg/vcpkg install liba[ipo,pkgconfig]:${{ matrix.triple }}-windows-static | |
- uses: actions/checkout@v4 | |
if: ${{ matrix.arch == 'x64' }} | |
with: | |
repository: emscripten-core/emsdk | |
path: _/emsdk | |
- name: Run emsdk | |
if: ${{ matrix.arch == 'x64' }} | |
run: | | |
_/emsdk/emsdk install latest | |
_/emsdk/emsdk activate latest | |
_/emsdk/emsdk_env.ps1 | |
pushd _/emsdk/upstream/emscripten | |
& $ENV:EMSDK_NODE.Replace('node.exe', 'npm') install | |
- name: Run cmake | |
if: ${{ matrix.arch == 'x64' }} | |
env: | |
CMAKE_TOOLCHAIN_FILE: cmake/UseClang.cmake | |
EMSDK_QUIET: 1 | |
LIBA_OPENMP: 1 | |
run: | | |
_/Scripts/Activate.ps1 | |
_/emsdk/emsdk_env.ps1 | |
Set-PSDebug -Trace 1 | |
cmake -S . -B build.llvm -G "Ninja Multi-Config" ` | |
-DBUILD_TESTING=1 ` | |
-DLIBA_WARNINGS=1 ` | |
-DLIBA_JAVASCRIPT=1 ` | |
-DLIBA_JAVASCRIPT_TSGEN=1 ` | |
-DLIBA_JAVASCRIPT_BIGINT=1 ` | |
-DLIBA_WITH_LUA=1 ` | |
-DLIBA_PYTHON=1 ` | |
-DLIBA_JAVA=1 | |
- name: Run build | |
if: ${{ matrix.arch == 'x64' }} | |
env: | |
LIBA_OPENMP: 1 | |
run: | | |
Set-PSDebug -Trace 1 | |
cmake --build build.llvm --config Debug --target package | |
- name: Run ctest | |
if: ${{ matrix.arch == 'x64' }} | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
run: | | |
Set-PSDebug -Trace 1 | |
cmake --build build.llvm --config Debug --target test | |
- name: Run build | |
if: ${{ matrix.arch == 'x64' }} | |
env: | |
LIBA_OPENMP: 1 | |
run: | | |
Set-PSDebug -Trace 1 | |
cmake --build build.llvm --config RelWithDebInfo --target package | |
- name: Run ctest | |
if: ${{ matrix.arch == 'x64' }} | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
run: | | |
Set-PSDebug -Trace 1 | |
cmake --build build.llvm --config RelWithDebInfo --target test |