Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Jan 30, 2020
1 parent c5c5375 commit b054af5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@ jobs:
EOF
sudo apt-fast update -qq
# `:i386` (e.g. in `libffi-dev:i386`) is needed otherwise you may get:
# `could not load: libffi.so` during dynamic loading.
DEBIAN_FRONTEND='noninteractive' \
sudo apt-fast install --no-install-recommends --allow-downgrades -yq \
g++-multilib gcc-multilib libcurl4-openssl-dev:i386 libgc-dev:i386 \
libsdl1.2-dev:i386 libsfml-dev:i386 libglib2.0-dev:i386 libffi-dev
libsdl1.2-dev:i386 libsfml-dev:i386 libglib2.0-dev:i386 libffi-dev:i386
cat << EOF > bin/gcc
#!/bin/bash
Expand Down
11 changes: 7 additions & 4 deletions koch.nim
Original file line number Diff line number Diff line change
Expand Up @@ -485,10 +485,6 @@ proc runCI(cmd: string) =
## build nimble early on to enable remainder to depend on it if needed
kochExecFold("Build Nimble", "nimble")

## test -d:nimHasLibFFI
execFold("nimble install -y libffi", "nimble install -y libffi")
kochExecFold("boot -d:release -d:nimHasLibFFI", "boot -d:release -d:nimHasLibFFI")

if getEnv("NIM_TEST_PACKAGES", "false") == "true":
execFold("Test selected Nimble packages", "nim c -r testament/testament cat nimble-packages")
else:
Expand All @@ -502,6 +498,13 @@ proc runCI(cmd: string) =

# main bottleneck here
execFold("Run tester", "nim c -r -d:nimCoroutines testament/testament --pedantic all -d:nimCoroutines")
block: # CT FFI
when defined(posix): # windows can be handled in future PR's
execFold("nimble install -y libffi", "nimble install -y libffi")
const nimFFI = "./bin/nim.ctffi"
# no need to bootstrap with koch boot (would be slower)
execFold("build with -d:nimHasLibFFI", "nim c -d:release -d:nimHasLibFFI -o:$1 compiler/nim.nim" % [nimFFI])
execFold("test with -d:nimHasLibFFI", "nim c -r testament/testament --nim:$1 r tests/vm/tevalffi.nim" % [nimFFI])

execFold("Run nimdoc tests", "nim c -r nimdoc/tester")
execFold("Run nimpretty tests", "nim c -r nimpretty/tester.nim")
Expand Down
1 change: 1 addition & 0 deletions tests/vm/tevalffi.nim
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ foo:102:103:104
foo:0.03:asdf:103:105
ret={s1:foobar s2:foobar age:25 pi:3.14}
'''
disabled: "windows"
"""

# re-enable for windows once libffi can be installed in koch.nim
Expand Down

0 comments on commit b054af5

Please sign in to comment.