From 10a3e8a271cdf78d3698fc9844eff51d46b89079 Mon Sep 17 00:00:00 2001 From: Dengke Tang Date: Mon, 7 Nov 2022 14:47:37 -0800 Subject: [PATCH] seems like working --- .github/workflows/ci.yml | 186 ++++++++++++++++++--------------------- win_build.bat | 4 +- 2 files changed, 88 insertions(+), 102 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c150241..3854852 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,75 +14,75 @@ env: RUN: ${{ github.run_id }}-${{ github.run_number }} jobs: - # php-5_5-linux-x64: - # name: php-linux-x64 (5.5) - # runs-on: ubuntu-latest - # steps: - # - name: Setup PHP with Xdebug - # uses: shivammathur/setup-php@v2 - # with: - # coverage: xdebug - # php-version: 5.5 - # ini-values: xdebug.overload_var_dump=0, memory_limit=4G, phar.readonly=false + php-5_5-linux-x64: + name: php-linux-x64 (5.5) + runs-on: ubuntu-latest + steps: + - name: Setup PHP with Xdebug + uses: shivammathur/setup-php@v2 + with: + coverage: xdebug + php-version: 5.5 + ini-values: xdebug.overload_var_dump=0, memory_limit=4G, phar.readonly=false - # - name: Checkout - # uses: actions/checkout@v2 - # with: - # submodules: recursive + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive - # - name: Install ancient PHPUnit - # run: composer require --dev --ignore-platform-reqs phpunit/phpunit "4.8.36" + - name: Install ancient PHPUnit + run: composer require --dev --ignore-platform-reqs phpunit/phpunit "4.8.36" - # - name: Install dependencies - # run: composer update --no-interaction + - name: Install dependencies + run: composer update --no-interaction - # - name: Build for PHP 5.5 - # env: - # CC: clang - # CXX: clang++ - # run: | - # phpize - # ./configure - # make + - name: Build for PHP 5.5 + env: + CC: clang + CXX: clang++ + run: | + phpize + ./configure + make - # php-linux-x64: - # runs-on: ubuntu-latest - # strategy: - # fail-fast: false - # matrix: - # version: - # - "5.6" - # - "7.0" - # - "7.1" - # - "7.2" - # - "7.3" - # - "7.4" - # - "8.0" - # steps: - # - name: Setup PHP with Xdebug - # uses: shivammathur/setup-php@v2 - # with: - # coverage: xdebug - # php-version: ${{matrix.version}} - # ini-values: xdebug.overload_var_dump=0, memory_limit=4G, phar.readonly=false + php-linux-x64: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: + - "5.6" + - "7.0" + - "7.1" + - "7.2" + - "7.3" + - "7.4" + - "8.0" + steps: + - name: Setup PHP with Xdebug + uses: shivammathur/setup-php@v2 + with: + coverage: xdebug + php-version: ${{matrix.version}} + ini-values: xdebug.overload_var_dump=0, memory_limit=4G, phar.readonly=false - # - name: Checkout - # uses: actions/checkout@v2 - # with: - # submodules: recursive + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive - # - name: Install dependencies - # run: composer update --no-interaction + - name: Install dependencies + run: composer update --no-interaction - # - name: Run tests - # env: - # CC: clang - # CXX: clang++ - # run: | - # phpize - # ./configure - # make - # make test + - name: Run tests + env: + CC: clang + CXX: clang++ + run: | + phpize + ./configure + make + make test # linux-arm: @@ -98,7 +98,7 @@ jobs: # chmod a+x builder # ./builder build -p ${{ env.PACKAGE_NAME }} --target=linux-${{ matrix.arch }} --spec=downstream - windows-vc15: + windows-vs16: runs-on: windows-2019 strategy: matrix: @@ -114,43 +114,27 @@ jobs: git clone https://github.com/Microsoft/php-sdk-binary-tools.git php-sdk .\php-sdk\phpsdk-vs16-x64.bat -t .\aws-crt-php\win_build.bat - # windows-vc14: - # runs-on: windows-latest - # strategy: - # matrix: - # arch: [x86, x64] - # steps: - # - uses: ilammy/msvc-dev-cmd@v1 - # with: - # toolset: 14.0 - # arch: ${{ matrix.arch }} - # uwp: false - # spectre: true - # - name: Build ${{ env.PACKAGE_NAME }} + consumers - # run: | - # 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 diff --git a/win_build.bat b/win_build.bat index d1e378e..3bd7660 100644 --- a/win_build.bat +++ b/win_build.bat @@ -16,4 +16,6 @@ call buildconf call configure --enable-cli --with-openssl --enable-awscrt=shared -call nmake \ No newline at end of file +call nmake + +call nmake test-awscrt \ No newline at end of file