-
Notifications
You must be signed in to change notification settings - Fork 219
83 lines (69 loc) · 2.34 KB
/
ci.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: CI
on:
pull_request:
push:
jobs:
build-windows:
name: Build (Windows)
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v1
with:
submodules: true
path: openspades
- name: Cache vcpkg and dependencies
uses: actions/cache@v2
with:
path: |
vcpkg/installed
!.git
key: ${{ runner.os }}-${{ hashFiles('vcpkg_x86-windows.txt', '.gitmodules') }}
- name: Bootstrap vcpkg
run: vcpkg/bootstrap-vcpkg.bat
- name: Build dependencies
run: vcpkg/vcpkg install @vcpkg_x86-windows.txt
- name: Build application
uses: ashutoshvarma/action-cmake-build@master
with:
build-dir: ${{ runner.workspace }}/openspades.mk
build-type: RelWithDebInfo
configure-options: -A Win32 -D CMAKE_BUILD_TYPE=RelWithDebInfo -D CMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/openspades/vcpkg/scripts/buildsystems/vcpkg.cmake -D VCPKG_TARGET_TRIPLET=x86-windows-static
parallel: 8
build-macos:
name: Build (macOS)
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v1
with:
submodules: true
path: openspades
- name: Cache vcpkg and dependencies
uses: actions/cache@v2
with:
path: |
vcpkg/installed
!.git
key: ${{ runner.os }}-${{ hashFiles('vcpkg_x86_64-darwin.txt', '.gitmodules') }}
- name: Bootstrap vcpkg
run: vcpkg/bootstrap-vcpkg.sh
- name: Build dependencies
run: vcpkg/vcpkg install @vcpkg_x86_64-darwin.txt
- name: Build application
uses: ashutoshvarma/action-cmake-build@master
with:
build-dir: ${{ runner.workspace }}/openspades.mk
build-type: RelWithDebInfo
configure-options: -D CMAKE_BUILD_TYPE=RelWithDebInfo -D CMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/openspades/vcpkg/scripts/buildsystems/vcpkg.cmake -D VCPKG_TARGET_TRIPLET=x64-osx -D CMAKE_OSX_ARCHITECTURES=x86_64
parallel: 8
build-nix:
name: Build (Linux + Nix)
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Nix
uses: cachix/install-nix-action@v17
- name: Build Nix flake
run: nix build