@@ -68,102 +68,95 @@ jobs:
6868 echo "wit_dir=$WIT_DIR"
6969 } >> "$GITHUB_OUTPUT"
7070
71- # Publish each proposal
72- publish :
71+ # Publish proposals sequentially in dependency order:
72+ # 1. io, random (no WASI dependencies)
73+ # 2. clocks (depends on io)
74+ # 3. filesystem, sockets (depend on io, clocks)
75+ # 4. cli (depends on io, clocks, filesystem, random, sockets)
76+ # 5. http (depends on cli, clocks, io)
77+
78+ publish-io :
7379 needs : setup
74- runs-on : ubuntu-latest
75- permissions :
76- id-token : write
77- packages : write
78- contents : write
79- attestations : write
80-
81- strategy :
82- fail-fast : false
83- matrix :
84- proposal :
85- - name : io
86- description : " WASI I/O interfaces for streams and poll"
87- exclude_for_p3 : true
88- - name : random
89- description : " WASI random number generation interfaces"
90- - name : clocks
91- description : " WASI clock interfaces for monotonic and wall clocks"
92- - name : filesystem
93- description : " WASI filesystem interfaces"
94- - name : sockets
95- description : " WASI socket interfaces for TCP and UDP"
96- - name : cli
97- description : " WASI CLI interfaces for command-line programs"
98- - name : http
99- description : " WASI HTTP interfaces for HTTP client and server"
100-
101- steps :
102- # Skip proposals marked exclude_for_p3 when publishing prereleases (0.3.0-rc)
103- - name : Check if should skip
104- id : skip_check
105- run : |
106- if [ "${{ matrix.proposal.exclude_for_p3 }}" == "true" ] && [ "${{ needs.setup.outputs.is_prerelease }}" == "true" ]; then
107- echo "skip=true" >> "$GITHUB_OUTPUT"
108- echo "Skipping ${{ matrix.proposal.name }} for P3 prerelease"
109- else
110- echo "skip=false" >> "$GITHUB_OUTPUT"
111- fi
112-
113- - name : Checkout repository
114- if : steps.skip_check.outputs.skip != 'true'
115- uses : actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
116-
117- - name : Install cargo-binstall
118- if : steps.skip_check.outputs.skip != 'true'
119- uses : cargo-bins/cargo-binstall@3fc81674af4165a753833a94cae9f91d8849049f # v1.16.2
120-
121- - name : Install wkg
122- if : steps.skip_check.outputs.skip != 'true'
123- shell : bash
124- run : cargo binstall -y wkg
125-
126- - name : Login to GitHub Container Registry
127- if : steps.skip_check.outputs.skip != 'true'
128- uses : docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
129- with :
130- registry : ghcr.io
131- username : ${{ github.actor }}
132- password : ${{ secrets.ORG_PAT }}
133-
134- - name : Build WIT package
135- if : steps.skip_check.outputs.skip != 'true'
136- shell : bash
137- working-directory : proposals/${{ matrix.proposal.name }}
138- run : |
139- echo "Building from: $(pwd)"
140- wkg wit build -o "$GITHUB_WORKSPACE/wasi-${{ matrix.proposal.name }}.wasm" --wit-dir "${{ needs.setup.outputs.wit_dir }}"
141-
142- - name : Publish to GitHub Container Registry
143- if : steps.skip_check.outputs.skip != 'true'
144- id : publish
145- uses : bytecodealliance/wkg-github-action@10b3b04b9059ba46208cd7daf7d352af14bded0f # v5
146- with :
147- oci-reference-without-tag : ' ghcr.io/webassembly/wasi/${{ matrix.proposal.name }}'
148- file : ' wasi-${{ matrix.proposal.name }}.wasm'
149- description : ${{ matrix.proposal.description }}
150- source : ' https://github.com/webassembly/wasi'
151- homepage : ' https://wasi.dev'
152- version : ${{ needs.setup.outputs.version }}
153- licenses : ' Apache-2.0 WITH LLVM-exception'
154-
155- - name : Attest build provenance
156- if : steps.skip_check.outputs.skip != 'true'
157- uses : actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
158- with :
159- subject-name : ghcr.io/webassembly/wasi/${{ matrix.proposal.name }}
160- subject-digest : ${{ steps.publish.outputs.digest }}
161- push-to-registry : true
162- github-token : ${{ secrets.ORG_PAT }}
80+ # Skip io for P3 prereleases (no wit-0.3.0-draft directory)
81+ if : needs.setup.outputs.is_prerelease != 'true'
82+ uses : ./.github/workflows/publish-proposal.yml
83+ with :
84+ proposal : io
85+ description : " WASI I/O interfaces for streams and poll"
86+ version : ${{ needs.setup.outputs.version }}
87+ wit_dir : ${{ needs.setup.outputs.wit_dir }}
88+ secrets : inherit
89+
90+ publish-random :
91+ needs : setup
92+ uses : ./.github/workflows/publish-proposal.yml
93+ with :
94+ proposal : random
95+ description : " WASI random number generation interfaces"
96+ version : ${{ needs.setup.outputs.version }}
97+ wit_dir : ${{ needs.setup.outputs.wit_dir }}
98+ secrets : inherit
99+
100+ publish-clocks :
101+ needs : [setup, publish-io, publish-random]
102+ # For prereleases, only wait on random (io is skipped)
103+ if : always() && !failure() && !cancelled()
104+ uses : ./.github/workflows/publish-proposal.yml
105+ with :
106+ proposal : clocks
107+ description : " WASI clock interfaces for monotonic and system clocks"
108+ version : ${{ needs.setup.outputs.version }}
109+ wit_dir : ${{ needs.setup.outputs.wit_dir }}
110+ secrets : inherit
111+
112+ publish-filesystem :
113+ needs : [setup, publish-clocks]
114+ if : always() && !failure() && !cancelled()
115+ uses : ./.github/workflows/publish-proposal.yml
116+ with :
117+ proposal : filesystem
118+ description : " WASI filesystem interfaces"
119+ version : ${{ needs.setup.outputs.version }}
120+ wit_dir : ${{ needs.setup.outputs.wit_dir }}
121+ secrets : inherit
122+
123+ publish-sockets :
124+ needs : [setup, publish-clocks]
125+ if : always() && !failure() && !cancelled()
126+ uses : ./.github/workflows/publish-proposal.yml
127+ with :
128+ proposal : sockets
129+ description : " WASI socket interfaces for TCP and UDP"
130+ version : ${{ needs.setup.outputs.version }}
131+ wit_dir : ${{ needs.setup.outputs.wit_dir }}
132+ secrets : inherit
133+
134+ publish-cli :
135+ needs : [setup, publish-filesystem, publish-sockets]
136+ if : always() && !failure() && !cancelled()
137+ uses : ./.github/workflows/publish-proposal.yml
138+ with :
139+ proposal : cli
140+ description : " WASI CLI interfaces for command-line programs"
141+ version : ${{ needs.setup.outputs.version }}
142+ wit_dir : ${{ needs.setup.outputs.wit_dir }}
143+ secrets : inherit
144+
145+ publish-http :
146+ needs : [setup, publish-cli]
147+ if : always() && !failure() && !cancelled()
148+ uses : ./.github/workflows/publish-proposal.yml
149+ with :
150+ proposal : http
151+ description : " WASI HTTP interfaces for HTTP client and server"
152+ version : ${{ needs.setup.outputs.version }}
153+ wit_dir : ${{ needs.setup.outputs.wit_dir }}
154+ secrets : inherit
163155
164156 # Validate all packages were published successfully
165157 validate :
166- needs : [setup, publish]
158+ needs : [setup, publish-io, publish-random, publish-clocks, publish-filesystem, publish-sockets, publish-cli, publish-http]
159+ if : always() && !failure() && !cancelled()
167160 runs-on : ubuntu-latest
168161 steps :
169162 - name : Install oras
@@ -205,7 +198,7 @@ jobs:
205198
206199 # Create specification entry after all publishes complete
207200 create-specification :
208- needs : [setup, publish, validate]
201+ needs : [setup, validate]
209202 runs-on : ubuntu-latest
210203 if : needs.setup.outputs.is_prerelease == 'false'
211204 permissions :
0 commit comments