serai/.github/workflows/tests.yml

86 lines
2.1 KiB
YAML
Raw Normal View History

set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
name: Tests
on:
push:
branches:
- develop
pull_request:
workflow_dispatch:
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get nightly version to use
id: nightly
run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
- name: Build Dependencies
uses: ./.github/actions/build-dependencies
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
with:
2023-01-01 09:09:10 +00:00
github-token: ${{ secrets.GITHUB_TOKEN }}
# Clippy requires nightly due to serai-runtime requiring it
rust-toolchain: ${{ steps.nightly.outputs.version }}
rust-components: clippy
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
- name: Run Clippy
run: cargo clippy --all-features --tests -- -D warnings -A dead_code
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
deny:
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
2022-12-02 18:38:30 +00:00
- name: Advisory Cache
uses: actions/cache@v3
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
with:
path: ~/.cargo/advisory-db
key: rust-advisory-db
- name: Install cargo
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Install cargo deny
run: cargo install --locked cargo-deny
- name: Run cargo deny
run: cargo deny -L error --all-features check
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
- name: Test Dependencies
uses: ./.github/actions/test-dependencies
2023-01-01 09:09:10 +00:00
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
- name: Run Tests
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
run: cargo test --all-features
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get nightly version to use
id: nightly
run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
# Doesn't grab the cache as it's not needed
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
- name: Install rustfmt
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ steps.nightly.outputs.version }}
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
profile: minimal
components: rustfmt
- name: Run rustfmt
2022-09-17 08:40:50 +00:00
run: cargo +${{ steps.nightly.outputs.version }} fmt -- --check