Fix linking in windows #61
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI macOS | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_run: | |
workflows: [ CD ] | |
types: [ completed ] | |
branches: [ main ] | |
env: | |
GH_TOKEN: ${{ github.token }} | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
API_HASH: a3406de8d171bb422bb6ddf3bbd800e2 | |
API_ID: 94575 | |
jobs: | |
ci: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-13, macos-14] | |
feature: [local-tdlib, download-tdlib, pkg-config, docs] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download TDLib | |
if: matrix.feature == 'local-tdlib' || matrix.feature == 'pkg-config' | |
run: | | |
gh release download --pattern ${{ runner.arch == 'ARM64' && 'tdlib-*-macos-aarch64.zip' || 'tdlib-*-macos-x86_64.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 | |
echo "DYLD_LIBRARY_PATH=$(pwd)/tdlib/lib" >> $GITHUB_ENV | |
- name: Set local-tdlib environment variables | |
if: matrix.feature == 'local-tdlib' | |
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 --workspace --exclude tdlib-rs -- --nocapture --test-threads=1 | |
- name: Run cargo clippy | |
run: cargo clippy --all-targets --features ${{ matrix.feature }} -- -D warnings | |
- name: Run cargo fmt | |
run: cargo fmt --all -- --check | |
- name: Run cargo run | |
if: matrix.feature != 'docs' | |
run: cargo run --package tdlib-rs --example test_ci --features ${{ matrix.feature }} |