Skip to content

Commit

Permalink
Merge pull request #754 from drupol/creation-of-phar-using-nix
Browse files Browse the repository at this point in the history
Creation of PHAR using Nix, in a reproducible environment
  • Loading branch information
Ocramius authored Dec 20, 2023
2 parents 9903051 + 094d6cd commit 947b074
Show file tree
Hide file tree
Showing 10 changed files with 532 additions and 82 deletions.
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
/.gitignore export-ignore
/box.json.dist export-ignore
/build-phar.sh export-ignore
/composer.lock export-ignore
/infection.json.dist
/infection.json.dist export-ignore
/phpcs.xml.dist export-ignore
/phpunit.xml.dist export-ignore
/psalm.xml export-ignore
Expand Down
37 changes: 4 additions & 33 deletions .github/workflows/release-phar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,47 +15,18 @@ jobs:

strategy:
matrix:
dependencies:
- "locked"
php-version:
- "7.4"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Install PHP"
uses: "shivammathur/[email protected]"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
- uses: DeterminateSystems/nix-installer-action@v9

- name: "Cache dependencies"
uses: "actions/cache@v3"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest"

- name: "Install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
run: "composer install --no-interaction --no-progress --no-suggest"

- name: "build-phar.sh"
run: "build-phar.sh"
- name: "Build PHAR"
run: |
"nix run .#build-phar-script"
- name: "Upload PHAR"
uses: fnkr/[email protected]
Expand Down
6 changes: 3 additions & 3 deletions bin/roave-backward-compatibility-check.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,16 +326,16 @@ static function (string $installationPath) use ($composerIo): Installer {
В Украине сейчас идет война. Силами РФ наносятся удары по гражданской инфраструктуре в [Харькове][1], [Киеве][2], [Чернигове][3], [Сумах][4], [Ирпене][5] и десятках других городов. Гибнут люди - и гражданское население, и военные, в том числе российские призывники, которых бросили воевать. Чтобы лишить собственный народ доступа к информации, правительство РФ запретило называть войну войной, закрыло независимые СМИ и принимает сейчас ряд диктаторских законов. Эти законы призваны заткнуть рот всем, кто против войны. За обычный призыв к миру сейчас можно получить несколько лет тюрьмы.
Не молчите! Молчание - знак вашего согласия с политикой российского правительства.
Не молчите! Молчание - знак вашего согласия с политикой российского правительства.
**Вы можете сделать выбор НЕ МОЛЧАТЬ.**
---
## 🇺🇸 To people of Russia
There is a war in Ukraine right now. The forces of the Russian Federation are attacking civilian infrastructure in [Kharkiv][1], [Kyiv][2], [Chernihiv][3], [Sumy][4], [Irpin][5] and dozens of other cities. People are dying – both civilians and military servicemen, including Russian conscripts who were thrown into the fighting. In order to deprive its own people of access to information, the government of the Russian Federation has forbidden calling a war a war, shut down independent media and is passing a number of dictatorial laws. These laws are meant to silence all those who are against war. You can be jailed for multiple years for simply calling for peace.
There is a war in Ukraine right now. The forces of the Russian Federation are attacking civilian infrastructure in [Kharkiv][1], [Kyiv][2], [Chernihiv][3], [Sumy][4], [Irpin][5] and dozens of other cities. People are dying – both civilians and military, including Russian conscripts who were thrown into the fighting. In order to deprive its own people of access to information, the government of the Russian Federation has forbidden calling a war a war, shut down independent media and is passing a number of dictatorial laws. These laws are meant to silence all those who are against war. You can be jailed for multiple years for simply calling for peace.
Do not be silent! Silence is a sign that you accept the Russian government's policy.
Do not be silent! Silence is a sign that you accept the Russian government's policy.
**You can choose NOT TO BE SILENT.**
[1]: <https://cloudfront-us-east-2.images.arcpublishing.com/reuters/P7K2MSZDGFMIJPDD7CI2GIROJI.jpg> "Kharkiv under attack"
Expand Down
10 changes: 6 additions & 4 deletions box.json.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"alias": "roave-backward-compatibility-check",
"banner": false,
"check-requirements": false,
"compactors": [
"Herrera\\Box\\Compactor\\Php",
"Herrera\\Box\\Compactor\\Json"
"KevinGH\\Box\\Compactor\\Json",
"KevinGH\\Box\\Compactor\\Php"
],
"compression": "GZ",
"main": "bin/roave-backward-compatibility-check.php",
Expand All @@ -10,6 +13,5 @@
"LICENSE",
"vendor/composer/composer/LICENSE"
],
"chmod": "0755",
"git-version": "git-version"
"timestamp": "1970-01-01"
}
19 changes: 0 additions & 19 deletions build-phar.sh

This file was deleted.

3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
"description": "Tool to compare two revisions of a public API to check for BC breaks",
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"ext-json": "*",
"azjezz/psl": "^2.3.1",
"composer/composer": "^2.5.1",
"composer/composer": "^2.6.4",
"nikic/php-parser": "^4.15.3",
"nikolaposa/version": "^4.1.0",
"ocramius/package-versions": "^2.7.0",
Expand Down
36 changes: 18 additions & 18 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 947b074

Please sign in to comment.