Migrate CI to github-actions (#17)

This commit is contained in:
Anatoly Laskaris 2022-07-20 09:30:37 +03:00 committed by GitHub
parent 6fbc13e0d2
commit 3acee2ca1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 52 additions and 36 deletions

View File

@ -1,36 +0,0 @@
version: 2
jobs:
backend sdk:
docker:
- image: circleci/rust:latest
environment:
RUST_BACKTRACE: 1
RUST_TEST_THREADS: 1
steps:
- checkout
- restore_cache:
keys:
- backendsdk01-{{ checksum "Cargo.toml" }}
- run: | #TODO: enable 'stable' and 'beta' once `allocator_api` becomes stable
rustup toolchain install nightly-2022-03-20
rustup default nightly-2022-03-20
rustup override set nightly-2022-03-20
rustup component add rustfmt
rustup component add clippy
cargo fmt --all -- --check --color always
cargo build
(cd crates/marine-test-macro-impl; cargo test)
cargo test -v --all-features
- save_cache:
paths:
- ~/.cargo
- ~/.rustup
key: backendsdk01-{{ checksum "Cargo.toml" }}
workflows:
version: 2
fluence:
jobs:
- backend sdk

View File

@ -0,0 +1,52 @@
name: "marine-rs-sdk-test"
on:
pull_request:
push:
branches:
- "master"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
build:
name: "Build and test"
runs-on: builder
env:
RUST_BACKTRACE: 1
RUST_TEST_THREADS: 1
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
components: rustfmt, clippy
- name: "Cache rust"
uses: Swatinem/rust-cache@v1
- name: "cargo fmt"
run: cargo fmt --all -- --check
- name: "cargo build"
run: cargo build
- name: "cargo check"
run: cargo check -v --all-features
- name: "Run marine-test-macro-impl"
run: cargo test
working-directory: crates/marine-test-macro-impl
- name: "cargo test"
run: cargo test --release --all-features --no-fail-fast
- name: "cargo clippy"
run: cargo clippy -Z unstable-options --all