Skip to content

build(deps): update dirs requirement from 5.0.1 to 6.0.0 #73

build(deps): update dirs requirement from 5.0.1 to 6.0.0

build(deps): update dirs requirement from 5.0.1 to 6.0.0 #73

Workflow file for this run

name: CI Windows
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:
feature: [local-tdlib, download-tdlib, pkg-config, docs]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download TDLib
if: matrix.feature == 'local-tdlib' || matrix.feature == 'pkg-config'
run: |
gh release download --pattern 'tdlib-*-windows-x86_64.zip'
unzip -q *.zip -d .
shell: bash
- name: Install pkg-config
if: matrix.feature == 'pkg-config'
run: |
mkdir pkg-config
cd pkg-config
curl -kLSsO http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.26-1_win32.zip
curl -kLSsO http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28/glib_2.28.8-1_win32.zip
curl -kLSsO http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_0.18.1.1-2_win32.zip
unzip -q pkg-config_0.26-1_win32.zip -d pkg-config_0.26-1_win32
unzip -q glib_2.28.8-1_win32.zip -d glib_2.28.8-1_win32
unzip -q gettext-runtime_0.18.1.1-2_win32.zip -d gettext-runtime_0.18.1.1-2_win32
cp ./gettext-runtime_0.18.1.1-2_win32/bin/intl.dll ./pkg-config_0.26-1_win32/bin/
cp ./glib_2.28.8-1_win32/bin/* ./pkg-config_0.26-1_win32/bin/
shell: bash
- name: Set pkg-config environment variables
if: matrix.feature == 'pkg-config'
run: |
echo "$((Get-Item .).FullName)\pkg-config\pkg-config_0.26-1_win32\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "PKG_CONFIG_PATH=$((Get-Item .).FullName)\tdlib\lib\pkgconfig" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "$((Get-Item .).FullName)\tdlib\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh
- name: Set local-tdlib environment variables
if: matrix.feature == 'local-tdlib'
run: echo "LOCAL_TDLIB_PATH=$((Get-Item .).FullName)\tdlib" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh
- 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 }}