From 614f4db8a6ec645e039e63243425e47689314597 Mon Sep 17 00:00:00 2001
From: Koichiro IWAO
Date: Thu, 5 Dec 2019 11:21:57 +0900
Subject: [PATCH 1/6] FreeBSD CI: GNU make is not necessary
test if build passes with BSD make
---
.cirrus.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.cirrus.yml b/.cirrus.yml
index d5ee3c17..e2052636 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -4,9 +4,9 @@ FreeBSD_task:
env:
ASSUME_ALWAYS_YES: TRUE # required for unattanded "pkg" invocation
install_script:
- - pkg install cmake gmake openssl111 git
+ - pkg install cmake openssl111 git
- git submodule update --init --recursive
script:
- ./configure
- - gmake -j $(nproc || sysctl -n hw.ncpu || echo 4) -C tmp
+ - make -j $(nproc || sysctl -n hw.ncpu || echo 4) -C tmp
- ldd build/vpnserver
From d1471048d996d37a6ea04f1860cc1eb60b027e09 Mon Sep 17 00:00:00 2001
From: Koichiro IWAO
Date: Thu, 5 Dec 2019 11:59:22 +0900
Subject: [PATCH 2/6] FreeBSD CI: sysctl -n hw.ncpu is enough to get number of
cpus
nproc can be installed as gncpu as a part of sysutils/coreutils but not
necessary for this case.
---
.cirrus.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.cirrus.yml b/.cirrus.yml
index e2052636..29796bec 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -8,5 +8,5 @@ FreeBSD_task:
- git submodule update --init --recursive
script:
- ./configure
- - make -j $(nproc || sysctl -n hw.ncpu || echo 4) -C tmp
+ - make -j $(sysctl -n hw.ncpu || echo 4) -C tmp
- ldd build/vpnserver
From 80ba3345d1d0d88eacf02c354c2ecf9d9c550138 Mon Sep 17 00:00:00 2001
From: Koichiro IWAO
Date: Thu, 5 Dec 2019 12:02:32 +0900
Subject: [PATCH 3/6] FreeBSD CI: perform self-check command after build
---
.cirrus.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.cirrus.yml b/.cirrus.yml
index 29796bec..1bb4b1d1 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -10,3 +10,4 @@ FreeBSD_task:
- ./configure
- make -j $(sysctl -n hw.ncpu || echo 4) -C tmp
- ldd build/vpnserver
+ - build/vpncmd /tool /cmd:check
From e4aff409f8ddbc060e51ec2677cd380385144bf1 Mon Sep 17 00:00:00 2001
From: Koichiro IWAO
Date: Fri, 6 Dec 2019 09:45:19 +0900
Subject: [PATCH 4/6] FreeBSD CI: switch to the latest 12.1-RELEASE
---
.cirrus.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.cirrus.yml b/.cirrus.yml
index 1bb4b1d1..c0146b62 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -1,6 +1,6 @@
FreeBSD_task:
freebsd_instance:
- image: freebsd-12-0-release-amd64
+ image: freebsd-12-1-release-amd64
env:
ASSUME_ALWAYS_YES: TRUE # required for unattanded "pkg" invocation
install_script:
From c38b0b039833301221460cef07630b6163e238d9 Mon Sep 17 00:00:00 2001
From: Koichiro IWAO
Date: Fri, 6 Dec 2019 11:41:32 +0900
Subject: [PATCH 5/6] FreeBSD CI: also perform test on 11.3-STABLE
The official guide [1] says 11.3-RELEASE doesn't boot properly so
using 11.3-STABLE instead.
[1] https://cirrus-ci.org/guide/FreeBSD/
---
.cirrus.yml | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/.cirrus.yml b/.cirrus.yml
index c0146b62..81b6b328 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -11,3 +11,18 @@ FreeBSD_task:
- make -j $(sysctl -n hw.ncpu || echo 4) -C tmp
- ldd build/vpnserver
- build/vpncmd /tool /cmd:check
+
+FreeBSD_task:
+ freebsd_instance:
+ # 11-3-release doesn't boot: https://cirrus-ci.org/guide/FreeBSD/
+ image: freebsd-11-3-stable-amd64-v20191205
+ env:
+ ASSUME_ALWAYS_YES: TRUE # required for unattanded "pkg" invocation
+ install_script:
+ - pkg install cmake openssl111 git
+ - git submodule update --init --recursive
+ script:
+ - ./configure
+ - make -j $(sysctl -n hw.ncpu || echo 4) -C tmp
+ - ldd build/vpnserver
+ - build/vpncmd /tool /cmd:check
From 1c07ddcb8d3b5c69456a712b997ce2cae948b51c Mon Sep 17 00:00:00 2001
From: Koichiro IWAO
Date: Fri, 6 Dec 2019 15:17:34 +0900
Subject: [PATCH 6/6] FreeBSD CI: perform memory leak test as well as
Linux/Windows
and also move `vpncmd /tools /cmd:check` under .ci directory.
---
.ci/vpntools-check.sh | 5 +++++
.cirrus.yml | 6 ++++--
2 files changed, 9 insertions(+), 2 deletions(-)
create mode 100755 .ci/vpntools-check.sh
diff --git a/.ci/vpntools-check.sh b/.ci/vpntools-check.sh
new file mode 100755
index 00000000..c5deda52
--- /dev/null
+++ b/.ci/vpntools-check.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -eux
+
+./build/vpncmd /tools /cmd:check
diff --git a/.cirrus.yml b/.cirrus.yml
index 81b6b328..e05f1c0d 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -10,7 +10,8 @@ FreeBSD_task:
- ./configure
- make -j $(sysctl -n hw.ncpu || echo 4) -C tmp
- ldd build/vpnserver
- - build/vpncmd /tool /cmd:check
+ - .ci/memory-leak-test.sh
+ - .ci/vpntools-check.sh
FreeBSD_task:
freebsd_instance:
@@ -25,4 +26,5 @@ FreeBSD_task:
- ./configure
- make -j $(sysctl -n hw.ncpu || echo 4) -C tmp
- ldd build/vpnserver
- - build/vpncmd /tool /cmd:check
+ - .ci/memory-leak-test.sh
+ - .ci/vpntools-check.sh