diff --git a/.github/workflows/bcc.yml b/.github/workflows/bcc.yml index 0d5ddb8324b..2597e4f86d0 100644 --- a/.github/workflows/bcc.yml +++ b/.github/workflows/bcc.yml @@ -19,30 +19,15 @@ jobs: with: fetch-depth: 0 - - 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 + - name: Install Dependencies + uses: ramsey/composer-install@v3 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- + composer-options: "--optimize-autoloader" + env: + COMPOSER_ROOT_VERSION: dev-master - - name: Run composer install - run: | - composer install -o - composer bin bcc install + - name: Run bin install + run: composer bin bcc install env: COMPOSER_ROOT_VERSION: dev-master diff --git a/.github/workflows/build-phar.yml b/.github/workflows/build-phar.yml index 51abbb71970..edca3b1a80a 100644 --- a/.github/workflows/build-phar.yml +++ b/.github/workflows/build-phar.yml @@ -48,31 +48,10 @@ jobs: 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 + - name: Install Dependencies + uses: ramsey/composer-install@v3 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 + composer-options: "--optimize-autoloader" - run: bin/build-phar.sh env: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d1103373cb..62d651ef850 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,35 +20,13 @@ jobs: - uses: actions/checkout@v4 - - 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 - env: - COMPOSER_ROOT_VERSION: dev-master - - - 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 + - name: Install Dependencies + uses: ramsey/composer-install@v3 env: COMPOSER_ROOT_VERSION: dev-master - run: | - git ls-files | grep \\\.php$ | grep -v ^dictionaries/scripts/* | ./vendor/bin/parallel-lint --stdin + git ls-files -- '*.php' ':!:dictionaries/scripts/*' | ./vendor/bin/parallel-lint --stdin code-style: name: Code Style Analysis @@ -65,29 +43,10 @@ jobs: - uses: actions/checkout@v4 - - 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 - env: - COMPOSER_ROOT_VERSION: dev-master - - - name: Cache composer cache - uses: actions/cache@v4 + - name: Install Dependencies + uses: ramsey/composer-install@v3 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 + composer-options: "--optimize-autoloader" env: COMPOSER_ROOT_VERSION: dev-master @@ -152,30 +111,10 @@ jobs: - uses: actions/checkout@v4 - - 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 - env: - COMPOSER_ROOT_VERSION: dev-master - - - name: Cache composer cache - uses: actions/cache@v4 + - name: Install Dependencies + uses: ramsey/composer-install@v3 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 + composer-options: "--optimize-autoloader" env: COMPOSER_ROOT_VERSION: dev-master diff --git a/.github/workflows/shepherd.yml b/.github/workflows/shepherd.yml index 3440783d936..55413a7a6e4 100644 --- a/.github/workflows/shepherd.yml +++ b/.github/workflows/shepherd.yml @@ -20,8 +20,10 @@ jobs: env: fail-fast: true - - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-suggest + - name: Install Dependencies + uses: ramsey/composer-install@v3 + with: + composer-options: "--optimize-autoloader" env: COMPOSER_ROOT_VERSION: dev-master diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index d17fd73547c..d5c25df2dd8 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -64,31 +64,10 @@ jobs: - uses: actions/checkout@v4 - - 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 - shell: bash - - - name: Generate composer.lock - run: | - composer update --no-install - env: - COMPOSER_ROOT_VERSION: dev-master - - - name: Cache composer cache - uses: actions/cache@v4 + - name: Install Dependencies + uses: ramsey/composer-install@v3 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 + composer-options: "--optimize-autoloader" env: COMPOSER_ROOT_VERSION: dev-master