qBittorrent/.github/workflows/ci_macos.yaml

92 lines
2.6 KiB
YAML
Raw Normal View History

name: CI - macOS
on: [pull_request, push]
jobs:
ci:
name: Build
runs-on: macos-latest
strategy:
2021-10-24 00:57:50 +08:00
fail-fast: false
matrix:
2021-10-24 00:57:50 +08:00
libt_version: ["2.0.4", "1.2.14"]
qbt_gui: ["GUI=ON", "GUI=OFF"]
2021-10-24 00:57:50 +08:00
qt_version: ["5.15.2", "6.2.0"]
exclude:
- libt_version: "1.2.14"
qt_version: "6.2.0"
env:
openssl_root: /usr/local/opt/openssl@1.1
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
brew update > /dev/null
brew install \
cmake ninja \
2021-10-24 00:57:50 +08:00
boost openssl@1.1 zlib
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
2021-10-24 00:57:50 +08:00
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: ${{ matrix.qt_version }}
- name: Install libtorrent
run: |
2021-10-24 00:57:50 +08:00
git clone --branch v${{ matrix.libt_version }} --depth 1 https://github.com/arvidn/libtorrent.git
cd libtorrent
git submodule update --init --recursive
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_STANDARD=17 \
-Ddeprecated-functions=OFF \
-DOPENSSL_ROOT_DIR="${{ env.openssl_root }}"
cmake --build build
sudo cmake --install build
2021-10-24 00:57:50 +08:00
- name: Build qBittorrent (Qt5)
if: ${{ startsWith(matrix.qt_version, 5) }}
run: |
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
2021-10-24 00:57:50 +08:00
-DOPENSSL_ROOT_DIR="${{ env.openssl_root }}" \
-DQt5_DIR="$Qt5_DIR" \
-DVERBOSE_CONFIGURE=ON \
2021-10-24 00:57:50 +08:00
-D${{ matrix.qbt_gui }}
cmake --build build
- name: Build qBittorrent (Qt6)
if: ${{ startsWith(matrix.qt_version, 6) }}
run: |
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DOPENSSL_ROOT_DIR="${{ env.openssl_root }}" \
-DQT6=ON \
-DQt6_DIR="$Qt6_DIR" \
-DVERBOSE_CONFIGURE=ON \
-D${{ matrix.qbt_gui }}
cmake --build build
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
2021-10-24 00:57:50 +08:00
name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
path: |
build/qbittorrent.app
build/qbittorrent-nox.app