Build libtidy #1
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: 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 |