Skip to content

Commit 1337f96

Browse files
authored
Merge pull request #1138 from bjorn3/cirrus_ci
Test FreeBSD on CI
2 parents 658d124 + 47bc1db commit 1337f96

12 files changed

+38
-13
lines changed

.cirrus.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
task:
2+
name: freebsd
3+
freebsd_instance:
4+
image: freebsd-12-1-release-amd64
5+
setup_rust_script:
6+
- pkg install -y curl git bash
7+
- curl https://sh.rustup.rs -sSf --output rustup.sh
8+
- sh rustup.sh --default-toolchain none -y --profile=minimal
9+
cargo_bin_cache:
10+
folder: ~/.cargo/bin
11+
target_cache:
12+
folder: target
13+
prepare_script:
14+
- . $HOME/.cargo/env
15+
- git config --global user.email "[email protected]"
16+
- git config --global user.name "User"
17+
- ./prepare.sh
18+
test_script:
19+
- . $HOME/.cargo/env
20+
- # Enable backtraces for easier debugging
21+
- export RUST_BACKTRACE=1
22+
- # Reduce amount of benchmark runs as they are slow
23+
- export COMPILE_RUNS=2
24+
- export RUN_RUNS=2
25+
- ./test.sh

build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -e
33

44
# Settings
@@ -34,13 +34,13 @@ done
3434
# Build cg_clif
3535
unset CARGO_TARGET_DIR
3636
unamestr=$(uname)
37-
if [[ "$unamestr" == 'Linux' ]]; then
37+
if [[ "$unamestr" == 'Linux' || "$unamestr" == "FreeBSD" ]]; then
3838
export RUSTFLAGS='-Clink-arg=-Wl,-rpath=$ORIGIN/../lib '$RUSTFLAGS
3939
elif [[ "$unamestr" == 'Darwin' ]]; then
4040
export RUSTFLAGS='-Csplit-debuginfo=unpacked -Clink-arg=-Wl,-rpath,@loader_path/../lib -Zosx-rpath-install-name '$RUSTFLAGS
4141
dylib_ext='dylib'
4242
else
43-
echo "Unsupported os"
43+
echo "Unsupported os $unamestr"
4444
exit 1
4545
fi
4646
if [[ "$CHANNEL" == "release" ]]; then

build_sysroot/build_sysroot.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Requires the CHANNEL env var to be set to `debug` or `release.`
44

build_sysroot/prepare_sysroot_src.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -e
33
cd "$(dirname "$0")"
44

clean_all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash --verbose
1+
#!/usr/bin/env bash
22
set -e
33

44
rm -rf target/ build/ build_sysroot/{sysroot_src/,target/,compiler-builtins/} perf.data{,.old}

prepare.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash --verbose
1+
#!/usr/bin/env bash
22
set -e
33

44
rustup component add rust-src rustc-dev llvm-tools-preview

scripts/cargo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
dir=$(dirname "$0")
44
source "$dir/config.sh"

scripts/config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e
44

55
unamestr=$(uname)
6-
if [[ "$unamestr" == 'Linux' ]]; then
6+
if [[ "$unamestr" == 'Linux' || "$unamestr" == 'FreeBSD' ]]; then
77
dylib_ext='so'
88
elif [[ "$unamestr" == 'Darwin' ]]; then
99
dylib_ext='dylib'

scripts/rustup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e
44

scripts/test_bootstrap.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -e
33

44
cd "$(dirname "$0")/../"

scripts/tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e
44

test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -e
33

44
./build.sh --sysroot none "$@"

0 commit comments

Comments
 (0)