diff options
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/builds.yml | 26 | ||||
| -rw-r--r-- | .github/workflows/codeql-analysis.yml | 45 | ||||
| -rw-r--r-- | .github/workflows/coverity.yml | 43 | ||||
| -rw-r--r-- | .github/workflows/distributions.yml | 68 |
4 files changed, 102 insertions, 80 deletions
diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index a85c2e8..706238d 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml | |||
| @@ -11,26 +11,26 @@ jobs: | |||
| 11 | strategy: | 11 | strategy: |
| 12 | matrix: | 12 | matrix: |
| 13 | container: | 13 | container: |
| 14 | - php:7.0 | 14 | - php:8.1 |
| 15 | - php:7.1 | ||
| 16 | - php:7.2 | ||
| 17 | - php:7.3 | ||
| 18 | - php:7.4 | ||
| 19 | - php:8.0 | 15 | - php:8.0 |
| 16 | - php:7.4 | ||
| 17 | - php:7.3 | ||
| 20 | container: ${{ matrix.container }} | 18 | container: ${{ matrix.container }} |
| 21 | steps: | 19 | steps: |
| 22 | - name: Checkout code | 20 | - name: Checkout code |
| 23 | uses: actions/checkout@v2 | 21 | uses: actions/checkout@v2 |
| 24 | - name: Install pecl | 22 | - name: PHP 7 env setup |
| 25 | if: startsWith(matrix.container, 'php:7') | 23 | if: startsWith(matrix.container, 'php:7') |
| 26 | run: pecl install vld-beta | 24 | run: | |
| 27 | - name: Remove php8 tests on php7 | 25 | pecl install vld-beta |
| 28 | if: startsWith(matrix.container, 'php:7') | 26 | rm -rf src/tests/*php8*/ src/tests/*/*_php8.phpt |
| 29 | run: rm -rf src/tests/*php8*/ | ||
| 30 | - name: Build and run the testsuite | 27 | - name: Build and run the testsuite |
| 31 | run: make tests | 28 | run: | |
| 29 | make release | ||
| 30 | ln -s $(php -r 'echo ini_get("extension_dir");')/* src/modules/ | ||
| 31 | rm -f src/tests/disable_function/*_signal.phpt | ||
| 32 | make tests | ||
| 32 | - name: Show logs in case of failure | 33 | - name: Show logs in case of failure |
| 33 | if: ${{ failure() }} | 34 | if: ${{ failure() }} |
| 34 | run: | | 35 | run: | |
| 35 | grep -r . ./src/tests/*/*.out | 36 | grep -r . --include='*.log' src/tests |
| 36 | grep -r . ./src/tests/*/*.diff | ||
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..7b3b6fd --- /dev/null +++ b/.github/workflows/codeql-analysis.yml | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | name: "CodeQL" | ||
| 2 | |||
| 3 | on: | ||
| 4 | push: | ||
| 5 | branches: [ master ] | ||
| 6 | pull_request: | ||
| 7 | # The branches below must be a subset of the branches above | ||
| 8 | branches: [ master ] | ||
| 9 | schedule: | ||
| 10 | - cron: '37 5 * * 3' | ||
| 11 | |||
| 12 | jobs: | ||
| 13 | analyze: | ||
| 14 | name: Analyze | ||
| 15 | runs-on: ubuntu-latest | ||
| 16 | container: php:latest | ||
| 17 | permissions: | ||
| 18 | actions: read | ||
| 19 | contents: read | ||
| 20 | security-events: write | ||
| 21 | |||
| 22 | strategy: | ||
| 23 | fail-fast: false | ||
| 24 | matrix: | ||
| 25 | language: [ 'cpp' ] | ||
| 26 | |||
| 27 | steps: | ||
| 28 | - name: Checkout repository | ||
| 29 | uses: actions/checkout@v2 | ||
| 30 | |||
| 31 | # Initializes the CodeQL tools for scanning. | ||
| 32 | - name: Initialize CodeQL | ||
| 33 | uses: github/codeql-action/init@v1 | ||
| 34 | with: | ||
| 35 | languages: ${{ matrix.language }} | ||
| 36 | # If you wish to specify custom queries, you can do so here or in a config file. | ||
| 37 | # By default, queries listed here will override any specified in a config file. | ||
| 38 | # Prefix the list here with "+" to use these queries and those in the config file. | ||
| 39 | # queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
| 40 | |||
| 41 | - run: | | ||
| 42 | make release | ||
| 43 | |||
| 44 | - name: Perform CodeQL Analysis | ||
| 45 | uses: github/codeql-action/analyze@v1 | ||
diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml deleted file mode 100644 index d83aa9f..0000000 --- a/.github/workflows/coverity.yml +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | name: Coverity scan | ||
| 2 | on: | ||
| 3 | schedule: | ||
| 4 | - cron: '0 18 * * 1' # Weekly at 18:00 UTC on Mondays | ||
| 5 | |||
| 6 | jobs: | ||
| 7 | latest: | ||
| 8 | runs-on: ubuntu-latest | ||
| 9 | container: debian:stable | ||
| 10 | steps: | ||
| 11 | - name: Checkout code | ||
| 12 | uses: actions/checkout@v2 | ||
| 13 | - name: Install dependencies | ||
| 14 | run: | | ||
| 15 | apt update | ||
| 16 | DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends php-dev curl ca-certificates make gcc | ||
| 17 | - name: Remove php8 tests on php7 | ||
| 18 | run: rm -rf src/tests/*php8*/ | ||
| 19 | - name: Download Coverity Build Tool | ||
| 20 | run: | | ||
| 21 | curl https://scan.coverity.com/download/linux64 --form token=$TOKEN --form project=jvoisin/snuffleupagus -o cov-analysis-linux64.tar.gz | ||
| 22 | mkdir cov-analysis-linux64 | ||
| 23 | tar xzf cov-analysis-linux64.tar.gz --strip-components=1 -C cov-analysis-linux64 | ||
| 24 | env: | ||
| 25 | TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} | ||
| 26 | - name: Configure | ||
| 27 | run: cd src; phpize; ./configure --enable-snuffleupagus; cd - | ||
| 28 | - name: Build with cov-build | ||
| 29 | run: ./cov-analysis-linux64/bin/cov-build --dir cov-int make compile_debug | ||
| 30 | - name: Submit the result to Coverity Scan | ||
| 31 | run: | | ||
| 32 | tar czf snuffleupagus.tgz cov-int | ||
| 33 | curl \ | ||
| 34 | --form project=jvoisin/snuffleupagus \ | ||
| 35 | --form token=$TOKEN \ | ||
| 36 | --form file=@snuffleupagus.tgz \ | ||
| 37 | --form version=master \ | ||
| 38 | --form email=julien.voisin+coverity@dustri.org \ | ||
| 39 | --form description=master \ | ||
| 40 | https://scan.coverity.com/builds?project=jvoisin/snuffleupagus | ||
| 41 | env: | ||
| 42 | TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} | ||
| 43 | |||
diff --git a/.github/workflows/distributions.yml b/.github/workflows/distributions.yml index bbfc8fc..18a8cce 100644 --- a/.github/workflows/distributions.yml +++ b/.github/workflows/distributions.yml | |||
| @@ -14,7 +14,7 @@ jobs: | |||
| 14 | - name: Checkout code | 14 | - name: Checkout code |
| 15 | uses: actions/checkout@v2 | 15 | uses: actions/checkout@v2 |
| 16 | - name: Remove php8 tests for php7 | 16 | - name: Remove php8 tests for php7 |
| 17 | run: rm -rf src/tests/*php8*/ | 17 | run: rm -rf src/tests/*php8*/ src/tests/*/*_php8.phpt src/tests/disable_function/*_signal.phpt |
| 18 | - name: Install dependencies | 18 | - name: Install dependencies |
| 19 | run: | | 19 | run: | |
| 20 | apt update | 20 | apt update |
| @@ -22,12 +22,11 @@ jobs: | |||
| 22 | - name: Install pecl | 22 | - name: Install pecl |
| 23 | run: pecl install vld-beta | 23 | run: pecl install vld-beta |
| 24 | - name: Build and run the testsuite | 24 | - name: Build and run the testsuite |
| 25 | run: make tests | 25 | run: make release tests |
| 26 | - name: Show logs in case of failure | 26 | - name: Show logs in case of failure |
| 27 | if: ${{ failure() }} | 27 | if: ${{ failure() }} |
| 28 | run: | | 28 | run: | |
| 29 | grep -r . ./src/tests/*/*.out | 29 | grep -r . --include='*.log' src/tests |
| 30 | grep -r . ./src/tests/*/*.diff | ||
| 31 | 30 | ||
| 32 | fedora: | 31 | fedora: |
| 33 | runs-on: ubuntu-latest | 32 | runs-on: ubuntu-latest |
| @@ -36,19 +35,18 @@ jobs: | |||
| 36 | - name: Checkout code | 35 | - name: Checkout code |
| 37 | uses: actions/checkout@v2 | 36 | uses: actions/checkout@v2 |
| 38 | - name: Remove php8 tests for php7 | 37 | - name: Remove php8 tests for php7 |
| 39 | run: rm -rf src/tests/*php8*/ | 38 | run: rm -rf src/tests/*php8*/ src/tests/*/*_php8.phpt src/tests/disable_function/*_signal.phpt |
| 40 | - name: Install dependencies | 39 | - name: Install dependencies |
| 41 | run: | | 40 | run: | |
| 42 | dnf install -y php-devel php-pear make | 41 | dnf install -y php-devel php-pear make |
| 43 | - name: Install pecl | 42 | - name: Install pecl |
| 44 | run: pecl install vld-beta | 43 | run: pecl install vld-beta |
| 45 | - name: Build and run the testsuite | 44 | - name: Build and run the testsuite |
| 46 | run: make tests | 45 | run: make release tests |
| 47 | - name: Show logs in case of failure | 46 | - name: Show logs in case of failure |
| 48 | if: ${{ failure() }} | 47 | if: ${{ failure() }} |
| 49 | run: | | 48 | run: | |
| 50 | grep -r . ./src/tests/*/*.out | 49 | grep -r . --include='*.log' src/tests |
| 51 | grep -r . ./src/tests/*/*.diff | ||
| 52 | 50 | ||
| 53 | ubuntu: | 51 | ubuntu: |
| 54 | runs-on: ubuntu-latest | 52 | runs-on: ubuntu-latest |
| @@ -57,7 +55,7 @@ jobs: | |||
| 57 | - name: Checkout code | 55 | - name: Checkout code |
| 58 | uses: actions/checkout@v2 | 56 | uses: actions/checkout@v2 |
| 59 | - name: Remove php8 tests for php7 | 57 | - name: Remove php8 tests for php7 |
| 60 | run: rm -rf src/tests/*php8*/ | 58 | run: rm -rf src/tests/*php8*/ src/tests/*/*_php8.phpt |
| 61 | - name: Install dependencies | 59 | - name: Install dependencies |
| 62 | run: | | 60 | run: | |
| 63 | apt update | 61 | apt update |
| @@ -69,8 +67,7 @@ jobs: | |||
| 69 | - name: Show logs in case of failure | 67 | - name: Show logs in case of failure |
| 70 | if: ${{ failure() }} | 68 | if: ${{ failure() }} |
| 71 | run: | | 69 | run: | |
| 72 | grep -r . ./src/tests/*/*.out | 70 | grep -r . --include='*.log' src/tests |
| 73 | grep -r . ./src/tests/*/*.diff | ||
| 74 | 71 | ||
| 75 | archlinux: | 72 | archlinux: |
| 76 | runs-on: ubuntu-latest | 73 | runs-on: ubuntu-latest |
| @@ -79,7 +76,7 @@ jobs: | |||
| 79 | - name: Checkout code | 76 | - name: Checkout code |
| 80 | uses: actions/checkout@v2 | 77 | uses: actions/checkout@v2 |
| 81 | - name: Remove php8 tests for php7 | 78 | - name: Remove php8 tests for php7 |
| 82 | run: rm -rf src/tests/*php8*/ | 79 | run: rm -rf src/tests/*php8*/ src/tests/*/*_php8.phpt |
| 83 | - name: Install dependencies | 80 | - name: Install dependencies |
| 84 | continue-on-error: true | 81 | continue-on-error: true |
| 85 | run: | | 82 | run: | |
| @@ -89,37 +86,60 @@ jobs: | |||
| 89 | - name: Install pecl | 86 | - name: Install pecl |
| 90 | continue-on-error: true | 87 | continue-on-error: true |
| 91 | run: pecl install vld-beta | 88 | run: pecl install vld-beta |
| 92 | - name: Build and run the testsuite | 89 | - name: Build SP and run the testsuite |
| 93 | continue-on-error: true | 90 | continue-on-error: true |
| 94 | run: make tests | 91 | run: make tests |
| 95 | - name: Show logs in case of failure | 92 | - name: Show logs in case of failure |
| 96 | continue-on-error: true | 93 | continue-on-error: true |
| 97 | if: ${{ failure() }} | 94 | if: ${{ failure() }} |
| 98 | run: | | 95 | run: | |
| 99 | grep -r . ./src/tests/*/*.out | 96 | grep -r . --include='*.log' src/tests |
| 100 | grep -r . ./src/tests/*/*.diff | ||
| 101 | 97 | ||
| 102 | alpine: | 98 | alpine: |
| 103 | runs-on: ubuntu-latest | 99 | runs-on: ubuntu-latest |
| 104 | container: alpine:edge | 100 | container: alpine:latest |
| 105 | steps: | 101 | steps: |
| 106 | - name: Checkout code | 102 | - name: Checkout code |
| 107 | uses: actions/checkout@v2 | 103 | uses: actions/checkout@v2 |
| 108 | - name: Remove php8 tests for php7 | 104 | - name: Remove php8 tests for php7 |
| 109 | run: rm -rf src/tests/*php8*/ | 105 | run: rm -rf src/tests/*php8*/ src/tests/*/*_php8.phpt |
| 110 | - name: Remove tests failing on alpine for wathever reason | 106 | - name: Remove tests failing on alpine for wathever reason |
| 111 | run: rm -rf src/tests/*session*/ src/tests/broken_configuration/ src/tests/*cookie* src/tests/upload_validation/ | 107 | run: rm -rf src/tests/cookies_encryption_warning src/tests/upload_validation/upload_validation.phpt /tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt |
| 112 | - name: Install dependencies | 108 | - name: Install dependencies |
| 113 | run: apk add php7-dev php7-cgi php7-simplexml php7-xml pcre-dev build-base php7-pear php7-openssl | 109 | run: apk add php7-dev php7-cgi php7-simplexml php7-xml pcre-dev build-base php7-pear php7-openssl php7-session bash grep |
| 114 | - name: Install pecl | 110 | - name: Install pecl |
| 115 | continue-on-error: true | 111 | continue-on-error: true |
| 116 | run: pecl install vld-beta | 112 | run: pecl install vld-beta |
| 117 | - name: Build and run the testsuite | 113 | - name: Build SP and run the testsuite |
| 118 | continue-on-error: true | 114 | run: | |
| 119 | run: make tests | 115 | make release |
| 116 | ln -s $(php -r 'echo ini_get("extension_dir");')/* src/modules/ | ||
| 117 | make tests | ||
| 120 | - name: Show logs in case of failure | 118 | - name: Show logs in case of failure |
| 121 | if: ${{ failure() }} | 119 | if: ${{ failure() }} |
| 120 | run: | | ||
| 121 | grep -r . --include='*.log' src/tests | ||
| 122 | |||
| 123 | ## PHP 8 | ||
| 124 | alpine_php8: | ||
| 125 | runs-on: ubuntu-latest | ||
| 126 | container: alpine:edge | ||
| 127 | steps: | ||
| 128 | - name: Checkout code | ||
| 129 | uses: actions/checkout@v2 | ||
| 130 | - name: Remove tests failing on alpine for wathever reason | ||
| 131 | run: rm -rf src/tests/cookies_encryption_warning src/tests/upload_validation/upload_validation.phpt | ||
| 132 | - name: Install dependencies | ||
| 133 | run: apk add php8-dev php8-cgi php8-simplexml php8-xml pcre-dev build-base php8-pear php8-openssl php8-session php8-curl bash grep | ||
| 134 | - name: Install pecl | ||
| 122 | continue-on-error: true | 135 | continue-on-error: true |
| 136 | run: pecl install vld-beta | ||
| 137 | - name: Build SP and run the testsuite | ||
| 138 | run: | | ||
| 139 | make release | ||
| 140 | ln -s $(php -r 'echo ini_get("extension_dir");')/* src/modules/ | ||
| 141 | make tests | ||
| 142 | - name: Show logs in case of failure | ||
| 143 | if: ${{ failure() }} | ||
| 123 | run: | | 144 | run: | |
| 124 | grep -r . ./src/tests/*/*.out | 145 | grep -r . --include='*.log' src/tests |
| 125 | grep -r . ./src/tests/*/*.diff | ||
