New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Move emscripten to ubuntu docker builds #105
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
#!/bin/bash | ||
set -ev | ||
|
||
# Get ninja-build | ||
wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip | ||
unzip ninja-linux.zip | ||
mv ninja /usr/local/bin/ | ||
ninja --version | ||
|
||
git submodule update --init | ||
|
||
# Build native corrade-rc | ||
mkdir build && cd build || exit /b | ||
cmake .. \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_MAKE_PROGRAM=ninja \ | ||
-DCMAKE_INSTALL_PREFIX=$HOME/deps-native \ | ||
-DWITH_INTERCONNECT=OFF \ | ||
-DWITH_PLUGINMANAGER=OFF \ | ||
|
@@ -19,16 +26,16 @@ cd .. | |
# Crosscompile | ||
mkdir build-emscripten && cd build-emscripten | ||
cmake .. \ | ||
-DCMAKE_MAKE_PROGRAM=ninja \ | ||
-DCORRADE_RC_EXECUTABLE=$HOME/deps-native/bin/corrade-rc \ | ||
-DCMAKE_TOOLCHAIN_FILE="../toolchains/generic/Emscripten-wasm.cmake" \ | ||
-DEMSCRIPTEN_PREFIX=$(echo /usr/local/Cellar/emscripten/*/libexec) \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG -O1" \ | ||
-DCMAKE_INSTALL_PREFIX=$HOME/deps \ | ||
-DCMAKE_EXE_LINKER_FLAGS_RELEASE="-O1" \ | ||
-DBUILD_TESTS=ON \ | ||
-G Ninja | ||
ninja -j4 | ||
ninja -j2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just I faintly remember I had to do this because otherwise at some point it was running 8 jobs at once, running out of memory. Probably not an issue nowadays anymore. |
||
|
||
# Test | ||
CORRADE_TEST_COLOR=ON ctest -V | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,13 +98,19 @@ matrix: | |
env: | ||
- JOBID=ios | ||
- TARGET=ios-simulator | ||
- language: cpp | ||
os: osx | ||
- language: generic | ||
os: ubuntu | ||
services: | ||
- docker | ||
# Using whatever is the default, since that could be hopefully most | ||
# up-to-date | ||
env: | ||
- JOBID=emscripten | ||
- TARGET=emscripten | ||
- EMSCRIPTEN_VERSION=2.0.7 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I want to test on the oldest version available, ideally exactly what was there on Mac (1.38.42) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The docker image supports everything above 1.39.0, 1.38.42 is pretty ancient There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok then 1.39.0 :) |
||
before_install: | ||
- docker pull emscripten/emsdk:${EMSCRIPTEN_VERSION} | ||
- docker ps -a | ||
- language: android | ||
os: linux | ||
# Setting xenial here will cause it to use 12.04, with GCC 4.6 and other | ||
|
@@ -179,7 +185,7 @@ script: | |
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ]; then ./package/ci/travis-android-arm.sh; fi | ||
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then ./package/ci/travis-desktop.sh; fi | ||
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "ios-simulator" ]; then ./package/ci/travis-ios-simulator.sh; fi | ||
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "emscripten" ]; then ./package/ci/travis-emscripten.sh; fi | ||
- if [ "$TARGET" == "emscripten" ]; then docker run -v $TRAVIS_BUILD_DIR:/github -w /github -t emscripten/emsdk:${EMSCRIPTEN_VERSION} /bin/bash -c ./package/ci/travis-emscripten.sh; fi | ||
# Travis somehow is not able to gather all output, try to force it using this | ||
- sync | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh. I suppose
apt install ninja
just doesn't work on docker, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, actually sure, that would work, if there's a package (I assume it's called ninja-build, though?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the yml it's listed among the packages, but I think it's ninja-build, yes.