* Working on OpenBSD CI * Condense steps into 2 steps to make output easier to follow. * Move up one directory after csources build. * Remove FreeBSD build manifest and add OpenBSD test ignores for coroutines and hot code reloading. * If runCI fails, run the test results script. * Add email trigger for build failure * Remove .git from repository URL * Disable SFML test on OpenBSD * Disable tgetaddrinfo on OpenBSD as only UDP and TCP protocols are supported. * Remove getFilePermissions as it causes CI test failures with NimScript. * Set clang as cc in nim.cfg and use gmake to build csources. * Add getCurrentDir to nimscript. * Remove duplicate getCurrentDir and check for not weirdTarget. * Add CI badge for OpenBSD. * Disable tests which allocate lots of memory for OpenBSD. * Use `CORO_BACKEND_SETJMP` on OpenBSD rather than ucontext. * Simplify building of koch * Disable t8657 on OpenBSD. See issue #13760. * Fix #12142 - tarray_of_channels fails on OpenBSD * Disable thhtpclient_ssl and tosprocterminate on OpenBSD. These tests can be enabled at a later date after fixing them. * Install libffi. * Set path to libc for openbsd. * Disable tevalffi for now. * Remove tevalffi.nim. * Use ncpuonline sysctl rather than ncpu. * Disable tacceptcloserace and tasynchttpserver on OpenBSD. * Enable tacceptcloserace and tasynchttpserver. * Fix #13775 as suggested by @alaviss - use /bin/cat on OpenBSD rather than /bin/sh. * Enable test on OpenBSD. * Disable tflowvar on OpenBSD.
This commit is contained in:
parent
89e6a7ab48
commit
7828199827
20 changed files with 56 additions and 15 deletions
31
.builds/openbsd.yml
Normal file
31
.builds/openbsd.yml
Normal file
|
|
@ -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>
|
||||||
|
|
@ -17,6 +17,8 @@ when defined(windows):
|
||||||
const libcDll = "msvcrt.dll"
|
const libcDll = "msvcrt.dll"
|
||||||
elif defined(linux):
|
elif defined(linux):
|
||||||
const libcDll = "libc.so(.6|.5|)"
|
const libcDll = "libc.so(.6|.5|)"
|
||||||
|
elif defined(openbsd):
|
||||||
|
const libcDll = "/usr/lib/libc.so(.95.1|)"
|
||||||
elif defined(bsd):
|
elif defined(bsd):
|
||||||
const libcDll = "/lib/libc.so.7"
|
const libcDll = "/lib/libc.so.7"
|
||||||
elif defined(osx):
|
elif defined(osx):
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ path="$lib/pure"
|
||||||
@end
|
@end
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@if macosx or freebsd:
|
@if macosx or freebsd or openbsd:
|
||||||
cc = clang
|
cc = clang
|
||||||
tlsEmulation:on
|
tlsEmulation:on
|
||||||
gcc.options.always = "-w"
|
gcc.options.always = "-w"
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ when defined(windows):
|
||||||
{.warning: "ucontext coroutine backend is not available on windows, defaulting to fibers.".}
|
{.warning: "ucontext coroutine backend is not available on windows, defaulting to fibers.".}
|
||||||
when defined(nimCoroutinesSetjmp):
|
when defined(nimCoroutinesSetjmp):
|
||||||
{.warning: "setjmp coroutine backend is not available on windows, defaulting to fibers.".}
|
{.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
|
const coroBackend = CORO_BACKEND_SETJMP
|
||||||
when defined(nimCoroutinesUcontext):
|
when defined(nimCoroutinesUcontext):
|
||||||
{.warning: "ucontext coroutine backend is not available on haiku, defaulting to setjmp".}
|
{.warning: "ucontext coroutine backend is not available on haiku, defaulting to setjmp".}
|
||||||
|
|
|
||||||
|
|
@ -2818,11 +2818,7 @@ when not weirdTarget and (defined(linux) or defined(solaris) or defined(bsd) or
|
||||||
len = readlink(procPath, result, len)
|
len = readlink(procPath, result, len)
|
||||||
setLen(result, len)
|
setLen(result, len)
|
||||||
|
|
||||||
when defined(openbsd):
|
when not weirdTarget and defined(openbsd):
|
||||||
proc isExecutable(path: string): bool =
|
|
||||||
let p = getFilePermissions(path)
|
|
||||||
result = fpUserExec in p and fpGroupExec in p and fpOthersExec in p
|
|
||||||
|
|
||||||
proc getApplOpenBsd(): string =
|
proc getApplOpenBsd(): string =
|
||||||
# similar to getApplHeuristic, but checks current working directory
|
# similar to getApplHeuristic, but checks current working directory
|
||||||
when declared(paramStr):
|
when declared(paramStr):
|
||||||
|
|
@ -2846,15 +2842,12 @@ when defined(openbsd):
|
||||||
break
|
break
|
||||||
|
|
||||||
if len(result) > 0:
|
if len(result) > 0:
|
||||||
if isExecutable(result):
|
return expandFilename(result)
|
||||||
return expandFilename(result)
|
|
||||||
|
|
||||||
return ""
|
|
||||||
|
|
||||||
# search in path
|
# search in path
|
||||||
for p in split(string(getEnv("PATH")), {PathSep}):
|
for p in split(string(getEnv("PATH")), {PathSep}):
|
||||||
var x = joinPath(p, exePath)
|
var x = joinPath(p, exePath)
|
||||||
if existsFile(x) and isExecutable(x):
|
if existsFile(x):
|
||||||
return expandFilename(x)
|
return expandFilename(x)
|
||||||
else:
|
else:
|
||||||
result = ""
|
result = ""
|
||||||
|
|
|
||||||
|
|
@ -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] [](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] [](https://builds.sr.ht/~araq/nim/freebsd.yml?) [](https://builds.sr.ht/~araq/nim/openbsd.yml?)
|
||||||
|
|
||||||
This repository contains the Nim compiler, Nim's stdlib, tools and documentation.
|
This repository contains the Nim compiler, Nim's stdlib, tools and documentation.
|
||||||
For more information about Nim, including downloads and documentation for
|
For more information about Nim, including downloads and documentation for
|
||||||
|
|
|
||||||
|
|
@ -237,6 +237,8 @@ proc parseSpec*(filename: string): TSpec =
|
||||||
when defined(freebsd): result.err = reDisabled
|
when defined(freebsd): result.err = reDisabled
|
||||||
of "arm64":
|
of "arm64":
|
||||||
when defined(arm64): result.err = reDisabled
|
when defined(arm64): result.err = reDisabled
|
||||||
|
of "openbsd":
|
||||||
|
when defined(openbsd): result.err = reDisabled
|
||||||
else:
|
else:
|
||||||
result.parseErrors.addLine "cannot interpret as a bool: ", e.value
|
result.parseErrors.addLine "cannot interpret as a bool: ", e.value
|
||||||
of "cmd":
|
of "cmd":
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
discard """
|
discard """
|
||||||
target: "c"
|
target: "c"
|
||||||
|
disabled: "openbsd"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import coro
|
import coro
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
discard """
|
discard """
|
||||||
output: "Exit 1\nExit 2"
|
output: "Exit 1\nExit 2"
|
||||||
disabled: "macosx"
|
disabled: "macosx"
|
||||||
|
disabled: "openbsd"
|
||||||
target: "c"
|
target: "c"
|
||||||
"""
|
"""
|
||||||
import coro
|
import coro
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
|
disabled: "openbsd"
|
||||||
disabled: "macosx"
|
disabled: "macosx"
|
||||||
output: '''
|
output: '''
|
||||||
main: HELLO!
|
main: HELLO!
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
|
disabled: "openbsd"
|
||||||
output: '''
|
output: '''
|
||||||
fastcall_proc implementation #1 10
|
fastcall_proc implementation #1 10
|
||||||
11
|
11
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ discard """
|
||||||
action: run
|
action: run
|
||||||
exitcode: 1
|
exitcode: 1
|
||||||
target: "c"
|
target: "c"
|
||||||
|
disabled: "openbsd"
|
||||||
"""
|
"""
|
||||||
# todo: remove `target: "c"` workaround once #10343 is properly fixed
|
# todo: remove `target: "c"` workaround once #10343 is properly fixed
|
||||||
close stdmsg
|
close stdmsg
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ discard """
|
||||||
action: compile
|
action: compile
|
||||||
disabled: "windows"
|
disabled: "windows"
|
||||||
disabled: "freebsd"
|
disabled: "freebsd"
|
||||||
|
disabled: "openbsd"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import sfml, os
|
import sfml, os
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ test
|
||||||
test
|
test
|
||||||
test
|
test
|
||||||
'''
|
'''
|
||||||
|
disabled: "openbsd"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# bug #2257
|
# bug #2257
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ bazbearbazbear
|
||||||
|
|
||||||
1'''
|
1'''
|
||||||
cmd: "nim $target --threads:on $options $file"
|
cmd: "nim $target --threads:on $options $file"
|
||||||
|
disabled: "openbsd"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import threadpool
|
import threadpool
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ block DGRAM_UDP:
|
||||||
doAssert aiList.ai_next == nil
|
doAssert aiList.ai_next == nil
|
||||||
freeAddrInfo aiList
|
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:
|
block RAW_ICMP:
|
||||||
# the port will be ignored
|
# the port will be ignored
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
discard """
|
discard """
|
||||||
cmd: "nim $target --threads:on -d:ssl $options $file"
|
cmd: "nim $target --threads:on -d:ssl $options $file"
|
||||||
|
disabled: "openbsd"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Nim - Basic SSL integration tests
|
# Nim - Basic SSL integration tests
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ import os, osproc, times, std / monotimes
|
||||||
|
|
||||||
when defined(Windows):
|
when defined(Windows):
|
||||||
const ProgramWhichDoesNotEnd = "notepad"
|
const ProgramWhichDoesNotEnd = "notepad"
|
||||||
|
elif defined(openbsd):
|
||||||
|
const ProgramWhichDoesNotEnd = "/bin/cat"
|
||||||
else:
|
else:
|
||||||
const ProgramWhichDoesNotEnd = "/bin/sh"
|
const ProgramWhichDoesNotEnd = "/bin/sh"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
discard """
|
discard """
|
||||||
disabled: "windows"
|
disabled: "windows"
|
||||||
|
disabled: "openbsd"
|
||||||
joinable: false
|
joinable: false
|
||||||
disabled: 32bit
|
disabled: 32bit
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
discard """
|
discard """
|
||||||
output: '''success'''
|
output: '''success'''
|
||||||
joinable: false
|
joinable: false
|
||||||
|
disabled: "openbsd"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# bug #4818
|
# bug #4818
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue