Skip to content

Commit a758efd

Browse files
Merge branch 'main' of github.com:Lind-Project/lind-wasm into encode-argid
2 parents 061322b + 22f1257 commit a758efd

File tree

27 files changed

+785
-377
lines changed

27 files changed

+785
-377
lines changed

.github/workflows/dev.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ permissions: {}
88
jobs:
99
docker:
1010
runs-on: ubuntu-22.04
11+
environment: dockerhub
1112
steps:
1213
- name: Login to Docker Hub
1314
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
@@ -16,14 +17,14 @@ jobs:
1617
password: ${{ secrets.DOCKERHUB_TOKEN }}
1718

1819
- name: Set up Docker Buildx
19-
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
20+
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
2021

2122
# Configure Docker release tags:
2223
# - securesystemslab/lind-wasm-dev:sha-<short commit id>
2324
# - securesystemslab/lind-wasm-dev:latest
2425
- name: Docker meta
2526
id: meta
26-
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
27+
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
2728
with:
2829
images: |
2930
securesystemslab/lind-wasm-dev
@@ -34,7 +35,7 @@ jobs:
3435
3536
# Single-step: Build and push Dockerfile.dev
3637
- name: Build and push
37-
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
38+
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
3839
with:
3940
push: true
4041
platforms: linux/amd64

.github/workflows/e2e.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ jobs:
3232

3333
steps:
3434
- name: Set up Docker Buildx
35-
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
35+
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
3636

3737
# First attempt at build
3838
- name: Build e2e (attempt 1)
3939
id: build_e2e_try1
40-
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
40+
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
4141
with:
4242
platforms: linux/amd64
4343
cache-from: type=gha
@@ -55,7 +55,7 @@ jobs:
5555
- name: Build e2e (attempt 2)
5656
id: build_e2e_try2
5757
if: steps.build_e2e_try1.outcome == 'failure'
58-
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
58+
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
5959
with:
6060
platforms: linux/amd64
6161
cache-from: type=gha
@@ -73,7 +73,7 @@ jobs:
7373
- name: Build e2e (attempt 3)
7474
id: build_e2e_try3
7575
if: steps.build_e2e_try2.outcome == 'failure'
76-
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
76+
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
7777
with:
7878
platforms: linux/amd64
7979
cache-from: type=gha

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permissions: {}
1010
jobs:
1111
docker:
1212
runs-on: ubuntu-22.04
13+
environment: dockerhub
1314
steps:
1415
- name: Login to Docker Hub
1516
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
@@ -18,11 +19,11 @@ jobs:
1819
password: ${{ secrets.DOCKERHUB_TOKEN }}
1920

2021
- name: Set up Docker Buildx
21-
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
22+
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
2223

2324
# Build 'test' stage (default) to run tests
2425
- name: Test
25-
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
26+
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
2627
with:
2728
platforms: linux/amd64
2829
cache-from: type=gha
@@ -33,7 +34,7 @@ jobs:
3334
# - securesystemslab/lind-wasm:latest
3435
- name: Docker meta
3536
id: meta
36-
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
37+
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
3738
with:
3839
images: |
3940
securesystemslab/lind-wasm
@@ -44,7 +45,7 @@ jobs:
4445
4546
# Build 'release' stage and push to Dockerhub
4647
- name: Release and push
47-
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
48+
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
4849
with:
4950
target: release
5051
push: true

.github/workflows/zizmor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
- name: Run zizmor
2020
id: zizmor
21-
uses: zizmorcore/zizmor-action@0dce2577a4760a2749d8cfb7a84b7d5585ebcb7d
21+
uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8
2222
with:
2323
inputs: |
2424
.github/workflows

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ scripts/object_lists_final/
1414

1515
#Ignore testing results
1616
e2e_status
17-
report.html
18-
results.json
17+
reports/
1918

2019
#Ignore python cache
21-
__pycache__/
20+
__pycache__/

Makefile

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,36 @@ sync-sysroot:
7474
.PHONY: test
7575
test: lindfs
7676
# Unified harness entry point (run all discovered harnesses for e2e signal)
77-
LIND_WASM_BASE=. LINDFS_ROOT=$(LINDFS_ROOT) \
77+
if LIND_WASM_BASE=. LINDFS_ROOT=$(LINDFS_ROOT) \
7878
python3 ./scripts/test_runner.py --export-report report.html && \
79-
find reports -maxdepth 1 -name '*.json' -print -exec cat {} \;; \
80-
if python3 -c "import glob,json,sys; paths=glob.glob('reports/*.json'); total=sum(int(json.load(open(p)).get('number_of_failures', 0)) for p in paths); print(f'total_failures={total}'); sys.exit(1 if total else 0)"; then \
79+
find reports -maxdepth 1 -name '*.json' -print -exec cat {} \; && \
80+
python3 -c "import glob,json,sys; paths=glob.glob('reports/*.json'); \
81+
def count_failures(node): \
82+
if not isinstance(node, dict): \
83+
return 0; \
84+
direct=node.get('number_of_failures'); \
85+
try: \
86+
direct_val=int(direct) if direct is not None else None; \
87+
except (TypeError, ValueError): \
88+
direct_val=None; \
89+
nested=sum(count_failures(v) for v in node.values() if isinstance(v, dict)); \
90+
return nested if direct_val is None else max(direct_val, nested); \
91+
total=1 if not paths else 0; \
92+
for path in paths: \
93+
with open(path, encoding='utf-8') as handle: \
94+
total += count_failures(json.load(handle)); \
95+
print(f'total_failures={total}'); \
96+
sys.exit(1 if total else 0)"; then \
8197
echo "E2E_STATUS=pass" > e2e_status; \
8298
else \
8399
echo "E2E_STATUS=fail" > e2e_status; \
100+
mkdir -p reports; \
101+
if [ ! -f report.html ]; then \
102+
printf '%s\n' '<!DOCTYPE html><html><body><h1>E2E failed before report generation</h1></body></html>' > report.html; \
103+
fi; \
104+
if [ ! -f reports/report.html ]; then cp report.html reports/report.html; fi; \
105+
if [ ! -f reports/wasm.json ]; then printf '%s\n' '{"number_of_failures":1,"results":[],"error":"missing wasm report"}' > reports/wasm.json; fi; \
106+
if [ ! -f reports/grates.json ]; then printf '%s\n' '{"number_of_failures":1,"results":[],"error":"missing grate report"}' > reports/grates.json; fi; \
84107
fi; \
85108
exit 0
86109

@@ -147,4 +170,4 @@ distclean: clean
147170
$(RM) -f results.json report.html e2e_status
148171
$(RM) -r reports || true
149172
$(RM) -r $(LINDFS_ROOT)/testfiles || true
150-
find tests -type f \( -name '*.wasm' -o -name '*.cwasm' -o -name '*.o' \) -delete
173+
find tests -type f \( -name '*.wasm' -o -name '*.cwasm' -o -name '*.o' \) -delete
Lines changed: 58 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)