Skip to content

Commit a7ee160

Browse files
committed
reverted aft-main to same version as main, re-added workflow
1 parent f2b2af7 commit a7ee160

1 file changed

Lines changed: 95 additions & 0 deletions

File tree

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: "AFT - Build PHP versions"
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
selectos:
6+
required: true
7+
description: Build target OS
8+
default: 'linux-x86_64'
9+
type: choice
10+
options:
11+
- 'all'
12+
# - 'linux-x86_64'
13+
# - 'linux-aarch64'
14+
- 'linux-x86_64-glibc'
15+
# - 'linux-aarch64-glibc'
16+
# - 'macos-x86_64'
17+
- 'macos-aarch64'
18+
- 'windows'
19+
php-version:
20+
required: true
21+
description: PHP version to compile
22+
default: '8.4'
23+
type: choice
24+
options:
25+
- '8.4'
26+
- '8.3'
27+
# - '8.2'
28+
# - '8.1'
29+
debug:
30+
description: Show full build logs
31+
type: boolean
32+
33+
run-name: "Build '${{ inputs.selectos }}' PHP version: ${{ inputs.php-version }}"
34+
35+
jobs:
36+
# Run single UNIX build
37+
unix-static-build:
38+
if: ${{ inputs.selectos != 'windows' && inputs.selectos != 'all' }}
39+
uses: appsfortableau/static-php-cli/.github/workflows/build-unix.yml@main
40+
with:
41+
os: ${{ inputs.selectos }}
42+
php-version: ${{ inputs.php-version }}
43+
debug: ${{ inputs.debug }}
44+
build-micro: true
45+
extensions: 'odbc,pdo_odbc,bcmath,calendar,ctype,curl,dba,dom,exif,fileinfo,filter,gd,libxml,mbregex,mbstring,ldap,msgpack,mysqli,mysqlnd,opcache,openssl,pcntl,pdo,pdo_mysql,pdo_pgsql,pdo_sqlite,pdo_sqlsrv,pgsql,phar,posix,readline,redis,session,simplexml,sockets,sodium,sqlite3,sqlsrv,tokenizer,xml,xmlreader,xmlwriter,zip,zlib'
46+
47+
# Run UNIX build for all given versions.
48+
unix-all-static-builds:
49+
if: ${{ inputs.selectos == 'all' }}
50+
uses: appsfortableau/static-php-cli/.github/workflows/build-unix.yml@main
51+
strategy:
52+
matrix:
53+
selectos: [linux-x86_64-glibc, macos-aarch64]
54+
with:
55+
os: ${{ matrix.selectos }}
56+
php-version: ${{ inputs.php-version }}
57+
debug: ${{ inputs.debug }}
58+
extensions: 'odbc,pdo_odbc,bcmath,calendar,ctype,curl,dba,dom,exif,fileinfo,filter,gd,libxml,mbregex,mbstring,ldap,msgpack,mysqli,mysqlnd,opcache,openssl,pcntl,pdo,pdo_mysql,pdo_pgsql,pdo_sqlite,pdo_sqlsrv,pgsql,phar,posix,readline,redis,session,simplexml,sockets,sodium,sqlite3,sqlsrv,tokenizer,xml,xmlreader,xmlwriter,zip,zlib'
59+
60+
# Run single UNIX build
61+
# windows-static-build:
62+
# if: ${{ inputs.selectos == 'windows' || inputs.selectos == 'all' }}
63+
# uses: appsfortableau/static-php-cli/.github/workflows/build-windows-x86_64.yml@aft-main
64+
# with:
65+
# version: ${{ inputs.php-version }}
66+
# extensions: 'odbc,pdo_odbc,bcmath,calendar,ctype,curl,dba,exif,fileinfo,filter,gd,libxml,mbregex,mbstring,msgpack,mysqli,mysqlnd,opcache,openssl,pdo,pdo_mysql,pdo_pgsql,pdo_sqlite,pdo_sqlsrv,pgsql,phar,redis,session,simplexml,sockets,sodium,sqlite3,sqlsrv,tokenizer,xml,xmlreader,xmlwriter,zip,zlib'
67+
68+
release-php-version:
69+
if: ${{ inputs.selectos == 'all' }}
70+
#needs: [unix-all-static-builds, windows-static-build]
71+
needs: [unix-all-static-builds]
72+
name: Release PHP version ${{ inputs.php-version }}
73+
runs-on: ubuntu-latest
74+
steps:
75+
- uses: actions/download-artifact@v4
76+
with:
77+
pattern: php-cli-*
78+
- id: get_php_version
79+
run: |
80+
ls -la **/*
81+
chmod +x ./php-cli-${{ inputs.php-version }}-linux-x86_64-glibc/php
82+
echo "PHP_VERSION=$(./php-cli-${{ inputs.php-version }}-linux-x86_64-glibc/php -r "echo PHP_VERSION;")" >> "$GITHUB_OUTPUT"
83+
- name: Recursively zip all files in each folder, naming zip after folder
84+
run: |
85+
find . -type d | while read dir; do
86+
[ "$dir" = "." ] && continue
87+
foldername=$(basename "$dir")
88+
(cd "$dir" && zip -r "../${foldername}.zip" .)
89+
done
90+
- name: Release
91+
uses: softprops/action-gh-release@v2
92+
with:
93+
tag_name: ${{ steps.get_php_version.outputs.PHP_VERSION }}
94+
files: php-cli-*.zip
95+
make_latest: true

0 commit comments

Comments
 (0)