1
0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-11-08 12:59:17 +01:00
Commit Graph

53 Commits

Author SHA1 Message Date
Jack O'Connor
e067e7f498 add the MSRV toolchain (currently 1.60.0) to CI 2022-11-20 12:45:11 -08:00
Giovanni
9abc602848
Add missing sudo in ci.yml 2022-10-12 00:27:22 +02:00
wargio
cf5d59cd43 Support portable build without intrinsics 2022-10-03 11:24:18 +02:00
Jack O'Connor
1631016b86 add a RAYON_NUM_THREADS=1 run to CI 2022-01-18 14:29:44 -05:00
Jack O'Connor
197ad57261 add aarch64-apple-darwin builds to GitHub CI
I'm not sure how to build for Apple Silicon from a Linux host, but it
seems to work as-is from an x86_64 macOS host. Alas, GitHub doesn't yet
provide Apple Silicon hosts to run these binaries, and Cross doesn't yet
support virtualizing them either.
2021-10-21 18:58:32 -04:00
rsdy
f4d5c6e785 Disable no_neon feature for C bindings as we can't propagate from cargo build 2021-10-12 16:54:12 +01:00
rsdy
faddc5af5c Add no_neon feature tests to CI 2021-10-08 11:51:18 +01:00
Jack O'Connor
05292a018b get rid of the standalone "*_rayon" functions
These clutter the toplevel API, and their prominence might lead callers
to prefer them as a first resort, which probably isn't a good idea.
Restricting multithreading to `Hasher::update_rayon` feels better,
similar to what we've done with `Hasher::finalize_xof`. (But I think
`update_rayon` is still an improvement over the trait-based interface
that it replaced.)
2021-03-21 21:14:13 -04:00
Jack O'Connor
07b746b1b4 gate digest and crypto-mac implementations behind "traits-preview"
This approach was suggested by @tarcieri at
https://github.com/BLAKE3-team/BLAKE3/pull/157.
2021-03-21 15:53:26 -04:00
Jack O'Connor
09546a677d include example.c 2020-10-20 12:51:30 -04:00
Jack O'Connor
3d212291b9 add cross_test.sh for the C bindings
This will let us add big endian testing to CI for our C code. (We were
already doing it for our Rust code.)

This is adapted from test_vectors/cross_test.sh. It works around the
limitation that the `cross` tool can't reach parent directories. It's an
unfortunate hack, but at least it's only for testing. It might've been
less hacky to use symlinks for this somehow, but I worry that would
break things on Windows, and I don't want to have to add workarounds for
my workarounds.
2020-09-29 16:48:18 -04:00
Jack O'Connor
cc04130eaa cover the no_sse2 flags in CI testing 2020-09-02 12:23:49 -04:00
Jack O'Connor
5b22bf57c8 add i586-unknown-linux-musl as a test target
Samuel noticed that rustc seems to assume (incorrectly?) that all i686
targets support SSE2, but it doesn't make that assumption for i586.
2020-08-31 18:25:38 -04:00
Jack O'Connor
a79fec7e39 fix a build break on x86 targets without guaranteed SSE2 support
This is quite hard to trigger, because SSE2 has been guaranteed for a
long time. But you could trigger it this way:

    rustup target add i686-unknown-linux-musl
    RUSTFLAGS="-C target-cpu=i386" cargo build --target i686-unknown-linux-musl

Note a relevant gotcha though: The `cross` tool will not forward
environment variables like RUSTFLAGS to the container by default, so if
you're testing with `cross` you'll need to use the `rustc` command to
explicitly pass the flag, as I've done here in ci.yml. (Or you could
create a `Cross.toml` file, but I don't want to commit one of those if I
can avoid it.)
2020-08-31 18:25:38 -04:00
Jack O'Connor
e4703ac170 rename the C Makefile to Makefile.testing 2020-07-20 09:47:38 -04:00
Jack O'Connor
dc2a79d266 add newline and backslash escaping to b3sum output
As proposed in
https://github.com/BLAKE3-team/BLAKE3/issues/33#issuecomment-623153164

This brings b3sum behavior close to md5sum. All occurrences of backslash
are replaced with "\\", and all occurrences of (Unix) newline are
replaced with "\n". In addition, any line containing these escapes has a
single "\" prepended to the front.

Filepaths were already being converted to UTF-8 with to_string_lossy(),
but this commit adds an extra warning when that conversion is in fact
lossy (because the path is not valid Unicode). This new warning is
printed to stdout, with the goal of deliberately breaking --check (which
is not yet implemented) in this case.
2020-05-05 00:59:31 -04:00
Jack O'Connor
370ba3644a print the compiler version in CI, for help with debugging 2020-04-11 23:03:32 -04:00
Jack O'Connor
e3069da68e only run CI on branches and PRs, not tags 2020-04-02 10:23:46 -04:00
Jack O'Connor
b8cdcb1f84 automatically fall back to the pure Rust build
There are two scenarios where compiling AVX-512 C or assembly code might
not work:

1. There might not be a C compiler installed at all. Most commonly this
   is either in cross-compiling situations, or with the Windows GNU
   target.
