mirror of
https://github.com/php/pecl-encryption-mcrypt.git
synced 2026-03-23 23:12:15 +01:00
87 lines
2.5 KiB
YAML
87 lines
2.5 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
release:
|
|
types: [created]
|
|
create:
|
|
|
|
jobs:
|
|
get-extension-matrix:
|
|
runs-on: ubuntu-latest
|
|
name: "Windows Build Matrix"
|
|
outputs:
|
|
matrix: ${{ steps.extension-matrix.outputs.matrix }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Get The Extension Matrix
|
|
id: extension-matrix
|
|
uses: php/php-windows-builder/extension-matrix@v1
|
|
with:
|
|
php-version-list: '8.0, 8.1, 8.2, 8.3, 8.4, 8.5'
|
|
arch-list: 'x64'
|
|
|
|
windows:
|
|
needs: get-extension-matrix
|
|
runs-on: ${{ matrix.os }}
|
|
name: "Windows"
|
|
strategy:
|
|
fail-fast: false
|
|
matrix: ${{fromJson(needs.get-extension-matrix.outputs.matrix)}}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Build The Extension
|
|
uses: php/php-windows-builder/extension@v1
|
|
with:
|
|
php-version: ${{ matrix.php-version }}
|
|
arch: ${{ matrix.arch }}
|
|
ts: ${{ matrix.ts }}
|
|
args: --with-mcrypt
|
|
libs: libmcrypt, dirent
|
|
|
|
linux:
|
|
runs-on: ubuntu-latest
|
|
name: "Linux"
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
php: [8.0, 8.1, 8.2, 8.3, 8.4, 8.5]
|
|
use-opcache: [true, false]
|
|
experimental: [false]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: "${{ matrix.php }}"
|
|
coverage: none
|
|
tools: pecl
|
|
|
|
- name: Install dependencies
|
|
run: sudo apt-get install -y libmcrypt-dev
|
|
|
|
- name: Compile
|
|
run: phpize && ./configure && make all
|
|
|
|
- name: Run tests
|
|
continue-on-error: ${{ matrix.experimental }}
|
|
run: |
|
|
make test
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
name: "PIE Release Artifacts"
|
|
needs: windows
|
|
if: ${{ github.event_name == 'release' }}
|
|
steps:
|
|
- name: Upload artifact to the release
|
|
uses: php/php-windows-builder/release@v1
|
|
with:
|
|
release: ${{ github.event.release.tag_name }}
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|