Skip to content

release workflow

release workflow #344

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_call:
jobs:
verified:
runs-on: ubuntu-latest
needs:
- build
- fmt
- lint
- test
steps:
- run: echo "¡Verdes como tomatillos!"
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: swatinem/rust-cache@v2
- run: |
cargo fmt -v
git diff --exit-code
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: swatinem/rust-cache@v2
- run: cargo clippy -- -D warnings
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# https://doc.rust-lang.org/nightly/rustc/platform-support.html
- target: aarch64-unknown-linux-gnu
- target: i686-unknown-linux-gnu
- target: x86_64-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.target }}
- uses: swatinem/rust-cache@v2
- uses: taiki-e/install-action@cross
- run: cross build --release --all-features
test:
runs-on: ubuntu-latest
services:
scylladb:
image: scylladb/scylla:5.4
ports:
- 9042:9042
options: >-
--health-cmd "cqlsh -e 'describe cluster'"
--health-start-period 30s
--health-interval 2s
--health-timeout 5s
--health-retries 30
strategy:
matrix:
include:
# https://doc.rust-lang.org/nightly/rustc/platform-support.html
- target: aarch64-unknown-linux-gnu
- target: i686-unknown-linux-gnu
- target: x86_64-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.target }}
- uses: swatinem/rust-cache@v2
- uses: taiki-e/install-action@cross
- run: cross test --target ${{ matrix.target }}
env:
CROSS_CONTAINER_OPTS: --network host