@@ -14,113 +14,148 @@ on:
1414 - master
1515
1616jobs :
17- build :
18- name : build / php-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.name }}-${{ matrix.compiler }}
19-
20- runs-on : ${{ matrix.os }}
21- strategy :
22- fail-fast : false
23- matrix :
24- php : [ '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
25-
26- name :
27- - linux
28- - debian
29- - mac
30-
31- include :
32- # Linux
33- - { name: linux, ts: 'nts', compiler: 'gcc', os: ubuntu-20.04 }
34- # Debian (docker)
35- - { name: debian, ts: 'nts', compiler: 'gcc', os: ubuntu-20.04 }
36- # macOS
37- - { name: mac, ts: 'nts', compiler: 'clang', os: macos-12 }
38-
17+ # build:
18+ # name: build / php-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.name }}-${{ matrix.compiler }}
19+
20+ # runs-on: ${{ matrix.os }}
21+ # strategy:
22+ # fail-fast: false
23+ # matrix:
24+ # php: [ '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
25+
26+ # name:
27+ # - linux
28+ # - debian
29+ # - mac
30+
31+ # include:
32+ # # Linux
33+ # - { name: linux, ts: 'nts', compiler: 'gcc', os: ubuntu-20.04 }
34+ # # Debian (docker)
35+ # - { name: debian, ts: 'nts', compiler: 'gcc', os: ubuntu-20.04 }
36+ # # macOS
37+ # - { name: mac, ts: 'nts', compiler: 'clang', os: macos-12 }
38+
39+ # steps:
40+ # - uses: actions/checkout@v3
41+
42+ # # configure spx artifact name in next format:
43+ # # {php}-{ts}-{os.name}-{compiler}
44+ # # spx-php-8.1-nts-linux-gcc
45+ # - name: Set artifact name
46+ # id: setup-artifact
47+ # run: |
48+ # echo "spx_file_name=spx-php-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.name }}-${{ matrix.compiler }}" >> $GITHUB_OUTPUT
49+
50+ # - name: Build extension for Ubuntu and macOS
51+ # if: matrix.name != 'debian'
52+ # uses: ./.github/workflows/build-linux-mac-ext
53+
54+ # - name: Build extension for Debian using docker
55+ # if: matrix.name == 'debian' && matrix.php != '5.4' && matrix.php != '5.5'
56+ # uses: ./.github/workflows/build-debian-ext
57+
58+ # - name: Upload build artifacts after Failure
59+ # if: failure()
60+ # uses: actions/upload-artifact@v3
61+ # with:
62+ # name: debug-${{ steps.setup-artifact.outputs.spx_file_name }}
63+ # path: |
64+ # ${{ github.workspace }}/*.log
65+ # ${{ github.workspace }}/tests/*.log
66+ # retention-days: 7
67+
68+ # - name: Create ZIP archive with build artifact
69+ # run: |
70+ # zip -rvj ${{ steps.setup-artifact.outputs.spx_file_name }}.zip \
71+ # ./modules/spx.so LICENSE $ZIP_EXCLUDE
72+ # zip -rv ${{ steps.setup-artifact.outputs.spx_file_name }}.zip \
73+ # ./assets $ZIP_EXCLUDE
74+ # env:
75+ # ZIP_EXCLUDE: -x ".*" -x "__MACOSX" -x "*.DS_Store"
76+
77+ # - name: Check Release notes
78+ # run: |
79+ # echo "-- Parsing Release Notes from CHANGELOG"
80+ # ./.github/release-notes.sh ./CHANGELOG.md
81+
82+ # - name: Upload build artifact
83+ # uses: actions/upload-artifact@v3
84+ # with:
85+ # name: ${{ steps.setup-artifact.outputs.spx_file_name }}.zip
86+ # path: ${{ steps.setup-artifact.outputs.spx_file_name }}.zip
87+
88+ build-win :
89+ # FIXME this hacky pipeline will be cleaned later
90+ runs-on : windows-latest
3991 steps :
40- - uses : actions/checkout@v3
41-
42- # configure spx artifact name in next format:
43- # {php}-{ts}-{os.name}-{compiler}
44- # spx-php-8.1-nts-linux-gcc
45- - name : Set artifact name
46- id : setup-artifact
47- run : |
48- echo "spx_file_name=spx-php-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.name }}-${{ matrix.compiler }}" >> $GITHUB_OUTPUT
49-
50- - name : Build extension for Ubuntu and macOS
51- if : matrix.name != 'debian'
52- uses : ./.github/workflows/build-linux-mac-ext
53-
54- - name : Build extension for Debian using docker
55- if : matrix.name == 'debian' && matrix.php != '5.4' && matrix.php != '5.5'
56- uses : ./.github/workflows/build-debian-ext
57-
58- - name : Upload build artifacts after Failure
59- if : failure()
60- uses : actions/upload-artifact@v3
92+ - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
93+ - uses : ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
94+ - name : Setup PHP SDK with Developer Pack
95+ uses : zephir-lang/setup-php-sdk@fd5f1bce00956a7e8ac30faaa1ff0692d6dacdfb # v1.0
6196 with :
62- name : debug-${{ steps.setup-artifact.outputs.spx_file_name }}
63- path : |
64- ${{ github.workspace }}/*.log
65- ${{ github.workspace }}/tests/*.log
66- retention-days : 7
67-
68- - name : Create ZIP archive with build artifact
97+ php_version : ' 8.3 '
98+ ts : ' nts '
99+ msvc : ' vs16 '
100+ arch : ' x64 '
101+ install_dir : ' C:\tools '
102+ cache_dir : ' C:\Temp '
103+ - name : Clone PHP-src
69104 run : |
70- zip -rvj ${{ steps.setup-artifact.outputs.spx_file_name }}.zip \
71- ./modules/spx.so LICENSE $ZIP_EXCLUDE
72- zip -rv ${{ steps.setup-artifact.outputs.spx_file_name }}.zip \
73- ./assets $ZIP_EXCLUDE
74- env :
75- ZIP_EXCLUDE : -x ".*" -x "__MACOSX" -x "*.DS_Store"
76-
77- - name : Check Release notes
105+ git clone https://github.com/php/php-src.git C:\php-src
106+ - name : Copy SPX to PHP-src ext directory
78107 run : |
79- echo "-- Parsing Release Notes from CHANGELOG"
80- ./.github/release-notes.sh ./CHANGELOG.md
81-
82- - name : Upload build artifact
83- uses : actions/upload-artifact@v3
84- with :
85- name : ${{ steps.setup-artifact.outputs.spx_file_name }}.zip
86- path : ${{ steps.setup-artifact.outputs.spx_file_name }}.zip
87-
88- release :
89- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
90-
91- needs : [ build ]
92- name : Create Release
93- runs-on : ubuntu-20.04
94-
95- steps :
96- - name : Checkout Code
97- uses : actions/checkout@v3
98- with :
99- fetch-depth : 1
100-
101- - name : Get the release version
102- id : get-version
108+ xcopy /e /k /h /i . C:\php-src\ext\php-spx
109+ - name : Configure and build 1
103110 run : |
104- echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
105-
106- - name : Download SPX build artifacts
107- id : download
108- 109- with :
110- path : ./build-artifacts
111-
112- - name : Prepare Release notes
111+ cd C:\php-src
112+ ./buildconf.bat
113+ - name : Configure and build 2
113114 run : |
114- echo "-- Creating Release Notes"
115- ./.github/release-notes.sh ./CHANGELOG.md > ./release-notes.md
116-
117- - name : Create Release
118- uses : ncipollo/release-action@v1
119- with :
120- token : ${{ secrets.GITHUB_TOKEN }}
121- name : ${{ steps.get-version.outputs.version }}
122- tag : ${{ steps.get-version.outputs.version }}
123- bodyFile : " ./release-notes.md"
124- allowUpdates : true
125- artifacts : " ./build-artifacts/*/*.zip"
126- artifactContentType : application/octet-stream
115+ cd C:\php-src
116+ ./configure --help
117+ ./configure --disable-all --enable-cli --enable-spx
118+ - name : Configure and build 3
119+ run : |
120+ cd C:\php-src
121+ nmake
122+
123+ # release:
124+ # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
125+
126+ # needs: [ build ]
127+ # name: Create Release
128+ # runs-on: ubuntu-20.04
129+
130+ # steps:
131+ # - name: Checkout Code
132+ # uses: actions/checkout@v3
133+ # with:
134+ # fetch-depth: 1
135+
136+ # - name: Get the release version
137+ # id: get-version
138+ # run: |
139+ # echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
140+
141+ # - name: Download SPX build artifacts
142+ # id: download
143+ 144+ # with:
145+ # path: ./build-artifacts
146+
147+ # - name: Prepare Release notes
148+ # run: |
149+ # echo "-- Creating Release Notes"
150+ # ./.github/release-notes.sh ./CHANGELOG.md > ./release-notes.md
151+
152+ # - name: Create Release
153+ # uses: ncipollo/release-action@v1
154+ # with:
155+ # token: ${{ secrets.GITHUB_TOKEN }}
156+ # name: ${{ steps.get-version.outputs.version }}
157+ # tag: ${{ steps.get-version.outputs.version }}
158+ # bodyFile: "./release-notes.md"
159+ # allowUpdates: true
160+ # artifacts: "./build-artifacts/*/*.zip"
161+ # artifactContentType: application/octet-stream
0 commit comments