ci: docker_tag=ext | pin rust 1.73 + wasm-bindgen-cli 0.2.92 + cargo build wasm
Some checks failed
Build and Push Docker image (ext) / docker (push) Failing after 58s
Some checks failed
Build and Push Docker image (ext) / docker (push) Failing after 58s
This commit is contained in:
parent
6ef5186407
commit
59ad93516c
18
Dockerfile
18
Dockerfile
@ -1,5 +1,5 @@
|
||||
# syntax=docker/dockerfile:1.4
|
||||
FROM rust:1.82-alpine AS wasm-builder
|
||||
FROM rust:1.73-alpine AS wasm-builder
|
||||
WORKDIR /build
|
||||
|
||||
# Installation des dépendances nécessaires pour la compilation
|
||||
@ -16,8 +16,9 @@ RUN apk update && apk add --no-cache \
|
||||
musl-dev \
|
||||
nginx
|
||||
|
||||
# Installation de wasm-pack
|
||||
RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
# Installer wasm-bindgen CLI compatible et target wasm32
|
||||
RUN cargo install wasm-bindgen-cli --version 0.2.92 && \
|
||||
rustup target add wasm32-unknown-unknown
|
||||
|
||||
# Configuration SSH basique
|
||||
RUN mkdir -p /root/.ssh && \
|
||||
@ -31,11 +32,14 @@ COPY . ihm_client/
|
||||
# Clonage du sdk_client au même niveau que ihm_client en utilisant la clé SSH montée
|
||||
RUN --mount=type=ssh git clone -b dev ssh://git@git.4nkweb.com/4nk/sdk_client.git
|
||||
|
||||
# Build du WebAssembly avec accès SSH pour les dépendances
|
||||
# Build du WebAssembly (cargo) + wasm-bindgen
|
||||
WORKDIR /build/sdk_client
|
||||
# Activer reference-types côté wasm-bindgen (via wasm-pack)
|
||||
ENV WASM_BINDGEN_FLAGS="--reference-types"
|
||||
RUN --mount=type=ssh wasm-pack build --out-dir ../ihm_client/pkg --target bundler --dev
|
||||
RUN --mount=type=ssh cargo build --target wasm32-unknown-unknown --profile dev && \
|
||||
/root/.cargo/bin/wasm-bindgen target/wasm32-unknown-unknown/debug/sdk_client.wasm \
|
||||
--out-dir /build/ihm_client/pkg \
|
||||
--typescript \
|
||||
--target bundler \
|
||||
--debug
|
||||
|
||||
FROM node:20-alpine
|
||||
WORKDIR /app
|
||||
|
Loading…
x
Reference in New Issue
Block a user