forked from static-web-server/static-web-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cirrus.yml
79 lines (77 loc) · 2.62 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
freebsd_instance:
image: freebsd-13-1-release-amd64
# Test FreeBSD in a full VM on cirrus-ci.com
# The binary will be also built in 32-bit mode, but will execute on a
# 64-bit kernel and in a 64-bit environment. Our tests don't execute
# any of the system's binaries, so the environment shouldn't matter.
task:
only_if: $CIRRUS_TAG == ''
env:
RUSTFLAGS: -Dwarnings --cfg tokio_unstable
CARGO_FEATURES: "--features=all"
matrix:
- name: freebsd-amd64-test
env:
BINARY_ARCH: x86_64
- name: freebsd-i686-test
env:
BINARY_ARCH: i686
setup_script:
- pkg install -y bash
- curl https://sh.rustup.rs -sSf --output rustup.sh
- sh rustup.sh -y --profile minimal --default-toolchain stable
- . $HOME/.cargo/env
- cp -r .cargo/config.toml $HOME/.cargo/
- rustc --version
toolchain_script:
- . $HOME/.cargo/env
- rustup target add $BINARY_ARCH-unknown-freebsd
info_script:
- . $HOME/.cargo/env
- rustup show
test_script:
- . $HOME/.cargo/env
- |
cargo test --all --target="$BINARY_ARCH-unknown-freebsd" $CARGO_FEATURES
build_test_script:
- . $HOME/.cargo/env
- |
cargo build --bin static-web-server -vv --target="$BINARY_ARCH-unknown-freebsd" $CARGO_FEATURES
target/$BINARY_ARCH-unknown-freebsd/debug/static-web-server -h
task:
only_if: $CIRRUS_TAG != ''
env:
RUSTFLAGS: -Dwarnings --cfg tokio_unstable
CARGO_FEATURES: "--features=all"
GITHUB_TOKEN: ENCRYPTED[d1766ef328d83729917d2ffb875d64c35d1c0177edf8f32e66ec464daf5c1b7b145d65fc6c044a73fffe2235d3b38349]
matrix:
- name: freebsd-amd64-release
env:
BINARY_ARCH: x86_64
- name: freebsd-i686-release
env:
BINARY_ARCH: i686
setup_script:
- pkg install -y bash jq
- curl https://sh.rustup.rs -sSf --output rustup.sh
- sh rustup.sh -y --profile minimal --default-toolchain stable
- . $HOME/.cargo/env
- cp -r .cargo/config.toml $HOME/.cargo/
- rustc --version
toolchain_script:
- . $HOME/.cargo/env
- rustup target add $BINARY_ARCH-unknown-freebsd
info_script:
- . $HOME/.cargo/env
- rustup show
build_script: |
. $HOME/.cargo/env
cargo build --bin static-web-server -vv --release --target="$BINARY_ARCH-unknown-freebsd" $CARGO_FEATURES
archive_script: |
staging="static-web-server-$CIRRUS_TAG-$BINARY_ARCH-unknown-freebsd"
mkdir -p "$staging/"
cp "target/$BINARY_ARCH-unknown-freebsd/release/static-web-server" "$staging/"
cp {README.md,LICENSE-APACHE,LICENSE-MIT} "$staging/"
tar czf "$staging.tar.gz" "$staging"
upload_script: |
./scripts/ci/upload_release_file.sh