-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: emscripten experimental support
- Loading branch information
Showing
4 changed files
with
88 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# ref: https://github.com/docker-library/official-images | ||
name: amd64 Web | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
Distros: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Check docker | ||
run: | | ||
docker info | ||
docker buildx ls | ||
- name: Build env image | ||
run: make --directory=cmake web_env | ||
- name: Build devel project | ||
run: make --directory=cmake web_devel | ||
- name: Build project | ||
run: make --directory=cmake web_build | ||
- name: Test project | ||
run: make --directory=cmake web_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Create a virtual environment with all tools installed | ||
# ref: https://hub.docker.com/_/archlinux/ | ||
FROM archlinux:latest AS env | ||
# Install system build dependencies | ||
ENV PATH=/usr/local/bin:$PATH | ||
RUN pacman -Syu --noconfirm git base-devel cmake | ||
RUN cmake -version | ||
RUN pacman -Syu --noconfirm nodejs emscripten | ||
ENV PATH=/usr/lib/emscripten:$PATH | ||
RUN emcc -v | ||
|
||
# Add the library src to our build env | ||
FROM env AS devel | ||
WORKDIR /home/project | ||
COPY . . | ||
|
||
FROM devel AS build | ||
RUN emcmake cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPS=ON | ||
RUN cmake --build build --target all -v | ||
#RUN cmake --build build --target install -v | ||
|
||
FROM build AS test | ||
#RUN CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --target test | ||
RUN cd build && ctest -V |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters