Skip to content

Commit 0d0e3ea

Browse files
authored
chore: remove Nix and replace with shivammathur/setup-php in CI (#211)
* chore: remove Nix and replace with shivammathur/setup-php in CI Nix added complexity and slow build times to the CI pipeline. All workflows now use shivammathur/setup-php for PHP provisioning, which is the standard approach for PHP projects on GitHub Actions. * chore(ci): update workflows to use PHP 8.4 and adjust compatibility * chore(ci): update PHP extensions and enable xdebug for coverage
1 parent 19c774f commit 0d0e3ea

10 files changed

Lines changed: 37 additions & 511 deletions

File tree

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ charset = utf-8
1111
trim_trailing_whitespace = true
1212
insert_final_newline = true
1313

14-
[*.{nix,yml,yaml,yml.dist,md}]
14+
[*.{yml,yaml,yml.dist,md}]
1515
indent_size = 2
1616

1717
[*.neon]

.envrc

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 16 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,8 @@ on:
77
concurrency:
88
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
99
cancel-in-progress: true
10+
# TODO: Add PHP 8.5 to the matrix once ext-grpc is compatible with it
1011
jobs:
11-
flake-check:
12-
name: Flake check
13-
runs-on: ubuntu-latest
14-
timeout-minutes: 20
15-
steps:
16-
- name: Checkout
17-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18-
- name: Install Nix
19-
uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22
20-
- name: Setup Cachix
21-
uses: cachix/cachix-action@1eb2ef646ac0255473d23a5907ad7b04ce94065c # v17
22-
with:
23-
name: opentelemetry
24-
extraPullNames: nix-shell, php-src-nix
25-
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
26-
- name: Setup Nix magic cache
27-
uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13
28-
- name: Run Nix Flake check
29-
run: nix flake check
3012
php-cs-fixer:
3113
name: PHP CS Fixer (PHP ${{ matrix.php }})
3214
runs-on: ubuntu-latest
@@ -37,23 +19,16 @@ jobs:
3719
- '8.2'
3820
- '8.3'
3921
- '8.4'
40-
- '8.5'
4122
fail-fast: false
4223
steps:
4324
- name: Checkout
4425
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
45-
- name: Install Nix
46-
uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22
47-
- name: Setup Cachix
48-
uses: cachix/cachix-action@1eb2ef646ac0255473d23a5907ad7b04ce94065c # v17
26+
- name: Setup PHP
27+
uses: shivammathur/setup-php@fcafdd6392932010c2bd5094439b8e33be2a8a09 # v2.37.0
4928
with:
50-
name: opentelemetry
51-
extraPullNames: nix-shell, php-src-nix
52-
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
53-
- name: Setup Nix magic cache
54-
uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13
55-
- name: Instantiate Nix develop
56-
uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1
29+
php-version: ${{ matrix.php }}
30+
extensions: mbstring
31+
coverage: none
5732
- name: Get composer cache directory
5833
id: composercache
5934
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
@@ -63,8 +38,6 @@ jobs:
6338
path: ${{ steps.composercache.outputs.dir }}
6439
key: ${{ runner.os }}-composer-tools-php-cs-fixer-${{ hashFiles('**/composer.json') }}
6540
restore-keys: ${{ runner.os }}-composer-tools-php-cs-fixer
66-
- name: List PHP installed extensions
67-
run: php -m
6841
- name: Install PHP CS Fixer dependencies
6942
run: cd tools/php-cs-fixer && composer update --no-interaction --no-progress --ansi
7043
- name: Run PHP-CS-Fixer fix
@@ -79,23 +52,16 @@ jobs:
7952
- '8.2'
8053
- '8.3'
8154
- '8.4'
82-
- '8.5'
8355
fail-fast: false
8456
steps:
8557
- name: Checkout
8658
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
87-
- name: Install Nix
88-
uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22
89-
- name: Setup Cachix
90-
uses: cachix/cachix-action@1eb2ef646ac0255473d23a5907ad7b04ce94065c # v17
59+
- name: Setup PHP
60+
uses: shivammathur/setup-php@fcafdd6392932010c2bd5094439b8e33be2a8a09 # v2.37.0
9161
with:
92-
name: opentelemetry
93-
extraPullNames: nix-shell, php-src-nix
94-
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
95-
- name: Setup Nix magic cache
96-
uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13
97-
- name: Instantiate Nix develop
98-
uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1
62+
php-version: ${{ matrix.php }}
63+
extensions: grpc, mbstring, opentelemetry, pdo, pdo_sqlite
64+
coverage: xdebug
9965
- name: Get composer cache directory
10066
id: composercache
10167
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
@@ -105,8 +71,6 @@ jobs:
10571
path: ${{ steps.composercache.outputs.dir }}
10672
key: ${{ runner.os }}-composer-tools-phpstan-${{ hashFiles('**/composer.json') }}
10773
restore-keys: ${{ runner.os }}-composer-tools-phpstan
108-
- name: List PHP installed extensions
109-
run: php -m
11074
- name: Install PHPStan dependencies
11175
run: |
11276
composer update --no-interaction --no-progress --ansi
@@ -134,13 +98,9 @@ jobs:
13498
- '8.2'
13599
- '8.3'
136100
- '8.4'
137-
- '8.5'
138101
dependencies:
139102
- 'highest'
140103
include:
141-
- php: '8.5'
142-
dependencies: 'highest'
143-
coverage: true
144104
- php: '8.4'
145105
dependencies: 'highest'
146106
coverage: true
@@ -154,18 +114,12 @@ jobs:
154114
steps:
155115
- name: Checkout
156116
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
157-
- name: Install Nix
158-
uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22
159-
- name: Setup Cachix
160-
uses: cachix/cachix-action@1eb2ef646ac0255473d23a5907ad7b04ce94065c # v17
117+
- name: Setup PHP
118+
uses: shivammathur/setup-php@fcafdd6392932010c2bd5094439b8e33be2a8a09 # v2.37.0
161119
with:
162-
name: opentelemetry
163-
extraPullNames: nix-shell, php-src-nix
164-
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
165-
- name: Setup Nix magic cache
166-
uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13
167-
- name: Instantiate Nix develop
168-
uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1
120+
php-version: ${{ matrix.php }}
121+
extensions: grpc, mbstring, opentelemetry, pdo, pdo_sqlite
122+
coverage: xdebug
169123
- name: Get composer cache directory
170124
id: composercache
171125
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

.github/workflows/docs.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,12 @@ jobs:
1212
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1313
with:
1414
fetch-depth: 0
15-
- name: Install Nix
16-
uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22
17-
- name: Setup Cachix
18-
uses: cachix/cachix-action@1eb2ef646ac0255473d23a5907ad7b04ce94065c # v17
15+
- name: Setup PHP
16+
uses: shivammathur/setup-php@fcafdd6392932010c2bd5094439b8e33be2a8a09 # v2.37.0
1917
with:
20-
name: opentelemetry
21-
extraPullNames: nix-shell, php-src-nix
22-
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
23-
- name: Setup Nix magic cache
24-
uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13
25-
- name: Instantiate Nix develop
26-
uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1
18+
php-version: '8.4'
19+
extensions: mbstring, pdo, pdo_sqlite
20+
coverage: none
2721
- name: Get composer cache directory
2822
id: composercache
2923
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

.github/workflows/fossa-scan.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,12 @@ jobs:
99
steps:
1010
- name: Checkout
1111
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
12-
- name: Install Nix
13-
uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22
14-
- name: Setup Cachix
15-
uses: cachix/cachix-action@1eb2ef646ac0255473d23a5907ad7b04ce94065c # v17
12+
- name: Setup PHP
13+
uses: shivammathur/setup-php@fcafdd6392932010c2bd5094439b8e33be2a8a09 # v2.37.0
1614
with:
17-
name: opentelemetry
18-
extraPullNames: nix-shell, php-src-nix
19-
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
20-
- name: Setup Nix magic cache
21-
uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13
22-
- name: Instantiate Nix develop
23-
uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1
15+
php-version: '8.4'
16+
extensions: grpc, mbstring, opentelemetry, pdo, pdo_sqlite
17+
coverage: xdebug
2418
- name: Get composer cache directory
2519
id: composercache
2620
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

.github/workflows/update-flake-lock.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.gitignore

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
vendor
22
composer.lock
3-
.direnv
43
.idea
4+
.DS_Store
55

66
.phpstan
77

@@ -14,9 +14,15 @@ coverage
1414

1515
var
1616

17-
.pre-commit-config.yaml
18-
1917
docs/node_modules
2018
docs/src/.vuepress/dist
2119
docs/src/reference.yaml
22-
/tests/Functional/Application/config/reference.php
20+
21+
tests/Functional/Application/config/reference.php
22+
23+
AGENTS.md
24+
CLAUDE.md
25+
.claude
26+
GEMINI.md
27+
.gemini
28+

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
[![Codecov: Coverage][codecov-badge]][codecov-page]
66
[![Coveralls: Coverage][coveralls-badge]][coveralls-page]
77
[![Project stage: Development][project-stage-badge]][project-stage-page]
8-
[![Built with Nix][build-with-nix-badge]][build-with-nix-page]
98
[![FOSSA Status][fossa-status-badge]][fossa-status-page]
109
[![Packagist Version][packagist-version-badge]][packagist-page]
1110
[![Packagist Downloads][packagist-downloads-badge]][packagist-page]
@@ -100,8 +99,6 @@ All the code in this repository is released under the MIT License, for more info
10099
[codecov-page]: https://codecov.io/gh/FriendsOfOpenTelemetry/opentelemetry-bundle
101100
[coveralls-badge]: https://img.shields.io/coverallsCoverage/github/FriendsOfOpenTelemetry/opentelemetry-bundle?logo=coveralls&label=coveralls
102101
[coveralls-page]: https://coveralls.io/github/FriendsOfOpenTelemetry/opentelemetry-bundle
103-
[build-with-nix-badge]: https://img.shields.io/badge/Built_With-Nix-5277C3.svg?logo=nixos
104-
[build-with-nix-page]: https://builtwithnix.org/
105102
[project-stage-badge]: https://img.shields.io/badge/Project_Stage-Development-yellowgreen.svg
106103
[project-stage-page]: https://blog.pother.ca/project-stages/
107104
[fossa-status-badge]: https://app.fossa.com/api/projects/custom%2B42279%2Fgithub.com%2FFriendsOfOpenTelemetry%2Fopentelemetry-bundle.svg?type=shield

0 commit comments

Comments
 (0)