Skip to content

Commit 86f7a48

Browse files
committed
These can never work, as it is no longer possible to install libmcrypt, and there is no pre-compiled one available for Windows
2 parents f74ccf1 + bd4bb01 commit 86f7a48

File tree

2 files changed

+67
-76
lines changed

2 files changed

+67
-76
lines changed

.github/workflows/build.yml

Lines changed: 63 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -9,86 +9,76 @@ on:
99
create:
1010

1111
jobs:
12+
get-extension-matrix:
13+
runs-on: ubuntu-latest
14+
name: "Windows Build Matrix"
15+
outputs:
16+
matrix: ${{ steps.extension-matrix.outputs.matrix }}
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- name: Get The Extension Matrix
21+
id: extension-matrix
22+
uses: php/php-windows-builder/extension-matrix@v1
23+
with:
24+
php-version-list: '8.0, 8.1, 8.2, 8.3, 8.4, 8.5'
25+
arch-list: 'x64'
26+
1227
windows:
13-
runs-on: windows-latest
14-
name: "Windows: Build and test"
15-
defaults:
16-
run:
17-
shell: cmd
28+
needs: get-extension-matrix
29+
runs-on: ${{ matrix.os }}
30+
name: "Windows"
31+
strategy:
32+
fail-fast: false
33+
matrix: ${{fromJson(needs.get-extension-matrix.outputs.matrix)}}
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
- name: Build The Extension
38+
uses: php/php-windows-builder/extension@v1
39+
with:
40+
php-version: ${{ matrix.php-version }}
41+
arch: ${{ matrix.arch }}
42+
ts: ${{ matrix.ts }}
43+
args: --with-mcrypt
44+
libs: libmcrypt
45+
46+
linux:
47+
runs-on: ubuntu-latest
48+
name: "Linux"
1849
strategy:
1950
fail-fast: false
2051
matrix:
21-
php: ["7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4", "8.5"]
22-
arch: [x86, x64]
23-
ts: [nts, ts]
52+
php: [8.0, 8.1, 8.2, 8.3, 8.4, 8.5]
53+
use-opcache: [true, false]
2454
experimental: [false]
2555
steps:
26-
- name: Checkout Repository
27-
uses: actions/checkout@v3
28-
- name: Extract Version
29-
shell: powershell
30-
run: |
31-
chcp 65001
32-
$r = Select-String -Path php_mcrypt.h -Pattern 'PHP_MCRYPT_VERSION\s+"(.*)"'
33-
$s = $r.Matches[0].Groups[1]
34-
echo "$s"
35-
$extension_version = 'EXTENSION_VERSION=' + $s
36-
echo $extension_version >> $env:GITHUB_ENV
37-
- name: Setup PHP
38-
id: setup-php
39-
uses: cmb69/setup-php-sdk@v0.7
40-
with:
41-
version: ${{matrix.php}}
42-
arch: ${{matrix.arch}}
43-
ts: ${{matrix.ts}}
44-
deps: "libmcrypt"
45-
- name: Enable Developer Command Prompt
46-
uses: ilammy/msvc-dev-cmd@v1
47-
with:
48-
arch: ${{matrix.arch}}
49-
toolset: ${{steps.setup-php.outputs.toolset}}
50-
- name: Generate Build Files
51-
run: phpize
52-
- name: Configure Build
53-
run: configure --with-mcrypt --with-prefix=${{steps.setup-php.outputs.prefix}}
54-
- name: Build
55-
run: nmake
56-
- name: Define Module Env
57-
shell: powershell
58-
run: |
59-
chcp 65001
56+
- uses: actions/checkout@v4
6057

61-
$dir = (Get-Location).Path + '\'
62-
if ('x64' -eq '${{matrix.arch}}') { $dir = $dir + 'x64\' }
63-
$dir = $dir + 'Release'
64-
if ('ts' -eq '${{matrix.ts}}') { $dir = $dir + '_TS' }
58+
- name: Setup PHP
59+
uses: shivammathur/setup-php@v2
60+
with:
61+
php-version: "${{ matrix.php }}"
62+
coverage: none
63+
tools: pecl
64+
deps: "libmcrypt"
6565

66-
$artifact_name = 'php_mcrypt-${{env.EXTENSION_VERSION}}-${{matrix.php}}'
66+
- name: Compile
67+
run: phpize && ./configure && make all
6768

68-
if ('7.2' -eq '${{matrix.php}}') { $artifact_name = $artifact_name + '-vc15' }
69-
if ('7.3' -eq '${{matrix.php}}') { $artifact_name = $artifact_name + '-vc15' }
70-
if ('7.4' -eq '${{matrix.php}}') { $artifact_name = $artifact_name + '-vc15' }
71-
if ('8.0' -eq '${{matrix.php}}') { $artifact_name = $artifact_name + '-vs16' }
72-
if ('8.1' -eq '${{matrix.php}}') { $artifact_name = $artifact_name + '-vs16' }
73-
if ('8.2' -eq '${{matrix.php}}') { $artifact_name = $artifact_name + '-vs16' }
74-
if ('8.3' -eq '${{matrix.php}}') { $artifact_name = $artifact_name + '-vs16' }
75-
if ('8.4' -eq '${{matrix.php}}') { $artifact_name = $artifact_name + '-vs17' }
76-
if ('8.5' -eq '${{matrix.php}}') { $artifact_name = $artifact_name + '-vs17' }
69+
- name: Run tests
70+
continue-on-error: ${{ matrix.experimental }}
71+
run: |
72+
make test
7773
78-
if ('nts' -eq '${{matrix.ts}}') { $artifact_name = $artifact_name + '-nts' }
79-
if ('x64' -eq '${{matrix.arch}}') { $artifact_name = $artifact_name + '-x86_64' }
80-
81-
$extension_artifact_name = "ARTIFACT_NAME=" + $artifact_name
82-
echo $extension_artifact_name >> $env:GITHUB_ENV
83-
84-
$from = $dir + '\php_mcrypt.dll'
85-
$to = $dir + '\' + $artifact_name + ".dll"
86-
Copy-Item $from -Destination $to
87-
$extension_artifact = "ARTIFACT=" + $to
88-
echo $extension_artifact >> $env:GITHUB_ENV
89-
90-
- name: Upload artifacts
91-
uses: actions/upload-artifact@v3
92-
with:
93-
name: ${{env.ARTIFACT_NAME}}
94-
path: ${{env.ARTIFACT}}
74+
release:
75+
runs-on: ubuntu-latest
76+
name: "PIE Release Artifacts"
77+
needs: windows
78+
if: ${{ github.event_name == 'release' }}
79+
steps:
80+
- name: Upload artifact to the release
81+
uses: php/php-windows-builder/release@v1
82+
with:
83+
release: ${{ github.event.release.tag_name }}
84+
token: ${{ secrets.GITHUB_TOKEN }}

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44
"license": "PHP-3.01",
55
"description": "Bindings for the libmcrypt library.",
66
"require": {
7-
"php": ">=7.2"
7+
"php": ">= 7.2.0, <= 8.6.0"
88
},
99
"php-ext": {
1010
"priority": 20,
11+
"extension-name": "mcrypt",
1112
"configure-options": [
1213
{
1314
"name": "with-mcrypt",
14-
"description": "libmcrypt prefix?",
15-
"needs-value": false
15+
"description": "Include mcrypt support",
16+
"needs-value": true
1617
}
1718
]
1819
}

0 commit comments

Comments
 (0)