Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Add .cirrus.yml for FreeBSD (amd64, i386) CI/CD #2911

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Use fresh repository definition
saper committed Apr 27, 2020
commit b81e2bbb113bfa95a2adc0e64dda153fa970fb6a
42 changes: 15 additions & 27 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -5,52 +5,40 @@ freebsd_build_task:

env:
matrix:
- node_js: 13
nodeTxzKey: node-13
npmTxzKey: npm-6
- node_js: 12
nodeTxzKey: node12
npmTxzKey: npm-node12
- node_js: 10
nodeTxzKey: node10
npmTxzKey: npm-node10
- package: npm
- package: npm-node12
- package: npm-node10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we expand out the matrix to the other versions we currently list as supported for FreeBSD?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I forgot it. Back to work :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can limit this to v5 also to make our lives a bit easier.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been only building binaries for node version currently in the FreeBSD ports tree, which are 10, 12 and 13 now. Pushed the commit to expand the matrix.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can drop 10 now, but it would be good to try and get 12, 14, 16, 17 to match the other platforms


env:
matrix:
- abi: freebsd:11:x86:64
- abi: freebsd:11:x86:32
jailName: j11i386
execPrefix: cbsd jexec jname=j11i386
jail_name: j11i386
exec_prefix: cbsd jexec jname=j11i386

env:
GH_API_TOKEN: ENCRYPTED[5e482f417304528148bb96eca8d030eacd6ab9972d482485fc4d42907283b995f658b351e0676e9493a37d815398f541]
A pkg_latest: pkg -R "${CIRRUS_WORKING_DIR}/.cirrus/pkg/repos"

prepare_script:
- sed -i '' 's/quarterly/latest/g' /etc/pkg/FreeBSD.conf
- $pkg_latest update -f;
- |
if test "$abi" = "freebsd:11:x86:32"; then
./scripts/configure_freebsd_ci_jail.sh $jailName $CIRRUS_WORKING_DIR;
$execPrefix sed -i -- '' 's/quarterly/latest/g' /etc/pkg/FreeBSD.conf;
$execPrefix pkg update -f;
$execPrefix pkg install -y python2 > /dev/null;
$pkg_latest -y cbsd
./scripts/configure_freebsd_ci_jail.sh $jail_name $CIRRUS_WORKING_DIR;
$exec_prefix $pkg_latest update -f;
fi
- $execPrefix pkg install -y c-ares gmake icu libnghttp2 libuv git > /dev/null
- |
fetch http://pkg.freebsd.org/$abi/latest/All/ -o list
nodeTxz=$(sed -n "/\"$nodeTxzKey/s/.*\"\($nodeTxzKey[^\"]*\).*/\1/p" list)
npmTxz=$(sed -n "/\"$npmTxzKey/s/.*\"\($npmTxzKey[^\"]*\).*/\1/p" list)
$execPrefix pkg add http://pkg.freebsd.org/$abi/latest/All/$nodeTxz
$execPrefix pkg add http://pkg.freebsd.org/$abi/latest/All/$npmTxz
- $execPrefix node --version
- $execPrefix npm --version
- $execPrefix clang++ --version
- $exec_prefix $pkg_latest install -y "${package}" python2
- $exec_prefix node --version
- $exec_prefix npm --version
- $exec_prefix clang++ --version

build_script:
- |
if test "$abi" = "freebsd:11:x86:32"; then
changeDir="cd /etc/skel &&"
fi
echo "$changeDir npm install --unsafe-perm" | $execPrefix /bin/sh
echo "$changeDir npm install --unsafe-perm" | $exec_prefix /bin/sh

publish_script:
- |
7 changes: 7 additions & 0 deletions .cirrus/pkg/repos/FreeBSD.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
5 changes: 0 additions & 5 deletions scripts/configure_freebsd_ci_jail.sh
Original file line number Diff line number Diff line change
@@ -8,11 +8,6 @@ cbsd_workdir=/usr/jails
jail_arch="i386"
jail_ver="11.3"

pkg install -y cbsd

echo "Pkg configuration:"
cat /etc/pkg/FreeBSD.conf

# determine uplink ip address
# determine uplink iface
echo "Interface configuration:"