From acf8cb072ad818cc42764de8de1be4c5d4cd1b4d Mon Sep 17 00:00:00 2001 From: Dengke Tang Date: Thu, 23 Feb 2023 18:25:36 -0800 Subject: [PATCH] try this out --- .github/workflows/ci.yml | 84 +++++++++++++++++++-------------------- composer.json | 3 +- dev-scripts/run_tests.bat | 3 +- 3 files changed, 44 insertions(+), 46 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23ce68d..af5f7fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 builder.pyz build -p ${{ env.PACKAGE_NAME }} downstream - macos: - runs-on: macos-${{ matrix.version }} - strategy: - matrix: - version: [10.15] - steps: - # Force PHP to 8.0 - # 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. - # 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. - # 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, - # or maybe use PHPUnit-Polyfills so we can use a modern PHPUnit with old PHP) - - name: Setup PHP 8.0 - uses: shivammathur/setup-php@v2 - with: - php-version: '8.0' - - name: Build PHP 8 extension and test - run: | - 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 - ./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream + # macos: + # runs-on: macos-${{ matrix.version }} + # strategy: + # matrix: + # version: [10.15] + # steps: + # # Force PHP to 8.0 + # # 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. + # # 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. + # # 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, + # # or maybe use PHPUnit-Polyfills so we can use a modern PHPUnit with old PHP) + # - name: Setup PHP 8.0 + # uses: shivammathur/setup-php@v2 + # with: + # php-version: '8.0' + # - name: Build PHP 8 extension and test + # run: | + # 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 + # ./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream - pecl-package-test: - runs-on: macos-latest - steps: - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.0' + # pecl-package-test: + # runs-on: macos-latest + # steps: + # - name: Setup PHP + # uses: shivammathur/setup-php@v2 + # with: + # php-version: '8.0' - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: recursive + # - name: Checkout + # uses: actions/checkout@v2 + # with: + # submodules: recursive - - name: Run tests - run: | - ./dev-scripts/prepare_release.sh --name aws-crt --user aws-crt --email aws-sdk-common-runtime@amazon.com --version 1.0.0 --notes NOTES - tar -zxf *.tgz - cd awscrt-1.0.0 - phpize - ./configure - make + # - name: Run tests + # run: | + # ./dev-scripts/prepare_release.sh --name aws-crt --user aws-crt --email aws-sdk-common-runtime@amazon.com --version 1.0.0 --notes NOTES + # tar -zxf *.tgz + # cd awscrt-1.0.0 + # phpize + # ./configure + # make diff --git a/composer.json b/composer.json index f7dbdd9..6f1e6ee 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,7 @@ }, "minimum-stability": "alpha", "require": { - "php": ">=5.5", - "ext-awscrt": "*" + "php": ">=5.5" }, "require-dev": { "phpunit/phpunit":"^5.6.3" diff --git a/dev-scripts/run_tests.bat b/dev-scripts/run_tests.bat index 5611d2c..a7b1eef 100644 --- a/dev-scripts/run_tests.bat +++ b/dev-scripts/run_tests.bat @@ -11,7 +11,6 @@ if not "%~1"=="" ( set "PHP_BINARY=%~1" ) - REM Check if composer_dir was found if "%composer_dir%"=="" ( echo No composer found. @@ -22,7 +21,7 @@ set "script_dir=%~dp0" set "work_dir=%script_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