Skip to content

Instantly share code, notes, and snippets.

@xacrimon
Created September 6, 2021 22:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xacrimon/8b0c42a705c9b744136c8288dac13e68 to your computer and use it in GitHub Desktop.
Save xacrimon/8b0c42a705c9b744136c8288dac13e68 to your computer and use it in GitHub Desktop.
# rust-toolchain
nightly-2021-07-29
# .cargo/config
[target.x86_64-unknown-linux-gnu]
rustflags = ["-Zshare-generics=y"]
[target.x86_64-apple-darwin]
rustflags = ["-Zshare-generics=y"]
[target.aarch64-apple-darwin]
rustflags = ["-Zshare-generics=y"]
[target.x86_64-pc-windows-msvc]
rustflags = ["-Zshare-generics=n"]
# Cargo.toml
cargo-features = ["strip"]
[package]
name = "quant"
version = "0.1.0"
edition = "2018"
resolver = "2"
[profile.dev]
opt-level = 0
debug = 0
debug-assertions = true
overflow-checks = true
lto = "off"
panic = 'unwind'
incremental = true
codegen-units = 256
rpath = false
[profile.dev.package."*"]
opt-level = "z"
[profile.test]
opt-level = 0
debug = false
debug-assertions = true
overflow-checks = true
lto = "off"
incremental = true
codegen-units = 256
rpath = false
[profile.release]
opt-level = 3
debug = false
debug-assertions = false
overflow-checks = false
lto = "fat"
panic = "abort"
incremental = false
codegen-units = 1
rpath = false
strip = "symbols"
[build-dependencies]
cc = "1.0.70"
[dependencies]
winit = { version = "0.25.0", default-features = false, features = ["x11"] }
wgpu = "0.10.1"
thiserror = "1.0.28"
walkdir = "2.3.2"
nanoserde = "0.1.29"
log = { version = "0.4.14", features = ["max_level_debug", "release_max_level_info"]}
fern = "0.6.0"
humantime = "2.1.0"
bus = "2.2.3"
@dvtkrlbs
Copy link

dvtkrlbs commented Sep 6, 2021

name: CI
on:
  pull_request:
  push:
    branches:
    - master

env:
  CARGO_INCREMENTAL: 0

jobs:
  ci:
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@v2
      - name: setup
        run: |
          rustup install nightly-2021-07-29-x86_64-unknown-linux-gnu
          rustup component add rustfmt --toolchain nightly-2021-07-29-x86_64-unknown-linux-gnu
          rustup component add clippy --toolchain nightly-2021-07-29-x86_64-unknown-linux-gnu
      - name: style
        run: cargo fmt -- --check
      - name: clippy
        run: cargo clippy --all-targets -- -D warnings
      - name: test
        run: cargo test

pinning the nightly version to the same one with the rust-toolchain is important.
if you only want compilation check do cargo test --no-run
and if you dont careful with panic dont do abort on panic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment