-
-
Notifications
You must be signed in to change notification settings - Fork 15
49 lines (46 loc) · 1.47 KB
/
linux.yml
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
name: Linux
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install build dependencies
run: sudo apt-get install -y libstdc++-10-dev g++-10 gcc-10 cmake libssl-dev libtbb-dev libre2-dev libyaml-cpp-dev nlohmann-json3-dev
- name: Configure
run: |
cmake -S . -B cmake-build-debug -DCMAKE_CXX_COMPILER=g++-10 -DCMAKE_BUILD_TYPE=Debug -DTORRENTTOOLS_BUILD_TESTS=ON
- name: Build
run: cmake --build cmake-build-debug
- name: Save build artifacts
uses: actions/upload-artifact@v2
with:
name: torrenttools-binaries
path: |
cmake-build-debug
!cmake-build-debug/_deps
retention-days: 1
test:
name: Test
needs: Build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install runtime dependencies
run: sudo apt-get install -y libstdc++-10-dev g++-10 gcc-10 libssl-dev libtbb-dev libre2-dev libyaml-cpp-dev nlohmann-json3-dev
- name: Download build artifacts
uses: actions/download-artifact@v2
with:
name: torrenttools-binaries
path: cmake-build-debug
- name: Display structure of downloaded files
run: ls -R
- name: Test
run: |
chmod +x cmake-build-debug/tests/torrenttools-tests
cd cmake-build-debug && ctest