Merge #22
22: Update CI, add MSRV policy r=dvc94ch a=Disasm Co-authored-by: Vadim Kaushan <admin@disasm.info>
This commit is contained in:
commit
037e8bdcf4
54
.travis.yml
54
.travis.yml
|
@ -1,29 +1,18 @@
|
||||||
language: rust
|
language: rust
|
||||||
|
|
||||||
|
env:
|
||||||
|
- TARGET=x86_64-unknown-linux-gnu
|
||||||
|
- TARGET=riscv32imac-unknown-none-elf
|
||||||
|
|
||||||
|
rust:
|
||||||
|
- nightly
|
||||||
|
- stable
|
||||||
|
- 1.30.0 # MSRV
|
||||||
|
|
||||||
|
if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
#- env: TARGET=x86_64-unknown-linux-gnu
|
|
||||||
# if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
|
|
||||||
|
|
||||||
#- env: TARGET=riscv32imac-unknown-none-elf
|
|
||||||
# if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
|
|
||||||
|
|
||||||
#- env: TARGET=x86_64-unknown-linux-gnu
|
|
||||||
# rust: beta
|
|
||||||
# if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
|
|
||||||
|
|
||||||
#- env: TARGET=riscv32imac-unknown-none-elf
|
|
||||||
# rust: beta
|
|
||||||
# if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
|
|
||||||
|
|
||||||
- env: TARGET=x86_64-unknown-linux-gnu
|
|
||||||
rust: nightly
|
|
||||||
if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
|
|
||||||
|
|
||||||
- env: TARGET=riscv32imac-unknown-none-elf
|
|
||||||
rust: nightly
|
|
||||||
if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
|
|
||||||
|
|
||||||
- env: TARGET=riscv64imac-unknown-none-elf
|
- env: TARGET=riscv64imac-unknown-none-elf
|
||||||
rust: nightly
|
rust: nightly
|
||||||
if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
|
if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
|
||||||
|
@ -32,26 +21,23 @@ matrix:
|
||||||
rust: nightly
|
rust: nightly
|
||||||
if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
|
if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
|
||||||
|
|
||||||
- env: TARGET=x86_64-unknown-linux-gnu
|
- env: CHECK_BLOBS=1
|
||||||
rust: stable
|
rust:
|
||||||
|
language: bash
|
||||||
if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
|
if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
|
||||||
|
|
||||||
- env: TARGET=riscv32imac-unknown-none-elf
|
|
||||||
rust: stable
|
|
||||||
if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
|
|
||||||
|
|
||||||
before_install: set -e
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- bash ci/install.sh
|
- ci/install.sh
|
||||||
- export PATH="$PATH:$PWD/gcc/bin"
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- bash ci/script.sh
|
- ci/script.sh
|
||||||
|
|
||||||
after_script: set +e
|
|
||||||
|
|
||||||
cache: cargo
|
cache:
|
||||||
|
cargo: true
|
||||||
|
directories:
|
||||||
|
- gcc
|
||||||
before_cache:
|
before_cache:
|
||||||
# Travis can't cache files that are not readable by "others"
|
# Travis can't cache files that are not readable by "others"
|
||||||
- chmod -R a+r $HOME/.cargo
|
- chmod -R a+r $HOME/.cargo
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
main() {
|
if [ -n "${TARGET:-}" ]; then
|
||||||
if [ $TARGET != x86_64-unknown-linux-gnu ]; then
|
|
||||||
rustup target add $TARGET
|
rustup target add $TARGET
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir gcc
|
if [ -n "${CHECK_BLOBS:-}" ]; then
|
||||||
|
if [ ! -d gcc/bin ]; then
|
||||||
|
mkdir -p gcc
|
||||||
curl -L https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.1.0-2018.12.0-x86_64-linux-ubuntu14.tar.gz | tar --strip-components=1 -C gcc -xz
|
curl -L https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.1.0-2018.12.0-x86_64-linux-ubuntu14.tar.gz | tar --strip-components=1 -C gcc -xz
|
||||||
}
|
fi
|
||||||
|
fi
|
||||||
main
|
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
main() {
|
if [ -n "${TARGET:-}" ]; then
|
||||||
cargo check --target $TARGET
|
cargo check --target $TARGET
|
||||||
|
|
||||||
if [ $TRAVIS_RUST_VERSION = nightly ]; then
|
if [ $TRAVIS_RUST_VERSION = nightly ]; then
|
||||||
cargo check --target $TARGET --features inline-asm
|
cargo check --target $TARGET --features inline-asm
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $TARGET = x86_64-unknown-linux-gnu ]; then
|
if [ -n "${CHECK_BLOBS:-}" ]; then
|
||||||
|
PATH="$PATH:$PWD/gcc/bin"
|
||||||
./check-blobs.sh
|
./check-blobs.sh
|
||||||
fi
|
fi
|
||||||
}
|
|
||||||
|
|
||||||
main
|
|
||||||
|
|
11
src/lib.rs
11
src/lib.rs
|
@ -1,8 +1,17 @@
|
||||||
//! Low level access to RISC-V processors
|
//! Low level access to RISC-V processors
|
||||||
//!
|
//!
|
||||||
|
//! # Minimum Supported Rust Version (MSRV)
|
||||||
|
//!
|
||||||
|
//! This crate is guaranteed to compile on stable Rust 1.30 and up. It *might*
|
||||||
|
//! compile with older versions but that may change in any new patch release.
|
||||||
|
//! Note that `riscv64imac-unknown-none-elf` and `riscv64gc-unknown-none-elf` targets
|
||||||
|
//! are not supported on stable yet.
|
||||||
|
//!
|
||||||
|
//! # Features
|
||||||
|
//!
|
||||||
//! This crate provides:
|
//! This crate provides:
|
||||||
//!
|
//!
|
||||||
//! - Access to core registers like mstatus or mcause.
|
//! - Access to core registers like `mstatus` or `mcause`.
|
||||||
//! - Interrupt manipulation mechanisms.
|
//! - Interrupt manipulation mechanisms.
|
||||||
//! - Wrappers around assembly instructions like `WFI`.
|
//! - Wrappers around assembly instructions like `WFI`.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue