-
Notifications
You must be signed in to change notification settings - Fork 194
47 lines (44 loc) · 2.07 KB
/
deploy.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
#############################################################################
# #
# Packagecloud deployment via GH actions for LibTomMath #
# (https://github.com/libtom/libtommath.git) #
# #
#############################################################################
name: Deploy
on:
workflow_dispatch
jobs:
deploy-to-packagecloud:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, ubuntu-22.04 ]
steps:
- uses: actions/checkout@v2
- name: set Ubuntu codename
run: |
echo "ubuntu_codename="$(lsb_release -sc) >> "$GITHUB_ENV"
- name: install dependencies
run: |
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ ${{ env.ubuntu_codename }} main" | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
sudo apt-get update -qq
sudo apt-get install -y cmake gcc
- name: build packages
run: |
mkdir -p build
cd build
cmake -DBUILD_SHARED_LIBS=Off -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="/usr" ..
make -j$(nproc)
cpack -G DEB
cmake -DBUILD_SHARED_LIBS=On -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="/usr" ..
make -j$(nproc)
cpack -G DEB
- name: push deb packages to packagecloud.io
uses: computology/[email protected]
with:
PACKAGE-NAME: build/packages/ubuntu/${{ env.ubuntu_codename }}/*.deb
PACKAGECLOUD-USERNAME: libtom
PACKAGECLOUD-REPONAME: packages
PACKAGECLOUD-DISTRO: ubuntu/${{ env.ubuntu_codename }}
PACKAGECLOUD-TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}