-
Notifications
You must be signed in to change notification settings - Fork 347
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
Elm ? (How to do Continuous Integration with Travis-CI for Elm-lang projects) #31
Comments
The language: node_js
node_js: node
cache:
directories:
- elm-stuff/build-artifacts
- elm-stuff/packages
- test/elm-stuff/build-artifacts
- test/elm-stuff/packages
- sysconfcpus
before_install:
- if [ ${TRAVIS_OS_NAME} == "osx" ];
then brew update; brew install nvm; mkdir ~/.nvm; export NVM_DIR=~/.nvm; source $(brew --prefix nvm)/nvm.sh;
fi
- | # epic build time improvement - see https://github.com/elm-lang/elm-compiler/issues/1473#issuecomment-245704142
if [ ! -d sysconfcpus/bin ];
then
git clone https://github.com/obmarg/libsysconfcpus.git;
cd libsysconfcpus;
./configure --prefix=$TRAVIS_BUILD_DIR/sysconfcpus;
make && make install;
cd ..;
fi
install:
- npm install -g elm [email protected] |
I thought it looked "too simple" ... 🙄 So looks like we need a bit more detail ... |
This is a very insightful thread if you want to know more about running Elm on CI: |
Test https://travis-ci.org/nelsonic/photo-groove/jobs/324609782 ran for 19 minutes ... ⏳ 😖 then using elm/compiler#1473 (comment) (compiler CPU config script) |
confirmed that With No elm code changed. (only ConclusionThe following language: node_js # elm is installed from npm (see install below)
node_js: node # use "latest" version of Node.js
env:
- ELM_VERSION=0.18.0 ELM_TEST=0.18.12
cache:
directories: # so subsequent builds run faster
- elm-stuff/build-artifacts
- elm-stuff/packages
- tests/elm-stuff/build-artifacts # elm-test init creates a "tests/" dir
- tests/elm-stuff/packages # cache files that haven't changed
- sysconfcpus
- $HOME/.npm # https://stackoverflow.com/a/42523517/1148249
before_install:
- | # build time improvement see: https://git.io/vQcqz
if [ ! -d sysconfcpus/bin ];
then
git clone https://github.com/obmarg/libsysconfcpus.git;
cd libsysconfcpus;
./configure --prefix=$TRAVIS_BUILD_DIR/sysconfcpus;
make && make install;
cd ..;
fi
install: # install specific versions of elm & elm-test
- npm install -g elm@$ELM_VERSION elm-test@$ELM_TEST
# the next 3 lines are courtesy of @rtfeldman https://git.io/vbj0j
- mv $(npm config get prefix)/bin/elm-make $(npm config get prefix)/bin/elm-make-old
- printf "#\041/bin/bash\n\necho \"Running elm-make with sysconfcpus -n 2\"\n\n$TRAVIS_BUILD_DIR/sysconfcpus/bin/sysconfcpus -n 2 elm-make-old \"\$@\"" > $(npm config get prefix)/bin/elm-make
- chmod +x $(npm config get prefix)/bin/elm-make
- travis_retry elm package install --yes # install main project dependencies
script:
- elm-test --verbose
|
What is the bare minimum required in the
.travis.yml
file to test an Elm project on Travis-CI?Examples:
The available examples include quite a lot of uncommented code ...
We need to clarify why each line exists so other people can understand the file.
The text was updated successfully, but these errors were encountered: