-
Notifications
You must be signed in to change notification settings - Fork 7
68 lines (59 loc) · 1.69 KB
/
macos.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
name: macOS Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types:
- published
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
# ==== BUILD ====
- name: CMake
run: |
cmake \
-S . -B build \
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
-DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --target pkg pkg-test
- name: Run Tests
run: ./build/pkg-test
# ==== DISTRIBUTION ====
- name: Upload Distribution
uses: actions/upload-artifact@v2
with:
name: pkg-macos-amd64
path: ./build/pkg
- name: Upload Distribution (Legacy Naming)
uses: actions/upload-artifact@v2
with:
name: pkgosx
path: ./build/pkg
# ==== RELEASE ====
- name: Upload Release
if: github.event.action == 'published'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/pkg
asset_name: pkg-macos
asset_content_type: application/x-tar
- name: Upload Release (Legacy Naming)
if: github.event.action == 'published'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/pkg
asset_name: pkgosx
asset_content_type: application/x-tar