From bb5ebca2c720f36ef12a7d3bab73c429afeeb10e Mon Sep 17 00:00:00 2001 From: Kiril Mihaylov <80464733+kirilmihaylov@users.noreply.github.com> Date: Thu, 21 Dec 2023 01:31:13 +0200 Subject: [PATCH] ci: Added GitHub Workflow file --- .github/workflows/checks.yaml | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/checks.yaml diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml new file mode 100644 index 0000000..574263c --- /dev/null +++ b/.github/workflows/checks.yaml @@ -0,0 +1,49 @@ +name: "Rust-lang checks" + +on: + push: + branches: + - "main" + pull_request: + branches: + - "main" + +env: + CARGO_TERM_COLOR: "always" + +jobs: + formatting: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v4" + - shell: "sh" + run: "cargo fmt --check" + clippy: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v4" + - shell: "sh" + run: "cargo clippy" + tests: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v4" + - shell: "sh" + run: "cargo test" + miri: + runs-on: "ubuntu-latest" + strategy: + matrix: + target: + - "x86_64-unknown-linux-gnu" + - "powerpc64-unknown-linux-gnu" + env: + target: "${{ matrix.target }}" + steps: + - uses: "actions/checkout@v4" + - shell: "sh" + run: "rustup toolchain install nightly --profile minimal --component miri --target ${target}" + - shell: "sh" + run: "cargo +nightly miri setup --target ${target}" + - shell: "sh" + run: "cargo +nightly miri test --target ${target}"