1111 branches : [ master, next, dev-* ]
1212
1313jobs :
14- check-shared-scripts :
15- runs-on : ubuntu-latest
16- steps :
17- - uses : actions/checkout@v4
18-
19- - name : Verify shared build scripts are in sync
20- run : |
21- failed=false
22- for dir in gateway/dstack-app/builder/shared kms/dstack-app/builder/shared verifier/builder/shared; do
23- if ! diff -q build/shared/pin-packages.sh "$dir/pin-packages.sh" >/dev/null 2>&1; then
24- echo "ERROR: $dir/pin-packages.sh is out of sync with build/shared/pin-packages.sh"
25- failed=true
26- fi
27- done
28- for dir in kms/dstack-app/builder/shared verifier/builder/shared; do
29- if ! diff -q build/shared/config-qemu.sh "$dir/config-qemu.sh" >/dev/null 2>&1; then
30- echo "ERROR: $dir/config-qemu.sh is out of sync with build/shared/config-qemu.sh"
31- failed=true
32- fi
33- done
34- if [ "$failed" = "true" ]; then
35- echo ""
36- echo "Run the following to fix:"
37- echo " cp build/shared/pin-packages.sh gateway/dstack-app/builder/shared/"
38- echo " cp build/shared/pin-packages.sh kms/dstack-app/builder/shared/"
39- echo " cp build/shared/pin-packages.sh verifier/builder/shared/"
40- echo " cp build/shared/config-qemu.sh kms/dstack-app/builder/shared/"
41- echo " cp build/shared/config-qemu.sh verifier/builder/shared/"
42- exit 1
43- fi
44- echo "All shared build scripts are in sync."
45-
4614 gateway :
4715 runs-on : ubuntu-latest
48- needs : check-shared-scripts
4916 steps :
5017 - uses : actions/checkout@v4
5118
6027 load : true
6128 tags : dstack-gateway-check:latest
6229 provenance : false
30+ build-contexts : |
31+ build-shared=build/shared
6332 build-args : |
6433 DSTACK_REV=${{ github.event.pull_request.head.sha || github.sha }}
6534 DSTACK_SRC_URL=${{ github.server_url }}/${{ github.repository }}
7645 --target gateway-builder \
7746 --tag gateway-builder-check:latest \
7847 --provenance=false \
48+ --build-context build-shared=build/shared \
7949 --build-arg "DSTACK_REV=${{ github.event.pull_request.head.sha || github.sha }}" \
8050 --build-arg "DSTACK_SRC_URL=${{ github.server_url }}/${{ github.repository }}" \
8151 gateway/dstack-app/builder
8757
8858 kms :
8959 runs-on : ubuntu-latest
90- needs : check-shared-scripts
9160 steps :
9261 - uses : actions/checkout@v4
9362
10271 load : true
10372 tags : dstack-kms-check:latest
10473 provenance : false
74+ build-contexts : |
75+ build-shared=build/shared
10576 build-args : |
10677 DSTACK_REV=${{ github.event.pull_request.head.sha || github.sha }}
10778 DSTACK_SRC_URL=${{ github.server_url }}/${{ github.repository }}
11889 --target kms-builder \
11990 --tag kms-builder-check:latest \
12091 --provenance=false \
92+ --build-context build-shared=build/shared \
12193 --build-arg "DSTACK_REV=${{ github.event.pull_request.head.sha || github.sha }}" \
12294 --build-arg "DSTACK_SRC_URL=${{ github.server_url }}/${{ github.repository }}" \
12395 kms/dstack-app/builder
@@ -135,7 +107,6 @@ jobs:
135107
136108 verifier :
137109 runs-on : ubuntu-latest
138- needs : check-shared-scripts
139110 steps :
140111 - uses : actions/checkout@v4
141112
@@ -151,6 +122,8 @@ jobs:
151122 load : true
152123 tags : dstack-verifier-check:latest
153124 provenance : false
125+ build-contexts : |
126+ build-shared=build/shared
154127 build-args : |
155128 DSTACK_REV=${{ github.event.pull_request.head.sha || github.sha }}
156129 DSTACK_SRC_URL=${{ github.server_url }}/${{ github.repository }}
@@ -168,6 +141,7 @@ jobs:
168141 --tag verifier-builder-check:latest \
169142 --provenance=false \
170143 --file verifier/builder/Dockerfile \
144+ --build-context build-shared=build/shared \
171145 --build-arg "DSTACK_REV=${{ github.event.pull_request.head.sha || github.sha }}" \
172146 --build-arg "DSTACK_SRC_URL=${{ github.server_url }}/${{ github.repository }}" \
173147 verifier
@@ -185,6 +159,7 @@ jobs:
185159 --tag verifier-acpi-check:latest \
186160 --provenance=false \
187161 --file verifier/builder/Dockerfile \
162+ --build-context build-shared=build/shared \
188163 --build-arg "DSTACK_REV=${{ github.event.pull_request.head.sha || github.sha }}" \
189164 --build-arg "DSTACK_SRC_URL=${{ github.server_url }}/${{ github.repository }}" \
190165 verifier
0 commit comments