This repository was archived by the owner on Jun 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
156 lines (128 loc) · 4.08 KB
/
ci.yml
File metadata and controls
156 lines (128 loc) · 4.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# This file is part of the pCloud Console Client.
#
# (c) 2021 Serghei Iakovlev <egrep@protonmail.ch>
#
# For the full copyright and license information, please view
# the LICENSE file that was distributed with this source code.
name: CI
on:
push:
branches:
- master
- 'feature/**'
- 'fix/**'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches:
- master
schedule:
- cron: '0 11 * * *'
# | | | | |
# | | | | |____ day of the week (0 - 6 or SUN-SAT)
# | | | |____ month (1 - 12 or JAN-DEC)
# | | |____ day of the month (1 - 31)
# | |____ hour (0 - 23)
# |____ minute (0 - 59)
jobs:
build_and_test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: linux-x64-gcc-mbedtls-debug
os: ubuntu-18.04
compiler: gcc
arch: x64
version: '5'
- name: linux-x64-clang-mbedtls-debug
os: ubuntu-18.04
compiler: clang
arch: x64
version: '5.0'
- name: macos-x64-apple-mbedtls-debug
os: macos-latest
compiler: apple-clang
arch: x64
version: '12.0'
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 5
- name: Setup Common Prerequisites
run: |
case ${{ runner.os }} in
Linux*)
# Add more toolchains
echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections
sudo add-apt-repository ppa:ubuntu-toolchain-r/test --yes
sudo apt-get update --quiet --yes 1>/dev/null
# Install compiler
source .github/install-compiler-linux.sh \
"${{ matrix.compiler }}" "${{ matrix.version }}"
# Install build deps
sudo apt-get install --no-install-recommends -q -y \
cmake \
doxygen \
fuse \
libfuse-dev \
libpthread-stubs0-dev \
libsqlite3-dev \
libmbedtls-dev \
ninja-build \
pkg-config \
zlib1g-dev
;;
macOS*)
sudo xcode-select -switch /Applications/Xcode.app
echo "CC=$(xcrun -f clang)" >> $GITHUB_ENV
echo "CXX=$(xcrun -f clang++)" >> $GITHUB_ENV
echo "SDKROOT=$(xcodebuild -version -sdk macosx Path)" >> $GITHUB_ENV
echo "$(xcodebuild -version -sdk macosx Path)" >> $GITHUB_PATH
# Install common tools
brew install \
cmake \
doxygen \
macfuse \
mbedtls@2 \
ninja \
sqlite \
zlib
;;
esac
- name: Verify Toolchain Version
run: |
$CC --version
$CXX --version
cmake --version
- name: Check Available Configure Presets
run: cmake --list-presets
- name: Configure client
run: |
case ${{ runner.os }} in
macOS*)
export MBEDTLS_ROOT_DIR=/usr/local/opt/mbedtls@2
;;
esac
cmake --preset=${{ matrix.name }}
- name: Build client
run: cmake --build --preset=${{ matrix.name }}
- name: Run Tests
run: ctest --preset=${{ matrix.name }}
- name: Build Documentation
run: cmake --build --preset=${{ matrix.name }} --target doc
- name: Install client
run: cmake --build --preset=${{ matrix.name }} --target install
- name: Minimal Install Test
working-directory: ./out/install/${{ matrix.name }}/bin
run: |
./pcloudcc --version
./pcloudcc --vernum
./pcloudcc --dumpversion
./pcloudcc --help
- name: Success Reporting
if: success()
run: git log --format=fuller -5