Skip to content

Commit 89c1ed1

Browse files
committed
Add steps for publishing dlls on a release
1 parent 2aaf249 commit 89c1ed1

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

.github/workflows/build_dlls.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Build DLLs
2+
# Based on https://github.com/TysonAndre/ast/blob/main/.github/workflows/build_dlls.yml
3+
# which is based on https://github.com/krakjoe/apcu/blob/master/.github/workflows/config.yml
4+
# Builds DLLs for 64-bit php.
5+
# See https://windows.php.net/ - At this time, the windows PHP team no longer has access to the machine used to build dlls.
6+
7+
on:
8+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
9+
release:
10+
types: [published]
11+
12+
jobs:
13+
windows:
14+
defaults:
15+
run:
16+
shell: cmd
17+
strategy:
18+
matrix:
19+
version: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]
20+
arch: [x64]
21+
ts: [nts, ts]
22+
runs-on: windows-latest
23+
steps:
24+
- name: Checkout ast
25+
uses: actions/checkout@v2
26+
- name: Setup PHP
27+
id: setup-php
28+
uses: cmb69/[email protected]
29+
with:
30+
version: ${{matrix.version}}
31+
arch: ${{matrix.arch}}
32+
ts: ${{matrix.ts}}
33+
- name: Enable Developer Command Prompt
34+
uses: ilammy/msvc-dev-cmd@v1
35+
with:
36+
arch: ${{matrix.arch}}
37+
toolset: ${{steps.setup-php.outputs.toolset}}
38+
- name: phpize
39+
run: phpize
40+
- name: configure
41+
run: configure --enable-ast --enable-debug-pack --with-prefix=${{steps.setup-php.outputs.prefix}}
42+
- name: make
43+
run: nmake
44+
# Run tests, failing if they fail. REPORT_EXIT_STATUS=1 is the default for tests in php 7.2+
45+
- name: test
46+
run: nmake test TESTS="--show-diff tests"
47+
- name: package
48+
run: |
49+
md .install
50+
copy LICENSE README.md .install
51+
if exist x64 (
52+
if exist x64\Release (set prefix=x64\Release) else set prefix=x64\Release_TS
53+
) else (
54+
if exist Release (set prefix=Release) else set prefix=Release_TS
55+
)
56+
copy %prefix%\php_ast.dll .install
57+
copy %prefix%\php_ast.pdb .install
58+
- name: Upload artifacts
59+
uses: actions/[email protected]
60+
with:
61+
name: ast-Windows-${{matrix.version}}-${{matrix.arch}}-${{matrix.ts}}
62+
path: .install

0 commit comments

Comments
 (0)