commit
30adf996a1
16
.github/ci/build.sh
vendored
Executable file
16
.github/ci/build.sh
vendored
Executable 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
|
26
.github/workflows/rust.yml
vendored
26
.github/workflows/rust.yml
vendored
@ -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
3
rust-toolchain.toml
Normal file
@ -0,0 +1,3 @@
|
||||
[toolchain]
|
||||
channel = "nightly-2023-05-18"
|
||||
components = [ "rust-src", "rustfmt" ]
|
@ -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)]
|
||||
pub struct Memory {
|
||||
|
Loading…
x
Reference in New Issue
Block a user