Skip to content

Commit

Permalink
OrbStack system clock fix (#136)
Browse files Browse the repository at this point in the history
* bump dependencies

* Don't throw exception if hardware clock syncing fails

* Bump to 5.9.1

* Update CI to use ubuntu-latest

* Bump checkout action, use composer-install action

* Remove prefer-stable option
  • Loading branch information
defunctl authored Aug 10, 2023
1 parent 5c1c72b commit 93bb49f
Show file tree
Hide file tree
Showing 6 changed files with 439 additions and 418 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,15 @@ jobs:

strategy:
matrix:
os: [ubuntu-18.04]
os: [ubuntu-latest]
php: ['7.3', '7.4', '8.0', '8.1']
dependency-version: [prefer-stable]

name: CI - PHP ${{ matrix.php }}

steps:

- name: Checkout
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
uses: actions/checkout@v3

- name: Set up PHP
uses: shivammathur/setup-php@v2
Expand All @@ -33,9 +26,11 @@ jobs:
coverage: pcov

- name: Install Composer dependencies
run: composer update --prefer-stable --no-interaction --prefer-dist --no-suggest
uses: ramsey/composer-install@v2
with:
composer-options: "--prefer-dist"

# Github workflows/actions have no tty, the script command captures the output as a work around
# GitHub workflows/actions have no tty, the script command captures the output as a work around
- name: PHPUnit Testing
run: php vendor/bin/phpunit -c ./phpunit.xml.dist

Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@v3
with:
# Currently, phars built with 8.1 still work on 7.3+
php-version: '8.1'
Expand All @@ -27,9 +27,12 @@ jobs:
uses: actions/checkout@v2

- name: Install optimized composer dependencies
run: |
composer install --no-progress --no-suggest --classmap-authoritative
composer dump-autoload --no-dev --classmap-authoritative
uses: ramsey/composer-install@v2
with:
composer-options: "--classmap-authoritative"

- name: Generate dev-free composer autoloader
run: composer dump-autoload --no-dev --classmap-authoritative

- name: Build phar
run: php so app:build ${{ env.PHAR_NAME }} --build-version=${{ github.ref_name }}
Expand Down
2 changes: 1 addition & 1 deletion app/Services/Docker/SystemClock.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct( Runner $runner ) {
* This fixes a docker host/vm/container time drift bug on macOS.
*/
public function sync(): void {
$this->runner->run( 'docker run --rm --privileged alpine hwclock -s' )->throw();
$this->runner->run( 'docker run --rm --privileged alpine hwclock -s' );
}

}
Loading

0 comments on commit 93bb49f

Please sign in to comment.