Browse Source

Merge pull request #1 from futurewei-tech/init

Set up a basic Rust project
tags/v0.0.0-test.4
Xavier Tao Philipp Oppermann 4 years ago
parent
commit
ddc9fc8fd3
6 changed files with 57 additions and 4 deletions
  1. +35
    -0
      .github/workflows/ci.yml
  2. +0
    -4
      .gitignore
  3. +7
    -0
      Cargo.lock
  4. +9
    -0
      Cargo.toml
  5. +3
    -0
      rust-toolchain.toml
  6. +3
    -0
      src/main.rs

+ 35
- 0
.github/workflows/ci.yml View File

@@ -0,0 +1,35 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:

jobs:
test:
name: "Test"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Check"
run: cargo check
- name: "Build"
run: cargo build
- name: "Test"
run: cargo test

clippy:
name: "Clippy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Clippy"
run: cargo clippy

rustfmt:
name: "Formatting"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "rustfmt"
run: cargo fmt -- --check

+ 0
- 4
.gitignore View File

@@ -2,9 +2,5 @@
# will have compiled files and executables
/target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

+ 7
- 0
Cargo.lock View File

@@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3

[[package]]
name = "dora-rs"
version = "0.1.0"

+ 9
- 0
Cargo.toml View File

@@ -0,0 +1,9 @@
[package]
name = "dora-rs"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[workspace]


+ 3
- 0
rust-toolchain.toml View File

@@ -0,0 +1,3 @@
[toolchain]
channel = "stable"
components = ["rustfmt", "clippy"]

+ 3
- 0
src/main.rs View File

@@ -0,0 +1,3 @@
fn main() {
println!("Hello World!");
}

Loading…
Cancel
Save