Bump to 4.4.0beta3
[qBittorrent.git] / .github / workflows / ci_macos.yaml
blobba4a582a90e32cf4a5795712e12559a741b07c10
1 name: CI - macOS
2 on: [pull_request, push]
4 jobs:
5   ci:
6     name: Build
7     runs-on: macos-10.15
9     strategy:
10       matrix:
11         libt_version: ["v2.0.4", "v1.2.14"]
12         qbt_gui: ["GUI=ON", "GUI=OFF"]
13       fail-fast: false
15     env:
16       openssl_root: /usr/local/opt/openssl@1.1
18     steps:
19       - name: Checkout repository
20         uses: actions/checkout@v2
22       - name: Setup ccache
23         uses: hendrikmuhs/ccache-action@v1
24         with:
25           key: ${{ runner.os }}
27       - name: Install dependencies
28         run: |
29           brew update > /dev/null
30           brew install \
31             cmake ninja \
32             boost openssl@1.1 qt@5 zlib
33           brew link --force \
34             qt@5
35           # workaround for cmake + Qt
36           sudo ln -s /usr/local/opt/qt@5/mkspecs /usr/local/mkspecs
37           sudo ln -s /usr/local/opt/qt@5/plugins /usr/local/plugins
39       - name: Install libtorrent
40         run: |
41           git clone --branch ${{ matrix.libt_version }} --depth 1 https://github.com/arvidn/libtorrent.git
42           cd libtorrent
43           git submodule update --init --recursive
44           export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
45           cmake \
46             -B build \
47             -G "Ninja" \
48             -DCMAKE_BUILD_TYPE=RelWithDebInfo \
49             -DCMAKE_CXX_STANDARD=17 \
50             -Ddeprecated-functions=OFF \
51             -DOPENSSL_ROOT_DIR="${{ env.openssl_root }}"
52           cmake --build build
53           sudo cmake --install build
55       - name: Build qBittorrent
56         run: |
57           export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
58           cmake \
59             -B build \
60             -G "Ninja" \
61             -DCMAKE_BUILD_TYPE=RelWithDebInfo \
62             -D${{ matrix.qbt_gui }} \
63             -DVERBOSE_CONFIGURE=ON \
64             -DOPENSSL_ROOT_DIR="${{ env.openssl_root }}"
65           cmake --build build
67       - name: Upload build artifacts
68         uses: actions/upload-artifact@v2
69         with:
70           name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}
71           path: |
72             build/qbittorrent.app
73             build/qbittorrent-nox.app