Skip to content

Add CI for all OS

Add CI for all OS #1

Workflow file for this run

name: CI Linux
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
API_HASH: a3406de8d171bb422bb6ddf3bbd800e2
API_ID: 94575
jobs:
ci:
strategy:
fail-fast: false
matrix:
feature: [default, download-tdlib, pkg-config, docs]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download TDLib
if: matrix.feature == 'default' || matrix.feature == 'pkg-config'
run: |
gh release download test --pattern 'Linux*.zip'
unzip -q *.zip -d .
- name: Set pkg-config environment variables
if: matrix.feature == 'pkg-config'
run: echo "PKG_CONFIG_PATH=$(pwd)/tdlib/lib/pkgconfig" >> $GITHUB_ENV
- name: Set default environment variables
if: matrix.feature == 'default'
run: echo "LOCAL_TDLIB_PATH=$(pwd)/tdlib/" >> $GITHUB_ENV
- name: Run cargo build
run: cargo build --verbose --features ${{ matrix.feature }}
- name: Run cargo test
run: cargo test --verbose -- --nocapture --test-threads=1
- name: Run cargo clippy
run: cargo clippy --features ${{ matrix.feature }} -- -D warnings
- name: Run cargo fmt
run: cargo fmt --all -- --check