Skip to content

Commit 7f61566

Browse files
committed
Merge remote-tracking branch 'origin/main' into implement-missing-harness-issues
2 parents 0d9ff14 + 1677ad7 commit 7f61566

109 files changed

Lines changed: 3452 additions & 2404 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/rebuild-all-test-components/SKILL.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@ description: "Rebuilds all test WASM components from scratch. Use when explicitl
77

88
Clean rebuild of every test WASM component in `test-components/`. This is a heavyweight operation — only use when all components need regeneration (e.g., after merge conflicts in `.wasm` files or major SDK/WIT changes).
99

10-
## Steps
10+
## Quick Path (single command)
11+
12+
```shell
13+
cargo make build-test-components
14+
```
15+
16+
This handles everything: builds `golem-cli`, the TS SDK, then cleans and rebuilds all test components.
17+
18+
## Manual Steps (if needed)
1119

1220
### 1. Build golem-cli
1321

@@ -52,7 +60,7 @@ If any component fails to build, fix the issue and re-run `./build-components.sh
5260

5361
### 5. Verify
5462

55-
After rebuilding, the `.wasm` files in `test-components/` should be updated. Commit all changed `.wasm` files.
63+
After rebuilding, the `.wasm` files in `test-components/` should be present. Note: these files are gitignored and built on CI automatically.
5664

5765
## Troubleshooting
5866

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: 'Docker Build and Push Service'
2+
description: 'Extract metadata and build+push a Docker service image'
3+
inputs:
4+
image-name:
5+
description: 'Full Docker Hub image name (e.g., golemservices/golem-worker-executor)'
6+
required: true
7+
dockerfile:
8+
description: 'Path to the Dockerfile'
9+
required: true
10+
platforms:
11+
description: 'Target platforms (e.g., linux/amd64,linux/arm64)'
12+
required: true
13+
runs:
14+
using: 'composite'
15+
steps:
16+
- name: Extract metadata (tags, labels)
17+
id: meta
18+
uses: docker/metadata-action@v5
19+
with:
20+
images: ${{ inputs.image-name }}
21+
- name: Build and push image
22+
uses: useblacksmith/build-push-action@v1
23+
with:
24+
context: .
25+
file: ${{ inputs.dockerfile }}
26+
push: true
27+
platforms: ${{ inputs.platforms }}
28+
tags: ${{ steps.meta.outputs.tags }}
29+
labels: ${{ steps.meta.outputs.labels }}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: 'Docker Publish Setup'
2+
description: 'Common setup for Docker image publishing jobs'
3+
inputs:
4+
dockerhub-username:
5+
description: 'Docker Hub username'
6+
required: true
7+
dockerhub-password:
8+
description: 'Docker Hub password'
9+
required: true
10+
runs:
11+
using: 'composite'
12+
steps:
13+
- name: Fetch tag
14+
shell: bash
15+
run: git fetch origin --deepen=1
16+
- name: Prepare platforms
17+
shell: bash
18+
run: echo "PLATFORMS=linux/amd64,linux/arm64" >> $GITHUB_ENV
19+
- name: Download Targets
20+
uses: actions/download-artifact@v4
21+
with:
22+
pattern: docker-targets-build-*
23+
path: target
24+
merge-multiple: true
25+
- name: Extract Targets
26+
shell: bash
27+
run: |
28+
ls -R target
29+
cd target
30+
for f in *.tar; do tar xvf "$f"; done
31+
- name: Set up QEMU
32+
uses: docker/setup-qemu-action@v3
33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v3
35+
- name: Set Docker version
36+
shell: bash
37+
run: |
38+
if [ "${{ github.event_name }}" == 'push' ] && [ "${{ github.ref_type }}" == 'tag' ]; then
39+
DOCKER_VERSION=$(echo "${{ github.ref }}" | sed 's|^refs/tags/v||')
40+
echo "DOCKER_VERSION=${DOCKER_VERSION}" >> $GITHUB_ENV
41+
else
42+
COMMIT_SHORT_HASH=$(git rev-parse --short=7 HEAD)
43+
echo "DOCKER_VERSION=${COMMIT_SHORT_HASH}" >> $GITHUB_ENV
44+
fi
45+
- uses: jpribyl/action-docker-layer-caching@v0.1.1
46+
continue-on-error: true
47+
- name: Log in to Docker Hub
48+
uses: docker/login-action@v3
49+
with:
50+
username: ${{ inputs.dockerhub-username }}
51+
password: ${{ inputs.dockerhub-password }}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: 'Publish Test Report'
2+
description: 'Publish CTRF test reports as GitHub artifacts and PR comments'
3+
inputs:
4+
artifact-name:
5+
description: 'Name for the uploaded test report artifact'
6+
required: true
7+
github-token:
8+
description: 'GitHub token for publishing reports'
9+
required: true
10+
runs:
11+
using: 'composite'
12+
steps:
13+
- name: Publish Test Report
14+
uses: ctrf-io/github-test-reporter@v1
15+
if: always()
16+
with:
17+
report-path: "**/target/ctrf-*.json"
18+
upload-artifact: 'true'
19+
artifact-name: ${{ inputs.artifact-name }}
20+
summary: true
21+
summary-report: true
22+
failed-report: true
23+
slowest-report: true
24+
github-report: true
25+
flaky-report: true
26+
collapse-large-reports: true
27+
exit-on-no-files: true
28+
env:
29+
GITHUB_TOKEN: ${{ inputs.github-token }}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: 'Restore Build Binaries'
2+
description: 'Install cargo-test-r, restore binary cache, and apply archive'
3+
inputs:
4+
run-id:
5+
description: 'GitHub run ID for cache key'
6+
required: true
7+
copy-to-target:
8+
description: 'Whether to copy binaries to target/debug'
9+
default: 'false'
10+
fail-on-cache-miss:
11+
description: 'Whether to fail if cache is not found'
12+
default: 'false'
13+
runs:
14+
using: 'composite'
15+
steps:
16+
- name: Install cargo-test-r
17+
shell: bash
18+
run: cargo binstall --force --locked cargo-test-r@2.2.4
19+
- name: Restore packaged binaries from cache
20+
uses: actions/cache/restore@v4
21+
with:
22+
path: tmp/golem-binaries
23+
key: golem-binaries-${{ inputs.run-id }}
24+
fail-on-cache-miss: ${{ inputs.fail-on-cache-miss }}
25+
- name: Apply binary archive
26+
shell: bash
27+
run: cargo-test-r reuse-nextest-archive --archive-file tmp/golem-binaries
28+
- name: Copy binaries to target/debug
29+
if: inputs.copy-to-target == 'true'
30+
shell: bash
31+
run: |
32+
mkdir -pv target/debug
33+
find target/nextest-archive/target/dev-ci -maxdepth 1 -type f | xargs mv -t target/debug/
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: 'Restore Test Components'
2+
description: 'Restore test component WASMs from cache and install them'
3+
inputs:
4+
run-id:
5+
description: 'GitHub run ID for cache key'
6+
required: true
7+
runs:
8+
using: 'composite'
9+
steps:
10+
- name: Restore built test component WASMs
11+
uses: actions/cache/restore@v4
12+
with:
13+
path: tmp/test-components-wasm
14+
key: golem-test-components-${{ inputs.run-id }}
15+
fail-on-cache-miss: true
16+
- name: Install test component WASMs
17+
shell: bash
18+
run: cp -v tmp/test-components-wasm/*.wasm test-components/
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: 'Setup Rust Environment'
2+
description: 'Checkout, setup Rust, cache, and cargo-make'
3+
inputs:
4+
fetch-tag:
5+
description: 'Whether to fetch tag with --deepen=1'
6+
default: 'false'
7+
rust-targets:
8+
description: 'Additional Rust targets to add (space-separated)'
9+
default: ''
10+
use-cache:
11+
description: 'Whether to use Swatinem/rust-cache'
12+
default: 'true'
13+
cache-prefix-key:
14+
description: 'Rust cache prefix key'
15+
default: 'v4-rust'
16+
cache-shared-key:
17+
description: 'Rust cache shared key'
18+
default: 'debug'
19+
cache-save-if:
20+
description: 'Whether to save rust cache'
21+
default: 'false'
22+
install-cargo-make:
23+
description: 'Whether to install cargo-make'
24+
default: 'true'
25+
install-cargo-binstall:
26+
description: 'Whether to install cargo-binstall'
27+
default: 'false'
28+
runs:
29+
using: 'composite'
30+
steps:
31+
- name: Fetch tag
32+
if: inputs.fetch-tag == 'true'
33+
shell: bash
34+
run: git fetch origin --deepen=1
35+
- name: Setup Rust
36+
shell: bash
37+
run: |
38+
rustup update stable --no-self-update && rustup default stable
39+
for target in ${{ inputs.rust-targets }}; do
40+
rustup target add "$target"
41+
done
42+
- name: Setup Rust cache
43+
if: inputs.use-cache == 'true'
44+
uses: Swatinem/rust-cache@v2
45+
with:
46+
prefix-key: ${{ inputs.cache-prefix-key }}
47+
shared-key: ${{ inputs.cache-shared-key }}
48+
cache-all-crates: true
49+
save-if: ${{ inputs.cache-save-if }}
50+
- name: Install cargo-make
51+
if: inputs.install-cargo-make == 'true'
52+
uses: davidB/rust-cargo-make@v1
53+
- name: Install cargo-binstall
54+
if: inputs.install-cargo-binstall == 'true'
55+
uses: cargo-bins/cargo-binstall@main

.github/workflows/benchmark.yaml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,19 @@ jobs:
99
run-benchmark:
1010
runs-on: blacksmith-32vcpu-ubuntu-2204
1111
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v5
12+
- uses: actions/checkout@v5
1413
with:
1514
fetch-depth: 1
16-
- name: Setup Rust
17-
run: rustup update stable --no-self-update && rustup default stable
18-
- uses: Swatinem/rust-cache@v2
15+
- uses: ./.github/actions/setup-rust
1916
with:
20-
prefix-key: v3-rust
21-
shared-key: release
22-
cache-all-crates: true
23-
save-if: true
24-
- uses: davidB/rust-cargo-make@v1
17+
cache-prefix-key: 'v3-rust'
18+
cache-shared-key: 'release'
19+
cache-save-if: 'true'
2520
- name: Setup Redis
2621
uses: shogo82148/actions-setup-redis@v1.35.1
2722
with:
2823
redis-version: latest
2924
auto-start: false
30-
- name: Purge v8 from cache
31-
run: cargo make --profile ci clear-v8
3225

3326
- name: Building release executables
3427
run: cargo make --profile ci build-release

0 commit comments

Comments
 (0)