ostree/.redhat-ci.yml
Colin Walters d894f609db oxidation: Add implementation of bupsplit in Rust
This is an initial drop of "oxidation", or adding implementation
of components in Rust.  The bupsplit code is a good target - no
dependencies, just computation.

Translation into Rust had a few twists -

 - The C code relies a lot on overflowing unsigned ints, and
   also on the C promotion rules for e.g. `uint8_t -> int32_t`
 - There were some odd loops that I introduced bugs in while
   translating...in particular, the function always returns `len`,
   but I mistakenly translated to `len+1`, resulting in an OOB
   read on the C side, which was hard to debug.

On the plus side, an off-by-one array indexing in the Rust code paniced nicely.

In practice, we'll need a lot more build infrastructure to make this work, such
as using `cargo vendor` when producing build artifacts for example. Also, Cargo
is yet another thing we need to cache.

Where do we go with this? Well, I think we should merge this, it's not a lot of
code. We can just have it be an alternative CI target. Should we do a lot more
right now? Probably not immediately, but I find the medium/long term prospects
pretty exciting!

Closes: #656
Approved by: jlebon
2017-02-03 14:29:00 +00:00

76 lines
1.1 KiB
YAML

branches:
- master
- auto
- try
required: true
container:
image: projectatomic/ostree-tester
packages:
- libasan
env:
CFLAGS: '-fsanitize=undefined -fsanitize=address'
ASAN_OPTIONS: 'detect_leaks=0' # Right now we're not fully clean, but this gets us use-after-free etc
# TODO when we're doing leak checks: G_SLICE: "always-malloc"
build:
config-opts: >
--prefix=/usr
--libdir=/usr/lib64
--enable-installed-tests
--enable-gtk-doc
tests:
- make syntax-check
- make check
- gnome-desktop-testing-runner -p 0 ostree
timeout: 30m
artifacts:
- test-suite.log
---
inherit: true
required: true
context: Clang
env:
CC: 'clang'
CFLAGS: '-Werror=unused-variable'
tests:
artifacts:
---
inherit: true
context: f25-rust
packages:
- cargo
build:
config-opts: >
--prefix=/usr
--libdir=/usr/lib64
--enable-installed-tests
--enable-gtk-doc
--enable-rust
env:
CC: 'gcc'
tests:
- make check TESTS=tests/test-rollsum
artifacts:
- test-suite.log