rust-bitcoin-unsafe-fast/.github/workflows/rust.yml

167 lines
4.7 KiB
YAML
Raw Normal View History

2023-03-22 15:19:30 +00:00
on:
push:
branches:
- master
- 'test-ci/**'
pull_request:
2021-01-01 20:03:20 +00:00
name: Continuous integration
jobs:
Stable:
name: Test - stable toolchain
2021-01-01 20:03:20 +00:00
runs-on: ubuntu-latest
strategy:
2021-11-12 22:55:52 +00:00
fail-fast: false
2021-01-01 20:03:20 +00:00
steps:
- name: Checkout Crate
uses: actions/checkout@v3
2021-01-01 20:03:20 +00:00
- name: Checkout Toolchain
# https://github.com/dtolnay/rust-toolchain
uses: dtolnay/rust-toolchain@stable
- name: Running test script
env:
DO_COV: true
DO_LINT: true
AS_DEPENDENCY: false
DO_NO_STD: true
DO_DOCS: true
DO_FEATURE_MATRIX: true
DO_SCHEMARS_TESTS: true # Currently only used in hashes crate.
run: ./contrib/test.sh
Beta:
name: Test - beta toolchain
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout Crate
uses: actions/checkout@v3
- name: Checkout Toolchain
uses: dtolnay/rust-toolchain@beta
- name: Running test script
env:
AS_DEPENDENCY: false
DO_NO_STD: true
run: ./contrib/test.sh
Nightly:
name: Test - nightly toolchain
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout Crate
uses: actions/checkout@v3
- name: Checkout Toolchain
uses: dtolnay/rust-toolchain@nightly
- name: Running test script
env:
DO_FMT: true
DO_BENCH: true
AS_DEPENDENCY: false
DO_NO_STD: true
DO_DOCSRS: true
run: ./contrib/test.sh
MSRV:
name: Test - 1.48.0 toolchain
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout Crate
uses: actions/checkout@v3
- name: Checkout Toolchain
uses: dtolnay/rust-toolchain@1.48.0
2021-01-01 20:03:20 +00:00
- name: Running test script
env:
DO_FEATURE_MATRIX: true
DO_NO_STD: true
run: ./contrib/test.sh
Arch32bit:
name: Test 32-bit version
runs-on: ubuntu-latest
steps:
- name: Checkout Crate
uses: actions/checkout@v3
- name: Checkout Toolchain
uses: dtolnay/rust-toolchain@stable
- name: Add architecture i386
run: sudo dpkg --add-architecture i386
- name: Install i686 gcc
run: sudo apt-get update -y && sudo apt-get install -y gcc-multilib
- name: Install target
run: rustup target add i686-unknown-linux-gnu
- name: Run test on i686
run: cargo test --target i686-unknown-linux-gnu
Cross:
name: Cross test
if: ${{ !github.event.act }}
runs-on: ubuntu-latest
steps:
- name: Checkout Crate
uses: actions/checkout@v3
- name: Checkout Toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install target
run: rustup target add s390x-unknown-linux-gnu
- name: install cross
run: cargo install cross --locked
- name: run cross test
run: cross test --target s390x-unknown-linux-gnu
2021-05-15 15:12:27 +00:00
Embedded:
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-C link-arg=-Tlink.x"
CARGO_TARGET_THUMBV7M_NONE_EABI_RUNNER: "qemu-system-arm -cpu cortex-m3 -machine mps2-an385 -nographic -semihosting-config enable=on,target=native -kernel"
2021-05-15 15:12:27 +00:00
steps:
- name: Checkout
uses: actions/checkout@v3
2021-05-15 15:12:27 +00:00
- name: Set up QEMU
run: sudo apt update && sudo apt install -y qemu-system-arm gcc-arm-none-eabi
2021-05-15 15:12:27 +00:00
- name: Checkout Toolchain
uses: dtolnay/rust-toolchain@nightly
2021-05-15 15:12:27 +00:00
with:
targets: thumbv7m-none-eabi
- name: Install src
run: rustup component add rust-src
- name: Run bitcoin/embedded
run: cd bitcoin/embedded && cargo run --target thumbv7m-none-eabi
- name: Run hashes/embedded no alloc
run: cd hashes/embedded && cargo run --target thumbv7m-none-eabi
- name: Run hashes/embedded with alloc
run: cd hashes/embedded && cargo run --target thumbv7m-none-eabi --features=alloc
ASAN:
name: Address sanitizer # hashes crate only.
runs-on: ubuntu-latest
steps:
- name: Checkout Crate
uses: actions/checkout@v3
- name: Checkout Toolchain
uses: dtolnay/rust-toolchain@nightly
- name: Install src
run: rustup component add rust-src
- name: Running address sanitizer
env:
DO_ASAN: true
run: cd hashes && ./contrib/test.sh
WASM:
name: WebAssembly Build # hashes crate only.
runs-on: ubuntu-latest
steps:
- name: Checkout Crate
uses: actions/checkout@v3
- name: Checkout Toolchain
uses: dtolnay/rust-toolchain@stable
- name: Running WASM build
2021-05-15 15:12:27 +00:00
env:
DO_WASM: true
run: cd hashes && ./contrib/test.sh