try this out

This commit is contained in:
Dengke Tang
2023-02-23 18:25:36 -08:00
parent 4d0a79b227
commit acf8cb072a
3 changed files with 44 additions and 46 deletions
+42 -42
View File
@@ -142,48 +142,48 @@ jobs:
# python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')" # python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
# python builder.pyz build -p ${{ env.PACKAGE_NAME }} downstream # python builder.pyz build -p ${{ env.PACKAGE_NAME }} downstream
macos: # macos:
runs-on: macos-${{ matrix.version }} # runs-on: macos-${{ matrix.version }}
strategy: # strategy:
matrix: # matrix:
version: [10.15] # version: [10.15]
steps: # steps:
# Force PHP to 8.0 # # Force PHP to 8.0
# Doing this because tests fail in PHP 8.1 (default on macos Github Runner as of Dec 2021) # # Doing this because tests fail in PHP 8.1 (default on macos Github Runner as of Dec 2021)
# due to the old version of PHPUnit we're using. # # due to the old version of PHPUnit we're using.
# We're using an old PHPUnit because it's compatible our min supported PHP 5.5. # # We're using an old PHPUnit because it's compatible our min supported PHP 5.5.
# Quick fix is to force PHP version back to 8.0, which can still run our tests without error. # # Quick fix is to force PHP version back to 8.0, which can still run our tests without error.
# A real solution is to get our tests working on all PHP versions # # A real solution is to get our tests working on all PHP versions
# (maybe don't use PHPUnit, maybe raise our min supported PHP version so we can upgrade, # # (maybe don't use PHPUnit, maybe raise our min supported PHP version so we can upgrade,
# or maybe use PHPUnit-Polyfills so we can use a modern PHPUnit with old PHP) # # or maybe use PHPUnit-Polyfills so we can use a modern PHPUnit with old PHP)
- name: Setup PHP 8.0 # - name: Setup PHP 8.0
uses: shivammathur/setup-php@v2 # uses: shivammathur/setup-php@v2
with: # with:
php-version: '8.0' # php-version: '8.0'
- name: Build PHP 8 extension and test # - name: Build PHP 8 extension and test
run: | # run: |
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')" # python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
chmod a+x builder # chmod a+x builder
./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream # ./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream
pecl-package-test: # pecl-package-test:
runs-on: macos-latest # runs-on: macos-latest
steps: # steps:
- name: Setup PHP # - name: Setup PHP
uses: shivammathur/setup-php@v2 # uses: shivammathur/setup-php@v2
with: # with:
php-version: '8.0' # php-version: '8.0'
- name: Checkout # - name: Checkout
uses: actions/checkout@v2 # uses: actions/checkout@v2
with: # with:
submodules: recursive # submodules: recursive
- name: Run tests # - name: Run tests
run: | # run: |
./dev-scripts/prepare_release.sh --name aws-crt --user aws-crt --email [email protected] --version 1.0.0 --notes NOTES # ./dev-scripts/prepare_release.sh --name aws-crt --user aws-crt --email [email protected] --version 1.0.0 --notes NOTES
tar -zxf *.tgz # tar -zxf *.tgz
cd awscrt-1.0.0 # cd awscrt-1.0.0
phpize # phpize
./configure # ./configure
make # make
+1 -2
View File
@@ -15,8 +15,7 @@
}, },
"minimum-stability": "alpha", "minimum-stability": "alpha",
"require": { "require": {
"php": ">=5.5", "php": ">=5.5"
"ext-awscrt": "*"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit":"^5.6.3" "phpunit/phpunit":"^5.6.3"
+1 -2
View File
@@ -11,7 +11,6 @@ if not "%~1"=="" (
set "PHP_BINARY=%~1" set "PHP_BINARY=%~1"
) )
REM Check if composer_dir was found REM Check if composer_dir was found
if "%composer_dir%"=="" ( if "%composer_dir%"=="" (
echo No composer found. echo No composer found.
@@ -22,7 +21,7 @@ set "script_dir=%~dp0"
set "work_dir=%script_dir%/.." set "work_dir=%script_dir%/.."
cd %work_dir% cd %work_dir%
call %PHP_BINARY% -c php-win.ini %composer_dir% update composer update
call %PHP_BINARY% -c php-win.ini vendor/bin/phpunit tests --debug call %PHP_BINARY% -c php-win.ini vendor/bin/phpunit tests --debug