-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (45 loc) · 1.61 KB
/
cmake-macos-package.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
name: macOS Release Package
on:
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
build:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Install Catch2 v3 from source
run: |
git clone https://github.com/catchorg/Catch2.git
cd Catch2
git checkout v3.5.2
cmake -Bbuild -S. -DBUILD_TESTING=OFF
sudo cmake --build build/ --target install
- name: Prep License file
run: |
cp LICENSE License2.txt
fold -s LICENSE > License.txt
- name: Configure CMake
run: cmake --preset gh-ubuntu-release
- name: Build
run: cmake --build ${{github.workspace}}/build/release/gh-ubuntu
- name: Test
working-directory: ${{github.workspace}}/build/release/gh-ubuntu
run: ctest
- name: Package CLI Installers
working-directory: ${{github.workspace}}/build/release/gh-ubuntu
run: cpack
- name: Package GUI Installer
working-directory: ${{github.workspace}}/build/release/gh-ubuntu
run: |
cmake -DCPACK_GENERATOR=productbuild -DCMAKE_INSTALL_PREFIX=/opt/sac-format .
cpack -G productbuild
- name: Archive Build Artifacts
uses: actions/upload-artifact@v3
with:
name: macos-13
path: |
${{github.workspace}}/build/release/gh-ubuntu/sac-format-?.?.?-Darwin-*.tar.gz*
${{github.workspace}}/build/release/gh-ubuntu/sac-format-?.?.?-Darwin-*.sh*
${{github.workspace}}/build/release/gh-ubuntu/sac-format.pkg*
retention-days: 1