Skip to content

Commit

Permalink
Hack: Attempt to make Nim building to work by moving config.nims out
Browse files Browse the repository at this point in the history
This should get me around the issue reported in
nim-lang/Nim#15843.

> /home/travis/build/kaushalmodi/hello_musl/nim/4c19c5dfae01638ae66fc2c1561762d94fb36a1a/lib/pure/fenv.nim(17,
3) Error: cannot 'importc' variable at compile time; FE_DIVBYZERO
  • Loading branch information
kaushalmodi committed May 7, 2021
1 parent 6c91923 commit 05c1477
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ install:
- |
if [[ ! -f "${NIMDIR}/bin/nim" ]]
then
# If the git repo contains a config.nims, temporarily move it, else it fails the
# building of koch.
if [[ -f "${TRAVIS_BUILD_DIR}/config.nims" ]]
then
mv "${TRAVIS_BUILD_DIR}/config.nims" "${TRAVIS_BUILD_DIR}/config.nims.bkp"
fi
rm -rf nim
mkdir -p nim
git clone --single-branch --branch devel --depth=1 "${NIMREPO}" "${NIMDIR}"
Expand All @@ -61,6 +67,11 @@ install:
./koch boot -d:release
# After building nim, wipe csources to save on cache space.
rm -rf csources
# Restore the backed up config.nims if present.
if [[ -f "${TRAVIS_BUILD_DIR}/config.nims.bkp" ]]
then
mv "${TRAVIS_BUILD_DIR}/config.nims.bkp" "${TRAVIS_BUILD_DIR}/config.nims"
fi
fi
# - |
# if [[ ! -f "${NIMDIR}/bin/nimble" ]]
Expand Down

0 comments on commit 05c1477

Please sign in to comment.