Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c0bc65c
Working on OpenBSD CI
euantorano Sep 1, 2019
3714adb
Condense steps into 2 steps to make output easier to follow.
euantorano Sep 1, 2019
12ca0b4
Move up one directory after csources build.
euantorano Sep 1, 2019
e6dccad
Start work on FreeBSD CI.
euantorano Sep 2, 2019
2115a97
Install sfml and sdl
euantorano Sep 5, 2019
586153c
SDL2 instead of SDL.
euantorano Sep 5, 2019
615fda1
Remove FreeBSD build manifest and add OpenBSD test ignores for corout…
euantorano Sep 10, 2019
14e0208
If runCI fails, run the test results script.
euantorano Sep 10, 2019
2609175
Add email trigger for build failure
euantorano Sep 11, 2019
1896adf
Remove .git from repository URL
euantorano Sep 11, 2019
7403cb3
Disable SFML test on OpenBSD
euantorano Sep 12, 2019
ade976c
Disable tgetaddrinfo on OpenBSD as only UDP and TCP protocols are sup…
euantorano Sep 12, 2019
de26482
Remove getFilePermissions as it causes CI test failures with NimScript.
euantorano Oct 10, 2019
5ae94ba
Set clang as cc in nim.cfg and use gmake to build csources.
euantorano Oct 28, 2019
9c14f28
Add getCurrentDir to nimscript.
euantorano Oct 28, 2019
65eba78
Remove duplicate getCurrentDir and check for not weirdTarget.
euantorano Oct 28, 2019
245adb0
Add CI badge for OpenBSD.
euantorano Nov 11, 2019
b6da8e5
Disable tests which allocate lots of memory for OpenBSD.
euantorano Nov 11, 2019
f10de56
Use `CORO_BACKEND_SETJMP` on OpenBSD rather than ucontext.
euantorano Nov 11, 2019
df2b448
Simplify building of koch
euantorano Mar 23, 2020
0289dbd
Disable t8657 on OpenBSD. See issue #13760.
euantorano Mar 25, 2020
b51c95a
Fix #12142 - tarray_of_channels fails on OpenBSD
euantorano Mar 26, 2020
30e46dd
Disable thhtpclient_ssl and tosprocterminate on OpenBSD. These tests …
euantorano Mar 31, 2020
d3e844b
Install libffi.
euantorano Mar 31, 2020
c0cee87
Set path to libc for openbsd.
euantorano Mar 31, 2020
f6f8fa3
Disable tevalffi for now.
euantorano Mar 31, 2020
1fa9e57
Remove tevalffi.nim.
euantorano Apr 20, 2020
7c34f75
Use ncpuonline sysctl rather than ncpu.
euantorano Apr 20, 2020
037b763
Disable tacceptcloserace and tasynchttpserver on OpenBSD.
euantorano Apr 20, 2020
64d6bd9
Enable tacceptcloserace and tasynchttpserver.
euantorano Apr 20, 2020
bb60424
Fix #13775 as suggested by @alaviss - use /bin/cat on OpenBSD rather …
euantorano Apr 21, 2020
683d5f5
Enable test on OpenBSD.
euantorano Apr 21, 2020
1cec489
Disable tflowvar on OpenBSD.
euantorano Apr 21, 2020
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/openbsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
image: openbsd/latest
packages:
- gmake
- sqlite3
- node
- boehm-gc
- pcre
- sfml
- sdl2
- libffi
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.ncpuonline)
bin/nim c 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 compiler/evalffi.nim
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ when defined(windows):
const libcDll = "msvcrt.dll"
elif defined(linux):
const libcDll = "libc.so(.6|.5|)"
elif defined(openbsd):
const libcDll = "/usr/lib/libc.so(.95.1|)"
elif defined(bsd):
const libcDll = "/lib/libc.so.7"
elif defined(osx):
Expand Down
2 changes: 1 addition & 1 deletion config/nim.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ path="$lib/pure"
@end
@end

