-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (51 loc) · 1.8 KB
/
cmake-ubuntu-package.yml
File metadata and controls
63 lines (51 loc) · 1.8 KB
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
name: Ubuntu Release Package
on:
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- 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 for Distribution
run: |
fold -s LICENSE > LICENSE2
mv LICENSE2 LICENSE
- 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 tar.gz
working-directory: ${{github.workspace}}/build/release/gh-ubuntu
run: cpack
- name: Package .deb
working-directory: ${{github.workspace}}/build/release/gh-ubuntu
run: |
cmake -DCPACK_GENERATOR=DEB .
cpack -G DEB
- name: Package .rpm
working-directory: ${{github.workspace}}/build/release/gh-ubuntu
run: |
cmake -DCPACK_GENERATOR=RPM .
sudo cpack -G RPM
- name: Archive Build Artifacts
uses: actions/upload-artifact@v4
with:
name: ubuntu-22.04
path: |
${{github.workspace}}/build/release/gh-ubuntu/sac-format-?.?.?-Linux-*.tar.gz*
${{github.workspace}}/build/release/gh-ubuntu/sac-format-?.?.?-Linux-*.sh*
${{github.workspace}}/build/release/gh-ubuntu/sac-format.deb*
${{github.workspace}}/build/release/gh-ubuntu/sac-format.rpm*
retention-days: 1