Skip to content

Build oniguruma

Build oniguruma #4

Workflow file for this run

name: Build oniguruma
on:
workflow_dispatch:
inputs:
version:
description: oniguruma 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 oniguruma
uses: actions/checkout@v4
with:
path: oniguruma
repository: winlibs/oniguruma
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: Setup MSVC development environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.arch}}
toolset: ${{steps.virtuals.outputs.toolset}}
- name: Build oniguruma
run: cd oniguruma && make_win.bat
- name: Install oniguruma
run: |
cd oniguruma
xcopy onig.dll ..\install\bin\*
xcopy src\onig*.h ..\install\include\*
xcopy onig.lib ..\install\lib\*
copy onig_s.lib ..\install\lib\onig_a.lib
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{github.event.inputs.version}}-${{steps.virtuals.outputs.vs}}-${{matrix.arch}}
path: install