mirror of
https://github.com/php-win-ext/winlib-builder.git
synced 2026-03-24 01:02:11 +01:00
This may be useful or not, but since it is done for MSBuild builds, it should probably be done for CMake builds, too.
52 lines
1.7 KiB
YAML
52 lines
1.7 KiB
YAML
name: Build libtidy
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: libtidy tag to build
|
|
required: true
|
|
php:
|
|
description: PHP version to build for
|
|
required: true
|
|
defaults:
|
|
run:
|
|
shell: cmd
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
arch: [x64, x86]
|
|
runs-on: windows-2022
|
|
steps:
|
|
- name: Checkout winlib-builder
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: winlib-builder
|
|
- name: Checkout libtidy
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: libtidy
|
|
repository: winlibs/libtidy
|
|
ref: ${{github.event.inputs.version}}
|
|
- name: Compute virtual inputs
|
|
id: virtuals
|
|
run: powershell winlib-builder/scripts/compute-virtuals -version ${{github.event.inputs.php}} -arch ${{matrix.arch}}
|
|
- name: Configure libtidy
|
|
run: cd libtidy && cmake -G "Visual Studio 17 2022" -A ${{steps.virtuals.outputs.msarch}} -T ${{steps.virtuals.outputs.msts}} -DCMAKE_SYSTEM_VERSION=${{steps.virtuals.outputs.winsdk}} .
|
|
- name: Build libtidy
|
|
run: cd libtidy && cmake --build . --config RelWithDebInfo
|
|
- name: Install libtidy
|
|
run: |
|
|
cd libtidy
|
|
cmake --install . --config RelWithDebInfo --prefix ..\build
|
|
del /s /q ..\build\lib\pkgconfig\*
|
|
ren ..\build\bin\tidyexe.exe tidy.exe
|
|
ren ..\build\lib\tidys.lib tidy_a.lib
|
|
copy RelWithDebInfo\tidy.pdb ..\build\bin\tidy.pdb
|
|
copy RelWithDebInfo\tidys.pdb ..\build\lib\tidy_a.pdb
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{github.event.inputs.version}}-${{steps.virtuals.outputs.vs}}-${{matrix.arch}}
|
|
path: build
|