Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vimeo/psalm
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6.8.9
Choose a base ref
...
head repository: vimeo/psalm
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6.9.0
Choose a head ref

Commits on Feb 17, 2025

  1. Add docker image

    danog committed Feb 17, 2025
    Copy the full SHA
    ff4a386 View commit details
  2. Add some comments

    danog committed Feb 17, 2025
    Copy the full SHA
    b7bfe47 View commit details

Commits on Feb 20, 2025

  1. Build from scratch

    danog committed Feb 20, 2025
    Copy the full SHA
    a7f3f28 View commit details
  2. Wait for packagist

    danog committed Feb 20, 2025
    Copy the full SHA
    25e1beb View commit details
  3. Split job

    danog committed Feb 20, 2025
    Copy the full SHA
    47fc780 View commit details
  4. Fix

    danog committed Feb 20, 2025
    Copy the full SHA
    fde42c3 View commit details
  5. Fix

    danog committed Feb 20, 2025
    Copy the full SHA
    83fb494 View commit details
  6. Fix

    danog committed Feb 20, 2025
    Copy the full SHA
    d92ed9e View commit details
  7. Fix

    danog committed Feb 20, 2025
    Copy the full SHA
    2b87d8c View commit details
  8. Fix

    danog committed Feb 20, 2025
    Copy the full SHA
    4dbc32b View commit details
  9. Fix

    danog committed Feb 20, 2025
    Copy the full SHA
    68c27ee View commit details
  10. Multiarch builds

    danog committed Feb 20, 2025
    Copy the full SHA
    3adc74f View commit details

Commits on Feb 25, 2025

  1. Copy the full SHA
    e6a769c View commit details
  2. Merge remote-tracking branch 'origin/fix_trait_case_sensitive' into a…

    …dd_docker_image
    Daniil Gentili committed Feb 25, 2025
    Copy the full SHA
    d2dcb70 View commit details
  3. Finalize

    danog committed Feb 25, 2025
    Copy the full SHA
    bafebdd View commit details
  4. Tmp

    danog committed Feb 25, 2025
    Copy the full SHA
    00725b4 View commit details
  5. Cleanup

    danog committed Feb 25, 2025
    Copy the full SHA
    f4decaa View commit details
  6. Copy the full SHA
    21071d2 View commit details
  7. Add labels

    danog committed Feb 25, 2025
    Copy the full SHA
    6e7dafb View commit details
  8. Rm temp

    danog committed Feb 25, 2025
    Copy the full SHA
    6094d9d View commit details
  9. cs-fix

    danog committed Feb 25, 2025
    Copy the full SHA
    9863f01 View commit details

Commits on Feb 26, 2025

  1. fix

    danog committed Feb 26, 2025
    Copy the full SHA
    0b9a972 View commit details

Commits on Mar 14, 2025

  1. Copy the full SHA
    1c0e2a9 View commit details
  2. Temp

    danog committed Mar 14, 2025
    Copy the full SHA
    6aa0974 View commit details
  3. Fix merge

    danog committed Mar 14, 2025
    Copy the full SHA
    d474c2f View commit details
  4. Merge pull request #11307 from vimeo/add_docker_image

    Add docker image
    danog authored Mar 14, 2025
    Copy the full SHA
    ff62d37 View commit details
  5. Tweak triggers

    danog committed Mar 14, 2025
    Copy the full SHA
    cd00957 View commit details
  6. Allow pushing on forks

    danog committed Mar 14, 2025
    Copy the full SHA
    06973ae View commit details
  7. Tmp

    danog committed Mar 14, 2025
    Copy the full SHA
    dc4da2e View commit details
  8. Finalize

    danog committed Mar 14, 2025
    Copy the full SHA
    b27fd58 View commit details
  9. Improve docs

    danog committed Mar 14, 2025
    Copy the full SHA
    84288db View commit details
  10. Finalize

    danog committed Mar 14, 2025
    Copy the full SHA
    dc913ab View commit details

Commits on Mar 16, 2025

  1. Remove memory limit

    danog committed Mar 16, 2025
    Copy the full SHA
    3ed8d83 View commit details
  2. Speed up docker build

    danog committed Mar 16, 2025
    Copy the full SHA
    45aba95 View commit details
  3. First tag

    danog committed Mar 16, 2025
    Copy the full SHA
    c6da845 View commit details
  4. Fix

    danog committed Mar 16, 2025
    Copy the full SHA
    e6fea13 View commit details
  5. Fix

    danog committed Mar 16, 2025
    Copy the full SHA
    fd955d8 View commit details
  6. Fix

    danog committed Mar 16, 2025
    Copy the full SHA
    4d321db View commit details
  7. Test

    danog committed Mar 16, 2025
    Copy the full SHA
    d624e73 View commit details
  8. Fix

    danog committed Mar 16, 2025
    Copy the full SHA
    a798527 View commit details
  9. Fix

    danog committed Mar 16, 2025
    Copy the full SHA
    750a9c8 View commit details
  10. Finalize

    danog committed Mar 16, 2025
    Copy the full SHA
    a9c0b40 View commit details
  11. Copy the full SHA
    bb8bc93 View commit details
  12. Fix typo

    danog committed Mar 16, 2025
    Copy the full SHA
    ca2b821 View commit details
  13. Final fixes

    danog committed Mar 16, 2025
    Copy the full SHA
    d6d2f9a View commit details
  14. Remove force build

    danog committed Mar 16, 2025
    Copy the full SHA
    6264ad4 View commit details