2. The installed C compiler might not support e.g. -mavx512f, because
   it's too old.

In both of these cases, print a relevant warning, and then automatically
fall back to using the pure Rust intrinsics build.

Note that this only affects x86 targets. Other targets always use pure
Rust, unless the "neon" feature is enabled.
2020-04-01 19:13:15 -04:00
Jack O'Connor
2dff29cf0e turn all compiler warnings into errors in CI 2020-03-31 16:02:57 -04:00
Jack O'Connor
152740578e add testing-only flags to disable individual instruction sets
This lets CI test a wider range of possible SIMD support settings.
2020-03-29 23:12:47 -04:00
Jack O'Connor
e06a0f255a refactor the Cargo feature set
The biggest change here is that assembly implementations are enabled by
default.

Added features:
- "pure" (Pure Rust, with no C or assembly implementations.)

Removed features:
- "c" (Now basically the default.)

Renamed features;
- "c_prefer_intrinsics" -> "prefer_intrinsics"
- "c_neon" -> "neon"

Unchanged:
- "rayon"
- "std" (Still the only feature on by default.)
2020-03-29 18:02:03 -04:00
Jack O'Connor
96c36d5df9 add more --release mode testing 2020-03-29 01:01:30 -04:00
Jack O'Connor
be4e7babee print instruction set support quietly 2020-03-28 19:51:54 -04:00
Jack O'Connor
f77c8ffd7c print out instruction set support in CI 2020-03-28 19:30:28 -04:00
Jack O'Connor
eb50d82f16 add release assembly tests 2020-03-28 19:15:25 -04:00
Jack O'Connor
4feadee6bb disable fail-fast for cross tests too 2020-03-24 16:45:33 -04:00
Jack O'Connor
fcc14c8c1b more file renaming, use underscores more consistently 2020-02-12 18:41:41 -05:00
Erik Johansson
0281f1ae16 Rename assembly files (blake3-* -> blake3_*)
This gives the assembly files the same prefix as the intrinsics files which
simplifies building when the build system should pick between the assembly and
the intrinsics files.
2020-02-12 23:08:44 +01:00
Jack O'Connor
1c4d7fdd8d add test_asm to the C Makefile 2020-02-12 13:12:05 -05:00
Jack O'Connor
b8a1d2d982 integrate assembly implementations into blake3_c_rust_bindings 2020-02-12 10:23:17 -05:00
Jack O'Connor
efbfa0463c integrate assembly implementations into the blake3 crate 2020-02-12 10:23:17 -05:00
Jack O'Connor
ec34043b45 add cross testing on i686 to CI 2020-02-11 13:58:26 -05:00
Jack O'Connor
c0a43e5fb8 add the Windows GNU toolchain to CI 2020-02-07 13:46:42 -05:00
Jack O'Connor
ca62c4724d stop skipping all other builds when one CI build fails 2020-02-06 18:43:50 -05:00
Jack O'Connor
4a92e8eeb1 add the reference impl doc test to CI 2020-01-20 16:36:30 -05:00
Jack O'Connor
4021636022 test the BLAKE3_NO_* vars in CI 2020-01-20 16:19:16 -05:00
Jack O'Connor
84c26670bf add blake3_c_rust_bindings for testing and benchmarking 2020-01-16 16:09:42 -05:00
Jack O'Connor
9096249e09 enable CI on pull requests
As per instructions at:
https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows
2020-01-10 10:22:12 -05:00
Jack O'Connor
a0d7b4f3f8 merge the C code's ci.yml into the top level one
CI is not currently working due to quota issues, so I'll need to check
that this is actually working later.
2020-01-09 09:48:52 -05:00
Jack O'Connor
d963fe18f3 test release mode in CI
As part of this, get rid of the BLAKE3_FUZZ_ITERATIONS variable. I
wasn't using it anywhere, and it was leading to some compiler warnings
in --no-default-features mode.
2019-12-13 13:15:48 -05:00
Jack O'Connor
9bf1020213 make the "c_avx512" feature a no-op on non-x86
This lets us enable it by default in b3sum.
2019-12-12 15:13:04 -05:00
Jack O'Connor
7cf6b8f174 initial version of b3sum 2019-12-12 13:18:57 -05:00
Jack O'Connor
59752de9bd fix syntax errors in ci.yml 2019-12-11 23:21:25 -05:00
Jack O'Connor
6823655aed run the test vectors on cross tests (ARM, MIPS) on CI 2019-12-11 23:19:58 -05:00
Jack O'Connor
a3be434d28 fix bench tests running in the wrong directory 2019-12-11 22:34:03 -05:00
Jack O'Connor
dd3a72fb9f run test vectors and bench tests in the regular CI test matrix 2019-12-11 22:30:19 -05:00
Jack O'Connor
c81d5c2522 test against test_vectors.json in CI 2019-12-11 10:50:18 -05:00
Jack O'Connor
4ca4c60694 add cargo +nightly test --benches to CI 2019-12-10 14:57:46 -05:00
Jack O'Connor
cbaf350c05 typo in ci.yml 2019-12-09 22:13:48 -05:00