1010 # Don't change this version without updating it in all required
1111 # places (full list in /.nvmrc).
1212 description : " Node.js version to use for building"
13- default : " 22.12.0 "
13+ default : " 22.22.2 "
1414 type : string
1515 required : false
1616 outputs :
1717 waspc_version :
1818 value : ${{ jobs.build.outputs.waspc_version }}
1919 description : " The Wasp version built in this workflow."
20+ data_files_list :
21+ value : ${{ jobs.build.outputs.data_files_list }}
22+ description : " List of data files with per-file SHA-256 hashes."
2023 output_linux-x86_64 :
2124 value : ${{ jobs.build.outputs.output_linux-x86_64 }}
2225 description : " The build output metadata for linux-x86_64."
3740 build :
3841 outputs :
3942 waspc_version : ${{ steps.set-outputs.outputs.waspc_version }}
43+ data_files_list : ${{ steps.data-files.outputs.list }}
4044 output_linux-x86_64 : ${{ steps.set-outputs.outputs.output_linux-x86_64 }}
4145 output_linux-x86_64-static : ${{ steps.set-outputs.outputs.output_linux-x86_64-static }}
4246 output_macos-x86_64 : ${{ steps.set-outputs.outputs.output_macos-x86_64 }}
@@ -83,17 +87,19 @@ jobs:
8387 # We also pin the `alpine` version to a specific one we have tested,
8488 # since newer releases might have different versions of the
8589 # libraries we depend on.
86- container : node:${{ inputs.node-version }}-alpine3.21
90+ container : node:${{ inputs.node-version }}-alpine3.23
8791 skip-node-install : true
8892 static : true
8993 install-deps : |
9094 apk update
9195 # GHCup dependencies (https://www.haskell.org/ghcup/install/#linux-alpine)
92- apk add binutils-gold curl gcc g++ gmp-dev libc-dev libffi-dev make musl-dev ncurses-dev perl pkgconfig tar xz
96+ apk add binutils-gold curl gcc g++ gmp-dev gmp-static libc-dev libffi-dev make musl-dev ncurses-dev perl pkgconfig tar xz
9397 # `./run` script dependencies
9498 apk add bash
9599 # Cabal dependencies
96100 apk add zlib-dev zlib-static
101+ # Prisma dependencies
102+ apk add openssl
97103
98104 - name : macos-x86_64
99105 runner : macos-15-intel
@@ -141,7 +147,27 @@ jobs:
141147 mkdir -p artifacts
142148 ./tools/make_binary_package.sh "artifacts/${{ steps.compute-artifact-names.outputs.tarball-name }}"
143149
144- - uses : actions/upload-artifact@v4
150+ - name : Compute data files list
151+ id : data-files
152+ working-directory : waspc
153+ run : |
154+ if command -v sha256sum >/dev/null 2>&1; then
155+ HASH_CMD="sha256sum"
156+ else
157+ HASH_CMD="shasum -a 256"
158+ fi
159+ {
160+ echo 'list<<EOF'
161+ cabal sdist --list-only \
162+ | grep '^\./data/' \
163+ | while IFS= read -r file; do
164+ hash=$($HASH_CMD "$file" | cut -d' ' -f1)
165+ printf '%s\t%s\n' "$file" "$hash"
166+ done
167+ echo 'EOF'
168+ } >> $GITHUB_OUTPUT
169+
170+ - uses : actions/upload-artifact@v7
145171 with :
146172 path : ./waspc/artifacts/${{ steps.compute-artifact-names.outputs.tarball-name }}
147173 name : ${{ steps.compute-artifact-names.outputs.artifact-name }}
@@ -158,59 +184,3 @@ jobs:
158184 echo 'EOF'
159185 } >> $GITHUB_OUTPUT
160186 echo "waspc_version=$(cd waspc && ./run get-waspc-version)" >> $GITHUB_OUTPUT
161-
162- build-universal :
163- name : Build Wasp (universal)
164- needs : build
165- runs-on : macos-15
166-
167- env :
168- X86_64_TARBALL_NAME : ${{ fromJson(needs.build.outputs.output_macos-x86_64).tarball-name }}
169- X86_64_ARTIFACT_NAME : ${{ fromJson(needs.build.outputs.output_macos-x86_64).artifact-name }}
170- AARCH64_TARBALL_NAME : ${{ fromJson(needs.build.outputs.output_macos-aarch64).tarball-name }}
171- AARCH64_ARTIFACT_NAME : ${{ fromJson(needs.build.outputs.output_macos-aarch64).artifact-name }}
172-
173- steps :
174- - uses : actions/checkout@v6
175-
176- - name : Compute artifact names
177- uses : ./.github/actions/compute-artifact-names
178- id : compute-artifact-names
179- with :
180- build-name : macos-universal
181-
182- - name : Download macOS Intel binaries
183- uses : actions/download-artifact@v5
184- with :
185- name : " ${{ env.X86_64_ARTIFACT_NAME }}"
186-
187- - name : Download macOS ARM binaries
188- uses : actions/download-artifact@v5
189- with :
190- name : " ${{ env.AARCH64_ARTIFACT_NAME }}"
191-
192- - name : Unpack, create universal binary and pack
193- run : |
194- set -eux # Fail on error and print each command
195-
196- mkdir x86_64 aarch64 universal
197-
198- # Unpack both architectures
199- tar -xzf "$X86_64_TARBALL_NAME" -C x86_64
200- tar -xzf "$AARCH64_TARBALL_NAME" -C aarch64
201-
202- # Create the universal binary
203- lipo \
204- -create "x86_64/wasp-bin" "aarch64/wasp-bin" \
205- -output "universal/wasp-bin"
206-
207- # Copy the data folder too (we take the first one, should be identical in both)
208- cp -R "x86_64/data/" "universal/"
209-
210- # Pack back up
211- tar -czf ${{ steps.compute-artifact-names.outputs.tarball-name }} -C universal .
212-
213- - uses : actions/upload-artifact@v4
214- with :
215- name : ${{ steps.compute-artifact-names.outputs.artifact-name }}
216- path : ./${{ steps.compute-artifact-names.outputs.tarball-name }}
0 commit comments