122 changes: 122 additions & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Build docker image

on:
release:
types:
- published

permissions:
contents: read

jobs:
pre_job:
permissions:
actions: write
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5.3.1
with:
concurrent_skipping: always
cancel_others: true
do_not_skip: '["release"]'
# list files that may affect or are included into the built phar
paths: '["bin/**", "assets/**", "build/**", "dictionaries/**", "src/**", "stubs/**", "psalm", "psalm-language-server", "psalm-plugin", "psalm-refactor", "psalm-review", "psalter", "box.json.dist", "composer.json", "config.xsd", "keys.asc.gpg", "scoper.inc.php"]'

build-docker:
permissions:
packages: write
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ${{ matrix.image }}
strategy:
matrix:
image:
- ubuntu-latest
- ubuntu-24.04-arm
steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer:v2
coverage: none
env:
fail-fast: true

- uses: actions/checkout@v4
with:
fetch-depth: 0 # required for composer to automatically detect root package version

- name: Get Composer Cache Directories
id: composer-cache
run: |
echo "files_cache=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "vcs_cache=$(composer config cache-vcs-dir)" >> $GITHUB_OUTPUT
- name: Generate composer.lock
run: |
composer update --no-install
- name: Cache composer cache
uses: actions/cache@v4
with:
path: |
${{ steps.composer-cache.outputs.files_cache }}
${{ steps.composer-cache.outputs.vcs_cache }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Run composer install
run: composer install -o
# DO NOT set this, we need composer to figure out the version itself
# env:
# COMPOSER_ROOT_VERSION: dev-master

# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Upload docker image
env:
EVENT_NAME: ${{ github.event_name }}
REF: ${{ github.ref }}
ACTOR: ${{ github.repository_owner }}
PLATFORM: ${{ matrix.image }}
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
php bin/ci/build-docker.php
merge-docker:
permissions:
packages: write
needs: build-docker
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer:v2
coverage: none
env:
fail-fast: true

- uses: actions/checkout@v4

- name: Upload final docker image
env:
EVENT_NAME: ${{ github.event_name }}
REF: ${{ github.ref }}
ACTOR: ${{ github.repository_owner }}
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
php bin/ci/push-docker.php
54 changes: 54 additions & 0 deletions bin/ci/build-docker.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php // phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols, Generic.Files.LineLength.TooLong


declare(strict_types=1);

$platform = match (getenv('PLATFORM')) {
'ubuntu-24.04-arm' => 'arm64',
'ubuntu-latest' => 'amd64',
};

$commit = getenv('GITHUB_SHA');
$user = getenv('ACTOR');
$ref = substr(getenv('REF'), strlen('refs/heads/'));
$is_tag = getenv('EVENT_NAME') === 'release';

echo "Waiting for commit $commit on $ref...".PHP_EOL;

function r(string $cmd): void
{
echo "> $cmd\n";
passthru($cmd, $exit);
if ($exit) {
exit($exit);
}
}

$composer_branch = $is_tag ? $ref : "$ref-dev";
if ($composer_branch === 'master-dev') {
$composer_branch = 'dev-master';
}
$dev = $is_tag ? '' : '~dev';

if ($is_tag) {
$cur = 0;
while (true) {
$json = json_decode(file_get_contents("https://repo.packagist.org/p2/vimeo/psalm$dev.json?v=$cur"), true)["packages"]["vimeo/psalm"];
foreach ($json as $v) {
if ($v['version'] === $composer_branch) {
if ($v['source']['reference'] === $commit) {
break 2;
}
break;
}
}
sleep(1);
$cur++;
}
}

$ref = escapeshellarg($ref);
$composer_branch = escapeshellarg($composer_branch);
$platform = escapeshellarg($platform);

r("docker buildx build --push . -t ghcr.io/$user/psalm:$ref-$platform --build-arg PSALM_REV=$composer_branch -f bin/docker/Dockerfile");
30 changes: 30 additions & 0 deletions bin/ci/push-docker.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php // phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols, Generic.Files.LineLength.TooLong


declare(strict_types=1);

function r(string $cmd): void
{
echo "> $cmd\n";
passthru($cmd, $exit);
if ($exit) {
exit($exit);
}
}

$user = getenv('ACTOR');
$ref = substr(getenv('REF'), strlen('refs/heads/'));
$is_tag = getenv('EVENT_NAME') === 'release';

$ref = escapeshellarg($ref);

r("docker pull ghcr.io/$user/psalm:$ref-arm64 --platform arm64");
r("docker pull ghcr.io/$user/psalm:$ref-amd64 --platform amd64");

r("docker buildx imagetools create -t ghcr.io/$user/psalm:$ref ghcr.io/$user/psalm:$ref-arm64 ghcr.io/$user/psalm:$ref-amd64");
r("docker pull ghcr.io/$user/psalm:$ref");

if ($is_tag) {
r("docker tag ghcr.io/$user/psalm:$ref ghcr.io/$user/psalm:latest");
r("docker push ghcr.io/$user/psalm:latest");
}
Loading