Merge pull request #204 from embassy-rs/bender-ci

Switch to bender CI
This commit is contained in:
Dario Nieuwenhuis 2023-06-28 15:50:18 +00:00 committed by GitHub
commit 30adf996a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 27 deletions

16
.github/ci/build.sh vendored Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
## on push branch~=gh-readonly-queue/main/.*
## on pull_request
set -euo pipefail
export RUSTUP_HOME=/ci/cache/rustup
export CARGO_HOME=/ci/cache/cargo
export CARGO_TARGET_DIR=/ci/cache/target
hashtime restore /ci/cache/filetime.json || true
hashtime save /ci/cache/filetime.json
cargo fmt -- --check
./d ci

View File

@ -1,26 +0,0 @@
name: Rust
on:
push:
branches: [main, new-repo-layout]
pull_request:
branches: [main]
merge_group:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Check fmt
run: cargo fmt -- --check
- name: Build
run: ./d ci

3
rust-toolchain.toml Normal file
View File

@ -0,0 +1,3 @@
[toolchain]
channel = "nightly-2023-05-18"
components = [ "rust-src", "rustfmt" ]

View File

@ -1,4 +1,6 @@
use std::{cmp::Ordering, collections::HashMap, fs}; use std::cmp::Ordering;
use std::collections::HashMap;
use std::fs;
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
pub struct Memory { pub struct Memory {