Skip to content

Commit

A runner release publishes its sandbox images again. Each build job caches its target folder between releases, and that brought back the last release's target/runner-release/0.3.0 beside the new version's, so both went up in the job's files: the container image job's `cp release/*/g1t-runner-linux-x64` found two programs and stopped, the sandbox images were skipped after it, and 0.3.1 went out signed but without its sandbox section, so a computer setting up the sandbox for the first time waits for images. The build jobs now start from an empty target/runner-release, and the image and sandbox jobs name the version's own folder rather than a wildcard.

syntaqxcommitted Parent60a7245Browse files
1 file+11−30/1 viewed
+11−3
8585 # builds as before.
8686 - name: sccache
8787 run: bash scripts/sccache.sh install
88+ # The cache above brings back the last release's target/runner-release
89+ # too: left there, it would go out with this one's, and the jobs after
90+ # would find two of each file.
91+ - name: Only this release's files
92+ run: rm -rf target/runner-release
8893 - name: Build Linux and Windows
8994 # The macOS targets need Apple's SDK to link (the Security and
9095 # CoreFoundation frameworks), which zig does not carry, so they are
152157 mkdir -p "context-$arch"
153158 cp deploy/runner/Dockerfile "context-$arch/"
154159 name="g1t-runner-linux-$([ "$arch" = amd64 ] && echo x64 || echo arm64)"
155− cp release/*/"$name" "context-$arch/g1t-runner"
160+ cp "release/$version/$name" "context-$arch/g1t-runner"
156161 docker buildx build --platform "linux/$arch" -t "$IMAGE:$version-$arch" --load "context-$arch"
157162 docker push "$IMAGE:$version-$arch"
158163 tags+=("$IMAGE:$version-$arch")
187192 env:
188193 ARCHES: ${{ steps.qemu.outputs.arches }}
189194 run: |
190− dir="$(echo target/runner-release/*/)"
195+ version="$(sed -n 's/^version = "\(.*\)"/\1/p' crates/runner/Cargo.toml | head -1)"
196+ dir="target/runner-release/$version/"
191197 for arch in $ARCHES; do
192198 node scripts/sandbox-image.mjs build --arch "$arch" --runner "${dir}g1t-runner-linux-$arch" --out "$dir"
193199 done
194200 - name: The manifest's sandbox section
195201 env:
196202 RUNNER_SANDBOX_IMAGE: ${{ needs.image.outputs.runner_image }}
197− run: node scripts/sandbox-image.mjs section --dir "$(echo target/runner-release/*/)"
203+ run: |
204+ version="$(sed -n 's/^version = "\(.*\)"/\1/p' crates/runner/Cargo.toml | head -1)"
205+ node scripts/sandbox-image.mjs section --dir "target/runner-release/$version/"
198206 - uses: actions/upload-artifact@v4
199207 with:
200208 name: sandbox