Skip to content

Commit b28d895

Browse files
Migrate to a Docker Native workload
1 parent 6458667 commit b28d895

File tree

6 files changed

+34
-10
lines changed

6 files changed

+34
-10
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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22
tests/ export-ignore
33
.hhconfig export-ignore
44
.hhvmconfig.hdf export-ignore
5-
hhast-lint.json export-ignore
5+
composer.dev.json export-ignore
6+
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:34PM
12-
- cron: "34 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
lint_engine: pha
3939
skip_tests: true

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,16 +3,12 @@
33
"description": "HTML elements for sgml-stream in the root namespace.",
44
"license": "MIT",
55
"require": {
6-
"hhvm": ">=4.102",
6+
"hhvm": ">=4.128",
77
"hershel-theodore-layton/sgml-stream": "dev-master || ^2"
88
},
99
"require-dev": {
1010
"hershel-theodore-layton/portable-hack-ast-linters-server": "<1"
1111
},
12-
"scripts": {
13-
"post-install-cmd": [".github/workflows/prepare-environment.sh"],
14-
"post-update-cmd": [".github/workflows/prepare-environment.sh"]
15-
},
1612
"config": {
1713
"allow-plugins": {
1814
"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-html-stream-non-namespaced-container
4+
build:
5+
context: .
6+
dockerfile: ./Dockerfile
7+
volumes:
8+
- type: bind
9+
source: .
10+
target: /mnt/project
11+
ports:
12+
- 48562:10641

0 commit comments

Comments
 (0)