File tree Expand file tree Collapse file tree 6 files changed +27
-25
lines changed
Expand file tree Collapse file tree 6 files changed +27
-25
lines changed Original file line number Diff line number Diff line change 1- SYSROOT_VERSION = 0.1.9
2- SYSROOT_CLI_IMAGE = faasm/cpp-sysroot:0.1.9
1+ SYSROOT_VERSION = 0.1.10
2+ SYSROOT_CLI_IMAGE = faasm/cpp-sysroot:0.1.10
33COMPOSE_PROJECT_NAME = cpp-dev
Original file line number Diff line number Diff line change 77
88jobs :
99 build :
10- runs-on : ubuntu-20.04
10+ runs-on : ubuntu-latest
1111 steps :
1212 - name : " Prune docker"
1313 run : docker system prune -f --all
1414 - name : " Get the code"
15- uses : actions/checkout@v2
16- - name : " Submodules "
17- run : " git submodule update --init -- recursive"
15+ uses : actions/checkout@v3
16+ with :
17+ submodules : recursive
1818 - name : " Get tag version"
1919 run : echo "TAG_VERSION=${GITHUB_REF#refs/tags/v*}" >> $GITHUB_ENV
2020 - name : " Print tag version"
2121 run : echo ${{ env.TAG_VERSION }}
2222 - name : " Set up QEMU"
23- uses : docker/setup-qemu-action@v1
23+ uses : docker/setup-qemu-action@v2
2424 - name : " Set up Docker Buildx"
25- uses : docker/setup-buildx-action@v1
25+ uses : docker/setup-buildx-action@v2
2626 - name : " Log in to DockerHub"
27- uses : docker/login-action@v1
27+ uses : docker/login-action@v2
2828 with :
2929 username : ${{ secrets.DOCKER_USERNAME }}
3030 password : ${{ secrets.DOCKER_PASSWORD }}
3131 - name : " Build and push cpp-sysroot container"
3232 id : docker_build
33- uses : docker/build-push-action@v2
33+ uses : docker/build-push-action@v3
3434 with :
3535 push : true
3636 file : docker/cpp-sysroot.dockerfile
Original file line number Diff line number Diff line change 1919 if : github.event.pull_request.draft == false
2020 runs-on : ubuntu-20.04
2121 container :
22- image : faasm/cpp-sysroot:0.1.9
22+ image : faasm/cpp-sysroot:0.1.10
2323 steps :
2424 # --- Update code ---
2525 - name : " Checkout code"
Original file line number Diff line number Diff line change 1- 0.1.9
1+ 0.1.10
Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ RUN mkdir -p /code \
2626 && git submodule update --init -f third-party/FFmpeg \
2727 && git submodule update --init -f third-party/zlib \
2828 && git submodule update --init -f third-party/libpng \
29- && git submodule update --init -f third-party/ImageMagick
29+ && git submodule update --init -f third-party/ImageMagick \
30+ && git submodule update --init -f third-party/tensorflow
3031
3132# Install the faasmtools Python lib
3233RUN cd /code/cpp \
@@ -60,6 +61,7 @@ RUN cd /code/cpp \
6061 zlib \
6162 libpng \
6263 imagemagick \
64+ tensorflow \
6365 # Build Faasm WASM libraries
6466 && inv \
6567 libemscripten \
Original file line number Diff line number Diff line change 1- # Set where the library has been built
21if (FAASM_BUILD_TYPE STREQUAL "wasm" )
32 set (TF_LIB ${CMAKE_SYSROOT} /lib/wasm32-wasi/libtensorflow-lite.a)
4- else ()
5- message (FATAL_ERROR "Tensorflow can only be built for WebAssembly" )
6- endif ()
73
8- faasm_func(minimal minimal.cpp)
4+ faasm_func(minimal minimal.cpp)
95
10- set (TF_HEADERS
11- ${CMAKE_SYSROOT} /include /tensorflow
12- ${CMAKE_SYSROOT} /include /tensorflow/tensorflow/lite/tools/make/downloads/flatbuffers/include
13- )
6+ set (TF_HEADERS
7+ ${CMAKE_SYSROOT} /include /tensorflow
8+ ${CMAKE_SYSROOT} /include /tensorflow/tensorflow/lite/tools/make/downloads/flatbuffers/include
9+ )
1410
15- target_include_directories (minimal PUBLIC ${TF_HEADERS} )
16- target_link_libraries (minimal faasm ${TF_LIB} )
17- add_custom_target (tf_all_funcs DEPENDS minimal)
11+ target_include_directories (minimal PUBLIC ${TF_HEADERS} )
12+ target_link_libraries (minimal faasm ${TF_LIB} )
13+ add_custom_target (tf_all_funcs DEPENDS minimal)
14+ else ()
15+ message (STATUS "Tensorflow can only be built for WebAssembly" )
16+ add_custom_target (tf_all_funcs)
17+ endif ()
You can’t perform that action at this time.
0 commit comments