@if macosx or freebsd:
@if macosx or freebsd or openbsd:
cc = clang
tlsEmulation:on
gcc.options.always = "-w"
Expand Down
2 changes: 1 addition & 1 deletion lib/pure/coro.nim
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ when defined(windows):
{.warning: "ucontext coroutine backend is not available on windows, defaulting to fibers.".}
when defined(nimCoroutinesSetjmp):
{.warning: "setjmp coroutine backend is not available on windows, defaulting to fibers.".}
elif defined(haiku):
elif defined(haiku) or defined(openbsd):
const coroBackend = CORO_BACKEND_SETJMP
when defined(nimCoroutinesUcontext):
{.warning: "ucontext coroutine backend is not available on haiku, defaulting to setjmp".}
Expand Down
13 changes: 3 additions & 10 deletions lib/pure/os.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2818,11 +2818,7 @@ when not weirdTarget and (defined(linux) or defined(solaris) or defined(bsd) or
len = readlink(procPath, result, len)
setLen(result, len)

when defined(openbsd):
proc isExecutable(path: string): bool =
let p = getFilePermissions(path)
result = fpUserExec in p and fpGroupExec in p and fpOthersExec in p

when not weirdTarget and defined(openbsd):
proc getApplOpenBsd(): string =
# similar to getApplHeuristic, but checks current working directory
when declared(paramStr):
Expand All @@ -2846,15 +2842,12 @@ when defined(openbsd):
break

if len(result) > 0:
if isExecutable(result):
return expandFilename(result)

return ""
return expandFilename(result)

# search in path
for p in split(string(getEnv("PATH")), {PathSep}):
var x = joinPath(p, exePath)
if existsFile(x) and isExecutable(x):
if existsFile(x):
return expandFilename(x)
else:
result = ""
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] [![builds.sr.ht freebsd status](https://builds.sr.ht/~araq/nim/freebsd.yml.svg)](https://builds.sr.ht/~araq/nim/freebsd.yml?)
# <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?) [![builds.sr.ht openbsd status](https://builds.sr.ht/~araq/nim/openbsd.yml.svg)](https://builds.sr.ht/~araq/nim/openbsd.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 @@ -237,6 +237,8 @@ proc parseSpec*(filename: string): TSpec =
when defined(freebsd): result.err = reDisabled
of "arm64":
when defined(arm64): result.err = reDisabled
of "openbsd":
when defined(openbsd): 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/coroutines/tgc.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
discard """
target: "c"
disabled: "openbsd"
"""

import coro
Expand Down
1 change: 1 addition & 0 deletions tests/coroutines/twait.nim
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
discard """
output: "Exit 1\nExit 2"
disabled: "macosx"
disabled: "openbsd"
target: "c"
"""
import coro
Expand Down
3 changes: 2 additions & 1 deletion tests/dll/nimhcr_integration.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
discard """
disabled: "openbsd"
disabled: "macosx"
output: '''
main: HELLO!
Expand Down Expand Up @@ -151,4 +152,4 @@ update 0
update 1
update 2

echo "done"
echo "done"
1 change: 1 addition & 0 deletions tests/dll/nimhcr_unit.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
discard """
disabled: "openbsd"
output: '''
fastcall_proc implementation #1 10
11
Expand Down
1 change: 1 addition & 0 deletions tests/exception/t9657.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ discard """
action: run
exitcode: 1
target: "c"
disabled: "openbsd"
"""
# todo: remove `target: "c"` workaround once #10343 is properly fixed
close stdmsg
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
Expand Up @@ -2,6 +2,7 @@ discard """
action: compile
disabled: "windows"
disabled: "freebsd"
disabled: "openbsd"
"""

import sfml, os
Expand Down
1 change: 1 addition & 0 deletions tests/parallel/tarray_of_channels.nim
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ test
test
test
'''
disabled: "openbsd"
"""

# bug #2257
Expand Down
1 change: 1 addition & 0 deletions tests/parallel/tflowvar.nim
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ bazbearbazbear

1'''
cmd: "nim $target --threads:on $options $file"
disabled: "openbsd"
"""

import threadpool
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) and not defined(freebsd):
when defined(posix) and not defined(haiku) and not defined(freebsd) and not defined(openbsd):

block RAW_ICMP:
# the port will be ignored
Expand Down
1 change: 1 addition & 0 deletions tests/stdlib/thttpclient_ssl.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
discard """
cmd: "nim $target --threads:on -d:ssl $options $file"
disabled: "openbsd"
"""

# Nim - Basic SSL integration tests
Expand Down
2 changes: 2 additions & 0 deletions tests/stdlib/tosprocterminate.nim
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import os, osproc, times, std / monotimes

when defined(Windows):
const ProgramWhichDoesNotEnd = "notepad"
elif defined(openbsd):
const ProgramWhichDoesNotEnd = "/bin/cat"
else:
const ProgramWhichDoesNotEnd = "/bin/sh"

Expand Down
1 change: 1 addition & 0 deletions tests/system/talloc2.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
discard """
disabled: "windows"
disabled: "openbsd"
joinable: false
disabled: 32bit
"""
Expand Down
1 change: 1 addition & 0 deletions tests/system/trealloc.nim
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
discard """
output: '''success'''
joinable: false
disabled: "openbsd"
"""

# bug #4818
Expand Down