Add GB18030-2022 to default encoding list for zh-CN (#20604) #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Unit Tests | |
| on: | |
| push: | |
| paths: | |
| - 'main/network.c' | |
| - 'tests/unit/**' | |
| - '.github/workflows/unit-tests.yml' | |
| branches: | |
| - master | |
| pull_request: | |
| paths: | |
| - 'main/network.c' | |
| - 'tests/unit/**' | |
| - '.github/workflows/unit-tests.yml' | |
| branches: | |
| - '**' | |
| workflow_dispatch: ~ | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.url || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| CC: ccache gcc | |
| CXX: ccache g++ | |
| jobs: | |
| UNIT_TESTS: | |
| if: github.repository == 'php/php-src' || github.event_name == 'pull_request' | |
| name: UNIT_TESTS_LINUX_X64 | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| steps: | |
| - name: git checkout | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| set -x | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libcmocka-dev \ | |
| autoconf \ | |
| gcc \ | |
| make \ | |
| unzip \ | |
| bison \ | |
| re2c \ | |
| locales \ | |
| ccache | |
| - name: ccache | |
| uses: hendrikmuhs/[email protected] | |
| with: | |
| key: "unit-tests-${{hashFiles('main/php_version.h')}}" | |
| append-timestamp: false | |
| save: ${{ github.event_name != 'pull_request' }} | |
| - name: ./configure (minimal build) | |
| uses: ./.github/actions/configure-unit-tests | |
| - name: make libphp.a | |
| run: | | |
| set -x | |
| make -j$(/usr/bin/nproc) >/dev/null | |
| - name: Run unit tests | |
| run: | | |
| set -x | |
| cd tests/unit | |
| make test | |