Skip to content

Commit 74be569

Browse files
Migrate to a Docker Native workflow
1 parent 0c638e8 commit 74be569

File tree

6 files changed

+32
-9
lines changed

6 files changed

+32
-9
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.git/
2+
vendor/

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ tests/ export-ignore
44
.hhvmconfig.hdf export-ignore
55
composer.dev.json export-ignore
66
composer.4.102.json export-ignore
7+
.dockerignore export-ignore
8+
docker-compose.yml export-ignore
9+
Dockerfile export-ignore

.github/workflows/build-and-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ on:
88
pull_request:
99
workflow_dispatch:
1010
schedule:
11-
# Run every day at 6:14PM
12-
- cron: "14 18 * * *"
11+
- cron: "24 18 * * FRI"
1312
jobs:
1413
build:
1514
name: HHVM ${{matrix.hhvm}}
@@ -21,9 +20,10 @@ jobs:
2120
- "4.128"
2221
- "4.153"
2322
- "4.168"
23+
- "25.6.0"
2424
runs-on: ubuntu-24.04
2525
container:
26-
image: hhvm/hhvm:${{matrix.hhvm}}-latest
26+
image: ${{ startsWith(matrix.hhvm, '4') && format('hhvm/hhvm:{0}-latest', matrix.hhvm) || format('hersheltheodorelayton/hhvm-full:{0}', matrix.hhvm) }}
2727
steps:
2828
- uses: actions/checkout@v2
2929
- name: Create branch for version alias
@@ -33,7 +33,7 @@ jobs:
3333
- uses: hershel-theodore-layton/actions/hack-lint-test@master
3434
with:
3535
hhvm: ${{matrix.hhvm}}
36-
hhvm_flags: -dhhvm.autoload.enabled=true -dhhvm.autoload.db.path=.var/facts-%{euid}-%{schema}.db
36+
hhvm_flags: ${{ startsWith(matrix.hhvm, '4') && '-dhhvm.autoload.enabled=true -dhhvm.autoload.db.path=.var/facts.db' || '' }}
3737
skip_lint: ${{matrix.hhvm == '4.102'}}
3838
skip_tests: true
3939
lint_engine: pha

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM hersheltheodorelayton/hhvm-full:25.6.0
2+
ENV COMPOSER=composer.dev.json
3+
4+
WORKDIR /mnt/project
5+
6+
COPY . .
7+
COPY .hhconfig /etc/hh.conf
8+
CMD composer update && \
9+
vendor/bin/pha-linters-server.sh -g -b ./vendor/hershel-theodore-layton/portable-hack-ast-linters-server/bin/portable-hack-ast-linters-server-bundled.resource
10+

composer.dev.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@
33
"description": "Interfaces for interop with hershel-theodore-layton/sgml-stream",
44
"license": "MIT",
55
"require": {
6-
"hhvm": ">=4.102"
6+
"hhvm": ">=4.128"
77
},
88
"require-dev": {
99
"hershel-theodore-layton/portable-hack-ast-linters-server": "<1"
1010
},
11-
"scripts": {
12-
"post-install-cmd": [".github/workflows/prepare-environment.sh"],
13-
"post-update-cmd": [".github/workflows/prepare-environment.sh"]
14-
},
1511
"config": {
1612
"allow-plugins": {
1713
"hhvm/hhvm-autoload": true

docker-compose.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
services:
2+
hhvm:
3+
container_name: theodore-sgml-stream-interfaces-container
4+
build:
5+
context: .
6+
dockerfile: ./Dockerfile
7+
volumes:
8+
- type: bind
9+
source: .
10+
target: /mnt/project
11+
ports:
12+
- 48556:10641

0 commit comments

Comments
 (0)