diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e7516e29..65aff93a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -26,9 +26,10 @@ jobs: - macos-11 cache_reset_counter: - 0 + node: + - 16 + - 18 include: - - node: 12 - pnpm: 6 - node: 16 pnpm: 7 - node: 18 @@ -69,7 +70,7 @@ jobs: if: "!contains(github.event.head_commit.message, '[skip test]')" run: | pnpm run test - continue-on-error: ${{ contains(matrix.os, 'ubuntu-18.04') || contains(matrix.node, '12') }} + continue-on-error: ${{ contains(matrix.os, 'ubuntu-18.04') }} # Create self-contained executable that bundles Nodejs - name: Create Executable @@ -127,6 +128,7 @@ jobs: - ubuntu-22.04 container: - "ubuntu_node.dockerfile" + - "ubuntu_node_legacy.dockerfile" - "ubuntu_20.04_node_legacy.dockerfile" - "ubuntu_20.04_node.dockerfile" - "ubuntu_22.04_node.dockerfile" diff --git a/dev/docker/ubuntu_node.dockerfile b/dev/docker/ubuntu_node.dockerfile index 9e72c10d..aad8eb0c 100644 --- a/dev/docker/ubuntu_node.dockerfile +++ b/dev/docker/ubuntu_node.dockerfile @@ -1,7 +1,8 @@ FROM ubuntu:22.04 AS base -RUN apt-get update -qq -RUN apt-get install -y --no-install-recommends nodejs +ADD https://deb.nodesource.com/setup_16.x / +RUN chmod +x /node_setup_16.x && /node_setup16.x +RUN apt-get update -qq && apt-get install -y --no-install-recommends nodejs # add setup-cpp.js COPY "./dist/node16" "/" diff --git a/dev/docker/ubuntu_node_legacy.dockerfile b/dev/docker/ubuntu_node_legacy.dockerfile new file mode 100644 index 00000000..983d6d1e --- /dev/null +++ b/dev/docker/ubuntu_node_legacy.dockerfile @@ -0,0 +1,31 @@ +FROM ubuntu:22.04 AS base + +RUN apt-get update -qq +RUN apt-get install -y --no-install-recommends nodejs + +# add setup-cpp.js +COPY "./dist/node12" "/" +WORKDIR "/" + +# run installation +RUN node ./setup-cpp.js --compiler llvm --cmake true --ninja true --cppcheck true --ccache true --vcpkg true --doxygen true --gcovr true --task true --powershell true + +CMD ["source", "~/.cpprc"] +ENTRYPOINT [ "/bin/bash" ] + + +#### Building +FROM base AS builder +COPY ./dev/cpp_vcpkg_project /home/app +WORKDIR /home/app +RUN bash -c 'source ~/.cpprc \ + && task build' + + +### Running environment +# use a distroless image or ubuntu:22.04 if you wish +FROM gcr.io/distroless/cc as runner +# copy the built binaries and their runtime dependencies +COPY --from=builder /home/app/build/my_exe/Release/ /home/app/ +WORKDIR /home/app/ +ENTRYPOINT ["./my_exe"]