Skip to content
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

#12103 - CI for FreeBSD #12179

Merged
merged 17 commits into from
Nov 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .builds/freebsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
image: freebsd/latest
packages:
- databases/sqlite3
- devel/boehm-gc-threaded
- devel/pcre
- devel/sdl20
- devel/sfml
- www/node
- devel/gmake
- devel/git
sources:
- https://github.com/nim-lang/Nim
environment:
CC: /usr/bin/clang
tasks:
- setup: |
cd Nim
git clone --depth 1 -q https://github.com/nim-lang/csources.git
gmake -C csources -j $(sysctl -n hw.ncpu)
bin/nim c --skipUserCfg --skipParentCfg koch
echo 'export PATH=$HOME/Nim/bin:$PATH' >> $HOME/.buildenv
- test: |
cd Nim
if ! ./koch runCI; then
nim c -r tools/ci_testresults.nim
exit 1
fi
triggers:
- action: email
condition: failure
to: Andreas Rumpf <rumpf_a@web.de>
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,5 @@ megatest.nim
/outputGotten.txt

/lib/pure/*.js

!/.builds/
3 changes: 2 additions & 1 deletion lib/pure/os.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2722,7 +2722,8 @@ when not weirdTarget and (defined(freebsd) or defined(dragonfly)):
result.setLen(0) # error!
break
else:
result.setLen(pathLength)
# trim the trailing null byte, as the result is a string not a cstring
result.setLen(pathLength-1)
euantorano marked this conversation as resolved.
Show resolved Hide resolved
break

when not weirdTarget and (defined(linux) or defined(solaris) or defined(bsd) or defined(aix)):
Expand Down
2 changes: 2 additions & 0 deletions lib/system.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1998,6 +1998,8 @@ when defined(boehmgc):
const boehmLib = "libgc.dylib"
elif defined(openbsd):
const boehmLib = "libgc.so.4.0"
elif defined(freebsd):
const boehmLib = "libgc-threaded.so.1"
else:
const boehmLib = "libgc.so.1"
{.pragma: boehmGC, noconv, dynlib: boehmLib.}
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# <img src="https://raw.githubusercontent.com/nim-lang/assets/master/Art/logo-crown.png" height="28px"/> Nim [![Build Status][badge-nim-travisci]][nim-travisci]
# <img src="https://raw.githubusercontent.com/nim-lang/assets/master/Art/logo-crown.png" height="28px"/> Nim [![Build Status][badge-nim-travisci]][nim-travisci] [![builds.sr.ht freebsd status](https://builds.sr.ht/~araq/nim/freebsd.yml.svg)](https://builds.sr.ht/~araq/nim/freebsd.yml?)

This repository contains the Nim compiler, Nim's stdlib, tools and documentation.
For more information about Nim, including downloads and documentation for
Expand Down
2 changes: 2 additions & 0 deletions testament/specs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ proc parseSpec*(filename: string): TSpec =
of "32bit":
if sizeof(int) == 4:
result.err = reDisabled
of "freebsd":
when defined(freebsd): result.err = reDisabled
else:
result.parseErrors.addLine "cannot interpret as a bool: ", e.value
of "cmd":
Expand Down
1 change: 1 addition & 0 deletions tests/dll/client.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
discard """
output: "Done"
disabled: "freebsd"
cmd: "nim $target --debuginfo --hints:on --define:useNimRtl $options $file"
"""

Expand Down
1 change: 1 addition & 0 deletions tests/js/tconsole.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ discard """
Hello, console
1 2 3
'''
disabled: "freebsd"
"""

# This file tests the JavaScript console
Expand Down
1 change: 1 addition & 0 deletions tests/niminaction/Chapter8/sfml/sfml_test.nim
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
discard """
action: compile
disabled: "windows"
disabled: "freebsd"
"""

import sfml, os
Expand Down
2 changes: 1 addition & 1 deletion tests/stdlib/tgetaddrinfo.nim
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ block DGRAM_UDP:
doAssert aiList.ai_next == nil
freeAddrInfo aiList

when defined(posix) and not defined(haiku):
when defined(posix) and not defined(haiku) and not defined(freebsd):

block RAW_ICMP:
# the port will be ignored
Expand Down