mirror of
https://github.com/mailscope/kumomta.git
synced 2026-08-21 20:08:18 +00:00
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
name: Rust
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
paths:
|
|
- "crates/**/*.rs"
|
|
- ".github/workflows/rust.yml"
|
|
- "**/Cargo.toml"
|
|
- "Cargo.lock" # for dependabot updates
|
|
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
paths:
|
|
- "crates/**/*.rs"
|
|
- ".github/workflows/rust.yml"
|
|
- "**/Cargo.toml"
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
jobs:
|
|
build-rust:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Maximize build space
|
|
uses: easimon/maximize-build-space@master
|
|
with:
|
|
root-reserve-mb: 512
|
|
swap-size-mb: 1024
|
|
remove-dotnet: 'true'
|
|
remove-android: 'true'
|
|
remove-haskell: 'true'
|
|
remove-codeql: 'true'
|
|
remove-docker-images: 'false'
|
|
- name: "Update APT"
|
|
shell: bash
|
|
run: "sudo apt update"
|
|
- name: "Install more deps"
|
|
shell: bash
|
|
run: "sudo apt-get install -y redis"
|
|
- uses: actions/checkout@v3
|
|
- name: Install cargo-nextest
|
|
uses: baptiste0928/cargo-install@v2
|
|
with:
|
|
crate: cargo-nextest
|
|
- name: Build (Release)
|
|
run: cargo build --verbose --release
|
|
- name: Run tests
|
|
run: cargo nextest run --release
|