-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (64 loc) · 2 KB
/
build.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: build
on:
push:
pull_request:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu
os: ubuntu-latest
install_dir: ~/libid3tag
cmake_extras: -DCMAKE_BUILD_TYPE=RelWithDebInfo
- name: macOS
os: macos-latest
install_dir: ~/libid3tag
cmake_extras: -DCMAKE_BUILD_TYPE=RelWithDebInfo
- name: Windows
os: windows-latest
install_dir: C:\libid3tag
cmake_config: --config RelWithDebInfo
cmake_extras: >-
-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
vcpkg_tripet: x64-windows
vcpkg_binary_cache: C:\Users\runneradmin\AppData\Local\vcpkg\archives
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Set up vcpkg cache
uses: actions/cache@v2
if: runner.os == 'Windows'
with:
path: ${{ matrix.vcpkg_binary_cache }}
key: vcpkg-${{ github.head_ref }}-${{ github.run_number }}
restore-keys: |
vcpkg-${{ github.head_ref }}
vcpkg
- name: Install dependencies
if: startsWith(matrix.os, 'windows')
run: vcpkg install zlib
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.vcpkg_tripet }}
- name: Configure
run: >-
cmake
-D CMAKE_INSTALL_PREFIX=${{ matrix.install_dir }}
-D VCPKG_TARGET_TRIPLET=${{ matrix.vcpkg_tripet }}
${{ matrix.cmake_extras }}
-S . -B build
- name: Build
run: cmake --build build ${{ matrix.cmake_config }}
env:
CMAKE_BUILD_PARALLEL_LEVEL: 2
- name: Install
run: cmake --install . ${{ matrix.cmake_config }}
working-directory: build
- name: Upload Build Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.name }} libid3tag build
path: ${{ matrix.install_dir }}