Skip to content

Commit

Permalink
build test
Browse files Browse the repository at this point in the history
Signed-off-by: NaturalSelect <[email protected]>
  • Loading branch information
NaturalSelect committed Nov 25, 2023
1 parent e5fae02 commit 623c0f8
Show file tree
Hide file tree
Showing 18 changed files with 2,039 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ jobs:
run: bash ./scripts/install_protobuf.sh
- name: Build
run: cargo build --verbose
# - name: Run tests
# run: cargo test --verbose
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Rust

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
ci-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build WasmEdge Image
run: docker build -t wasm_serverless_env:v1 docker/WasmEdge
- name: Install WasmEdge
run: bash ./scripts/install_wasmedge.sh
- name: Install Protobuf
run: bash ./scripts/install_protobuf.sh
- name: Build
run: cargo build --release
- name: Show files
run: tree .
- name: Build App Image
run: docker build -t wasm_serverless:v1 docker/WasmServerless
29 changes: 29 additions & 0 deletions docker/WasmEdge/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

# FROM busybox:1.36 as builder
# WORKDIR /tmp/build
# COPY . .
# RUN apt-get update && apt-get install -y cmake g++ libprotobuf-dev protobuf-compiler
# RUN cargo build --release

# FROM python as builder

# WORKDIR /tmp/build

FROM ubuntu:18.04 as wasm_serverless
# FROM wasmedge/slim:0.13.3 as wasm_serverless
LABEL maintainers="ActivePeter"
LABEL description="Wasm serverless platform"

RUN apt-get update && apt-get install -y python3 python3-pip git && mkdir -p /tmp/install
# COPY --from=builder /root/.wasmedge /root/.wasmedge
COPY env_prepare/inner/wasm_edge.py /tmp/install/wasm_edge.py
COPY env_prepare/inner/WasmEdge-0.13.3-manylinux2014_x86_64.tar.gz /tmp/install/WasmEdge-0.13.3-manylinux2014_x86_64.tar.gz
RUN python3 /tmp/install/wasm_edge.py -v 0.13.3

# COPY target/release/wasm_serverless /usr/local/bin/wasm_serverless
# COPY node_config.yaml /etc/wasm_serverless/node_config.yaml
# COPY scripts/wasm_serverless_entrypoint.sh /etc/wasm_serverless/
# RUN chmod +x /etc/wasm_serverless/wasm_serverless_entrypoint.sh

ENTRYPOINT ["echo","helloworld"]
# ENTRYPOINT ["bash","/etc/wasm_serverless/wasm_serverless_entrypoint.sh"]
3 changes: 3 additions & 0 deletions docker/WasmEdge/env_prepare/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Proxy Problem

export
1 change: 1 addition & 0 deletions docker/WasmEdge/env_prepare/inner/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./WasmEdge-0.13.3-manylinux2014_x86_64.tar.gz
Binary file not shown.
Loading

0 comments on commit 623c0f8

Please sign in to comment.