Skip to content

use git submodule for library sources #37

use git submodule for library sources

use git submodule for library sources #37

Workflow file for this run

name: Build and Test
on: [push, pull_request]
jobs:
ubuntu:
strategy:
matrix:
version: ['8.0', '8.1', '8.2', '8.3', '8.4']
library:
- ''
- 'system'
runs-on: ubuntu-latest
steps:
- name: Checkout md4c
uses: actions/checkout@v4
- name: Checkout submodules
run: |
git submodule update --init --recursive
if: ${{ ! matrix.library }}
- name: Install library
run: |
sudo apt-get install -y "automake" "libtool" "libmd4c-dev" "libmd4c-html0-dev"
if: ${{ matrix.library }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{matrix.version}}
tools: phpize
- name: phpize
run: phpize
- name: configure with bundled library
run: |
./configure --enable-md4c
if: ${{ ! matrix.library }}
- name: configure with library
run: |
./configure --enable-md4c --enable-system-libmd4c
if: ${{ matrix.library }}
- name: make
run: make
- name: test
run: make test TESTS=tests
windows:
defaults:
run:
shell: cmd
strategy:
matrix:
os: [windows-2022]
version: ['8.0', '8.1', '8.2', '8.3', '8.4']
arch: [x64]
ts: [nts]
runs-on: ${{matrix.os}}
steps:
- name: Checkout md4c
uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Setup PHP
id: setup-php
uses: php/setup-php-sdk@v0.10
with:
version: ${{matrix.version}}
arch: ${{matrix.arch}}
ts: ${{matrix.ts}}
cache: true
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.arch}}
toolset: ${{steps.setup-php.outputs.toolset}}
- name: phpize
run: phpize
- name: configure
run: configure --enable-md4c --with-prefix=${{steps.setup-php.outputs.prefix}}
- name: make
run: nmake
- name: test
run: nmake test TESTS=tests