File tree Expand file tree Collapse file tree 6 files changed +85
-0
lines changed Expand file tree Collapse file tree 6 files changed +85
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This is ci/actions-templates/linux-builds-template.yaml
2
+ # Do not edit this file in .cirrus.yml
3
+
4
+ task :
5
+ name : FreeBSD
6
+ freebsd_instance :
7
+ image : freebsd-13-0-release-amd64
8
+ setup_script : |
9
+ pkg install -y git gmake bash
10
+ echo "========="
11
+ echo "create non-root user and log into it"
12
+ pw group add -n tester
13
+ pw user add -n tester -g tester -s `which bash`
14
+ pw user mod tester -d `pwd`
15
+ chown -R tester .
16
+ sudo -u tester bash ci/cirrus-templates/script.bash
Original file line number Diff line number Diff line change
1
+ # This is ci/actions-templates/linux-builds-template.yaml
2
+ # Do not edit this file in .cirrus.yml
3
+
4
+ task :
5
+ name : FreeBSD
6
+ freebsd_instance :
7
+ image : freebsd-13-0-release-amd64
8
+ setup_script : |
9
+ pkg install -y git gmake bash
10
+ echo "========="
11
+ echo "create non-root user and log into it"
12
+ pw group add -n tester
13
+ pw user add -n tester -g tester -s `which bash`
14
+ pw user mod tester -d `pwd`
15
+ chown -R tester .
16
+ sudo -u tester bash ci/cirrus-templates/script.bash
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ INPATH=$( dirname " $0 " )
4
+ OUTPATH=" ${INPATH} /../.."
5
+
6
+ cp freebsd.yaml " $OUTPATH /.cirrus.yml"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -ex
4
+
5
+ # First, we check that this script is not run as root because it would fail tests.
6
+ if [ " root" == " $( whoami) " ]; then exit 1; fi
7
+
8
+ echo " ========="
9
+ echo " Acquire tags for the repo"
10
+
11
+ git fetch --no-tags --prune --depth=1 origin +refs/tags/* :refs/tags/*
12
+
13
+ echo " ========="
14
+ echo " Display the current git status"
15
+
16
+ git status
17
+ git describe
18
+
19
+ echo " ========="
20
+ echo " Prep cargo dirs"
21
+
22
+ mkdir -p ~ /.cargo/{registry,git}
23
+
24
+ echo " ========="
25
+ echo " Install Rustup using ./rustup-init.sh"
26
+
27
+ sh rustup-init.sh --default-toolchain=stable --profile=minimal -y
28
+ # It's the equivalent of `source`
29
+ source " $HOME " /.cargo/env
30
+
31
+ echo " ========="
32
+ echo " Ensure we have the components we need"
33
+
34
+ rustup component add rustfmt
35
+ rustup component add clippy
36
+
37
+ echo " ========="
38
+ echo " Run the freebsd check"
39
+
40
+ unset SKIP_TESTS
41
+ export LIBZ_SYS_STATIC=1
42
+ export CARGO_BUILD_JOBS=1
43
+ export TARGET=" x86_64-unknown-freebsd"
44
+ bash ci/run.bash
Original file line number Diff line number Diff line change @@ -108,6 +108,8 @@ pub fn this_host_triple() -> String {
108
108
"apple-darwin"
109
109
} else if cfg ! ( target_os = "illumos" ) {
110
110
"unknown-illumos"
111
+ } else if cfg ! ( target_os = "freebsd" ) {
112
+ "unknown-freebsd"
111
113
} else {
112
114
unimplemented ! ( )
113
115
} ;
Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ export PATH="$HOME/apple/bin"
109
109
} ) ;
110
110
}
111
111
112
+ // This test should NOT be run as root!
112
113
#[ test]
113
114
fn install_errors_when_rc_cannot_be_updated ( ) {
114
115
clitools:: setup ( Scenario :: Empty , & |config| {
You can’t perform that action at this time.
0 commit comments