Skip to content

Commit ecd4891

Browse files
committed
(WiP) Test on CI
Include FreeBSD testing since @kubo39 made it work there.
1 parent 772f795 commit ecd4891

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.cirrus.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
task:
2+
name: FreeBSD amd64 nightly
3+
freebsd_instance:
4+
image: freebsd-12-1-release-amd64
5+
cpu: 1
6+
memory: 1
7+
setup_script:
8+
- pkg install -y curl bash nasm
9+
- curl https://sh.rustup.rs -sSf --output rustup.sh
10+
- sh rustup.sh --default-toolchain nightly --profile minimal -y
11+
cargo_cache:
12+
folder: $HOME/.cargo/registry
13+
fingerprint_script: cat Cargo.lock 2> /dev/null || true
14+
build_script:
15+
- . $HOME/.cargo/env
16+
- ./build.sh
17+
test_script:
18+
- ./tinyrust
19+
- test `./tinyrust` == 'Hello!'
20+
- wc -c ./tinyrust
21+
before_cache_script:
22+
- rm -rf $HOME/.cargo/registry/index
23+
24+
task:
25+
name: Linux amd64 nightly
26+
container:
27+
image: rustlang/rust:nightly
28+
cpu: 1
29+
memory: 1
30+
allow_failures: false
31+
cargo_cache:
32+
folder: $HOME/.cargo/registry
33+
fingerprint_script: cat Cargo.lock 2> /dev/null || true
34+
setup_script:
35+
- apt-get update
36+
- apt-get install -yqq nasm bsdmainutils
37+
build_script:
38+
- ./build.sh
39+
test_script:
40+
- ./tinyrust
41+
- test "$(./tinyrust)" == 'Hello!'
42+
- test "$(wc -c < tinyrust)" -eq 137
43+
before_cache_script:
44+
- rm -rf $HOME/.cargo/registry/index

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Using Rust to make a 137-byte static AMD64 Linux binary
22

3+
[![Build Status](https://api.cirrus-ci.com/github/tormol/tiny-rust-executable.svg)](https://cirrus-ci.com/github/tormol/tiny-rust-executable)
4+
35
Requires nightly Rust because it uses the `sc` crate to make direct
46
system calls.
57

0 commit comments

Comments
 (0)