tdlight/.github/workflows/build.yaml

42 lines
1.2 KiB
YAML
Raw Normal View History

2020-11-10 13:04:15 +01:00
name: Build TDLib
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0' # weekly
jobs:
build:
2020-11-10 14:16:49 +01:00
runs-on: ubuntu-18.04
2020-11-10 13:22:21 +01:00
strategy:
matrix:
arch: [linux/386, linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64, linux/ppc64le]
2020-11-10 13:04:15 +01:00
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
2020-11-10 13:22:21 +01:00
- name: Cache ccache
2020-11-10 13:11:00 +01:00
id: cache-primes
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache-all
restore-keys: |
${{ runner.os }}-ccache-
- name: Update archives
2020-11-10 14:18:43 +01:00
run: apt-get update && apt-get install sudo
2020-11-10 13:04:15 +01:00
- name: Install build tools
2020-11-10 14:21:35 +01:00
run: sudo apt-get install make git zlib1g-dev libssl-dev gperf php-cli cmake clang-6.0 libc++-dev libc++abi-dev ccache
2020-11-10 13:04:15 +01:00
- name: Build
run: |
mkdir build
cd build
2020-11-10 14:16:49 +01:00
CXXFLAGS="-stdlib=libc++" CC=/usr/bin/clang-6.0 CXX=/usr/bin/clang++-6.0 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=../tdlib ..
2020-11-10 13:22:21 +01:00
cmake --build . --target install -- -j4
2020-11-10 13:58:57 +01:00
- uses: actions/upload-artifact@v2
with:
name: tdlight
path: tdlib/libtdjson.so