mirror of https://github.com/aminya/setup-cpp
ci: fix node builds
This commit is contained in:
parent
db7a01cfd3
commit
ca0fc58327
|
@ -26,9 +26,10 @@ jobs:
|
||||||
- macos-11
|
- macos-11
|
||||||
cache_reset_counter:
|
cache_reset_counter:
|
||||||
- 0
|
- 0
|
||||||
|
node:
|
||||||
|
- 16
|
||||||
|
- 18
|
||||||
include:
|
include:
|
||||||
- node: 12
|
|
||||||
pnpm: 6
|
|
||||||
- node: 16
|
- node: 16
|
||||||
pnpm: 7
|
pnpm: 7
|
||||||
- node: 18
|
- node: 18
|
||||||
|
@ -69,7 +70,7 @@ jobs:
|
||||||
if: "!contains(github.event.head_commit.message, '[skip test]')"
|
if: "!contains(github.event.head_commit.message, '[skip test]')"
|
||||||
run: |
|
run: |
|
||||||
pnpm run test
|
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
|
# Create self-contained executable that bundles Nodejs
|
||||||
- name: Create Executable
|
- name: Create Executable
|
||||||
|
@ -127,6 +128,7 @@ jobs:
|
||||||
- ubuntu-22.04
|
- ubuntu-22.04
|
||||||
container:
|
container:
|
||||||
- "ubuntu_node.dockerfile"
|
- "ubuntu_node.dockerfile"
|
||||||
|
- "ubuntu_node_legacy.dockerfile"
|
||||||
- "ubuntu_20.04_node_legacy.dockerfile"
|
- "ubuntu_20.04_node_legacy.dockerfile"
|
||||||
- "ubuntu_20.04_node.dockerfile"
|
- "ubuntu_20.04_node.dockerfile"
|
||||||
- "ubuntu_22.04_node.dockerfile"
|
- "ubuntu_22.04_node.dockerfile"
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
FROM ubuntu:22.04 AS base
|
FROM ubuntu:22.04 AS base
|
||||||
|
|
||||||
RUN apt-get update -qq
|
ADD https://deb.nodesource.com/setup_16.x /
|
||||||
RUN apt-get install -y --no-install-recommends nodejs
|
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
|
# add setup-cpp.js
|
||||||
COPY "./dist/node16" "/"
|
COPY "./dist/node16" "/"
|
||||||
|
|
|
@ -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"]
|
Loading…
Reference in New Issue