From 130ad6f2c9bbf7aad4504129fb18c3f2360022dc Mon Sep 17 00:00:00 2001 From: Anton Vasiliev <1695147@gmail.com> Date: Sun, 2 Jun 2024 16:20:41 +0100 Subject: [PATCH 01/10] #151 - Add '--ignore-errors' flag --- coverage.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coverage.mk b/coverage.mk index 8deade25..c9dfc949 100644 --- a/coverage.mk +++ b/coverage.mk @@ -9,7 +9,7 @@ clean-coverage: .PHONY: coverage-initial coverage-initial: clean-coverage @$(LCOV) -d . -z - @$(LCOV) -d . -c --compat-libtool -i -o $(LCOV_REPORT) + @$(LCOV) -d . -c --ignore-errors range,unused --compat-libtool -i -o $(LCOV_REPORT) .PHONY: coverage-capture coverage-capture: From 717e0a604e9a881cf28aff0e413f169236c46491 Mon Sep 17 00:00:00 2001 From: Anton Vasiliev <1695147@gmail.com> Date: Sun, 2 Jun 2024 16:21:08 +0100 Subject: [PATCH 02/10] #151 - Remove unused 'install-re2c.sh' bash script --- .ci/install-re2c.sh | 111 -------------------------------------------- 1 file changed, 111 deletions(-) delete mode 100755 .ci/install-re2c.sh diff --git a/.ci/install-re2c.sh b/.ci/install-re2c.sh deleted file mode 100755 index 78aa3bf1..00000000 --- a/.ci/install-re2c.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env bash -# -# This file is part of the Zephir Parser. -# -# (c) Zephir Team -# -# For the full copyright and license information, please view -# the LICENSE file that was distributed with this source code. - -if [ -z ${RE2C_VERSION+x} ]; then - >&2 echo "The RE2C_VERSION value is not set. Stop." - exit 1 -fi - -if [ "${RE2C_VERSION}" == "system" ]; then - echo "Use system re2c. Skip." - exit 0 -fi - -# From https://stackoverflow.com/a/4025065 -vercomp () { - if [[ $1 == $2 ]] - then - return 0 - fi - local IFS=. - local i ver1=($1) ver2=($2) - # fill empty fields in ver1 with zeros - for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)) - do - ver1[i]=0 - done - for ((i=0; i<${#ver1[@]}; i++)) - do - if [[ -z ${ver2[i]} ]] - then - # fill empty fields in ver2 with zeros - ver2[i]=0 - fi - if ((10#${ver1[i]} > 10#${ver2[i]})) - then - return 1 - fi - if ((10#${ver1[i]} < 10#${ver2[i]})) - then - return 2 - fi - done - return 0 -} - -ext='tar.xz' -vercomp "$RE2C_VERSION" '1.2' - -case $? in - 2) ext='tar.gz';; -esac - -pkgname=re2c -source="https://github.com/skvadrik/${pkgname}/releases/download/${RE2C_VERSION}/${pkgname}-${RE2C_VERSION}.${ext}" -downloadfile="${pkgname}-${RE2C_VERSION}.${ext}" -prefix="${HOME}/.local/opt/${pkgname}/${pkgname}-${RE2C_VERSION}" -bindir="${prefix}/bin" - -if [ ! -f "$bindir/re2c" ]; then - if [ ! -d "$(dirname "$HOME/.cache/$pkgname")" ]; then - mkdir -p "$(dirname "$HOME/.cache/$pkgname")" - fi - - cd "$(dirname "$HOME/.cache/$pkgname")" || exit 1 - - if [ ! -f "$downloadfile" ]; then - echo "curl -sSL --fail-early '$source' -o '${pkgname}-${RE2C_VERSION}.${ext}'" - curl -sSL --fail-early "$source" -o "${pkgname}-${RE2C_VERSION}.${ext}" - fi - - if [ ! -f "$downloadfile" ]; then - >&2 echo "Unable to locate $downloadfile file. Abort..." - exit 1 - else - file "$downloadfile" - fi - - tar -xf "$downloadfile" || exit 1 - - if [ ! -d "${pkgname}-${RE2C_VERSION}" ]; then - >&2 echo "Unable to locate re2c source files. Abort..." - exit 1 - fi - - if [ ! -d "$prefix" ]; then - mkdir -p "$prefix" - fi - - cd "${pkgname}-${RE2C_VERSION}" || exit 1 - ./configure --prefix="$prefix" - - make -j"$(getconf _NPROCESSORS_ONLN)" - make install -fi - -if [ ! -x "$bindir/re2c" ]; then - >&2 echo "Unable to locate re2c executable. Abort..." - exit 1 -fi - -mkdir -p "$HOME/bin" -ln -s "$bindir/re2c" "$HOME/bin/re2c" - -re2c --version -exit 0 From ba8312f6b6444423c3c229aedcabbc6954d00451 Mon Sep 17 00:00:00 2001 From: Anton Vasiliev <1695147@gmail.com> Date: Sun, 2 Jun 2024 16:23:39 +0100 Subject: [PATCH 03/10] #151 - Remove '--ignore-errors' flag --- coverage.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coverage.mk b/coverage.mk index c9dfc949..8deade25 100644 --- a/coverage.mk +++ b/coverage.mk @@ -9,7 +9,7 @@ clean-coverage: .PHONY: coverage-initial coverage-initial: clean-coverage @$(LCOV) -d . -z - @$(LCOV) -d . -c --ignore-errors range,unused --compat-libtool -i -o $(LCOV_REPORT) + @$(LCOV) -d . -c --compat-libtool -i -o $(LCOV_REPORT) .PHONY: coverage-capture coverage-capture: From 6bddfc343360709f2b029e751c35ef15a5fc1924 Mon Sep 17 00:00:00 2001 From: Anton Vasiliev <1695147@gmail.com> Date: Sun, 2 Jun 2024 16:24:15 +0100 Subject: [PATCH 04/10] #151 - Disable ccov on MacOS --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3aa163eb..ab6383f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: # Linux - { name: ubuntu-gcc, os: ubuntu-latest, compiler: gcc, ccov: 'ON' } # macOS - - { name: macos-clang, os: macos-12, compiler: clang, ccov: 'ON' } + - { name: macos-clang, os: macos-12, compiler: clang, ccov: 'OFF' } # Windows - { php: '7.0', ts: 'nts', arch: 'x64', name: 'windows2019-vc14', os: 'windows-2019', compiler: 'vc14', ccov: 'OFF' } - { php: '7.0', ts: 'ts', arch: 'x64', name: 'windows2019-vc14', os: 'windows-2019', compiler: 'vc14', ccov: 'OFF' } From e5fee0da04acde62f94ff3717b94012d231f47fa Mon Sep 17 00:00:00 2001 From: Anton Vasiliev <1695147@gmail.com> Date: Sun, 2 Jun 2024 17:48:05 +0100 Subject: [PATCH 05/10] #151 - Bump to `v4` --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab6383f2..e92e4808 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -141,7 +141,7 @@ jobs: # zephir_parser-php-7.3-nts-ubuntu-gcc-x64.zip # zephir_parser-php-7.3-nts-windows2019-vc15-x64.zip - name: Upload Zephir Parser - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: zephir_parser-php-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.name }}-${{ matrix.arch }}.zip path: | @@ -165,7 +165,7 @@ jobs: - name: Upload Code Coverage Report if: matrix.ccov == 'ON' - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./lcov.info @@ -173,7 +173,7 @@ jobs: - name: Upload Info for Debug on Fail if: failure() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: retention-days: 2 name: debug-zephir_parser-php-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.name }}-${{ matrix.arch }} @@ -244,7 +244,7 @@ jobs: pecl info zephir_parser-pecl.tgz - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: 'zephir_parser-pecl' path: zephir_parser-pecl.tgz @@ -269,7 +269,7 @@ jobs: - name: Download Zephir Parser build artifacts id: download - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: ./build-artifacts From fb6878b375676e3c76a37fb0be424ba7eb0d5d06 Mon Sep 17 00:00:00 2001 From: Anton Vasiliev <1695147@gmail.com> Date: Sun, 2 Jun 2024 17:48:25 +0100 Subject: [PATCH 06/10] #151 - Set PHP version to '8.3' --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e92e4808..aa7dc91f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -193,7 +193,7 @@ jobs: - name: Install PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.3' tools: pecl - name: Install System Dependencies From dbad1b7c6260c47781afbdf9be10213b1ac82625 Mon Sep 17 00:00:00 2001 From: Anton Vasiliev <1695147@gmail.com> Date: Sun, 2 Jun 2024 19:10:22 +0100 Subject: [PATCH 07/10] #151 - Lock action with specific commit --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa7dc91f..e337c046 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -191,7 +191,7 @@ jobs: - uses: actions/checkout@v4 - name: Install PHP - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@fc14643b0a99ee9db10a3c025a33d76544fa3761 with: php-version: '8.3' tools: pecl From f9f66a925f1d5899476bfe86add8e2801152df73 Mon Sep 17 00:00:00 2001 From: Anton Vasiliev <1695147@gmail.com> Date: Sun, 2 Jun 2024 22:49:45 +0100 Subject: [PATCH 08/10] #151 - Lock action with specific commit --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e337c046..969fe9cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: - uses: actions/checkout@v4 - name: Install PHP ${{ matrix.php }} - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@fc14643b0a99ee9db10a3c025a33d76544fa3761 with: php-version: '${{ matrix.php }}' coverage: none From 8bc7dc215773d488443c816731c233c4e2518472 Mon Sep 17 00:00:00 2001 From: Anton Vasiliev Date: Mon, 3 Jun 2024 10:42:58 +0100 Subject: [PATCH 09/10] #151 - Change to `v2` --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 969fe9cd..e337c046 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: - uses: actions/checkout@v4 - name: Install PHP ${{ matrix.php }} - uses: shivammathur/setup-php@fc14643b0a99ee9db10a3c025a33d76544fa3761 + uses: shivammathur/setup-php@v2 with: php-version: '${{ matrix.php }}' coverage: none From 41d9d491b709047b041c816d961ebcf3e5acf19a Mon Sep 17 00:00:00 2001 From: Anton Vasiliev Date: Mon, 3 Jun 2024 19:18:37 +0100 Subject: [PATCH 10/10] #151 - Change to v2 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e337c046..aa7dc91f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -191,7 +191,7 @@ jobs: - uses: actions/checkout@v4 - name: Install PHP - uses: shivammathur/setup-php@fc14643b0a99ee9db10a3c025a33d76544fa3761 + uses: shivammathur/setup-php@v2 with: php-version: '8.3' tools: pecl