Skip to content

Bump image from 0.24.9 to 0.25.1 #175

Bump image from 0.24.9 to 0.25.1

Bump image from 0.24.9 to 0.25.1 #175

Workflow file for this run

name: Build Linux
on:
push:
branches: [ main ]
paths:
- 'src/**'
- 'Cargo.lock'
- 'Cargo.toml'
- 'rustfmt.toml'
- 'config/**'
- '.github/workflows/**'
pull_request:
branches: [ main ]
paths:
- 'src/**'
- 'Cargo.lock'
- 'Cargo.toml'
- 'rustfmt.toml'
- 'config/**'
- '.github/workflows/**'
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
TDLIB_VERSION: 2589c3fd46925f5d57e4ec79233cd1bd0f5d0c09
API_HASH: a3406de8d171bb422bb6ddf3bbd800e2
API_ID: 94575
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore cache TDLib
id: cache-tdlib-restore
uses: actions/cache/restore@v4
with:
path: td/
key: ${{ runner.os }}-TDLib-${{ env.TDLIB_VERSION }}
- name: Build TDLib
if: steps.cache-tdlib-restore.outputs.cache-hit != 'true'
run: |
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install make git zlib1g-dev libssl-dev gperf php-cli cmake clang-14 libc++-dev libc++abi-dev
git clone https://github.com/tdlib/td.git
cd td
git checkout $TDLIB_VERSION
rm -rf build
mkdir build
cd build
CXXFLAGS="-stdlib=libc++" CC=/usr/bin/clang-14 CXX=/usr/bin/clang++-14 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=../tdlib ..
cmake --build . --target install
- name: Save cache TDLib
uses: actions/cache/save@v4
if: steps.cache-tdlib-restore.outputs.cache-hit != 'true'
with:
path: td/
key: ${{ steps.cache-tdlib-restore.outputs.cache-primary-key }}
- name: Extract TDLib
run: |
cp -r ./td/tdlib ./
sudo cp ./tdlib/lib/libtdjson.so.* /usr/lib/
- name: Set environment variables
run: echo "PKG_CONFIG_PATH=$(pwd)/tdlib/lib/pkgconfig" >> $GITHUB_ENV
- name: Install Rust nightly
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy, rustfmt
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Run cargo build
run: cargo build --verbose
- name: Run cargo test
run: cargo test --verbose -- --nocapture --test-threads=1
- name: Run cargo clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run cargo fmt
run: cargo +nightly fmt --all -- --check
# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: ${{ runner.os }}-artifact
# path: ./
# overwrite: true