1 #############################################################################
3 # Packagecloud deployment via GH actions for TomsFastMath #
4 # (https://github.com/libtom/tomsfastmath.git) #
6 #############################################################################
14 deploy-to-packagecloud:
15 runs-on: ${{ matrix.os }}
18 os: [ ubuntu-20.04, ubuntu-22.04 ]
20 - uses: actions/checkout@v2
21 - name: set Ubuntu codename
23 echo "ubuntu_codename="$(lsb_release -sc) >> "$GITHUB_ENV"
24 - name: install dependencies
26 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
27 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
28 sudo apt-get update -qq
29 sudo apt-get install -y cmake gcc
30 - name: build packages
34 cmake -DBUILD_SHARED_LIBS=Off -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="/usr" ..
37 cmake -DBUILD_SHARED_LIBS=On -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="/usr" ..
40 - name: push deb packages to packagecloud.io
41 uses: computology/packagecloud-github-action@v0.6
43 PACKAGE-NAME: build/packages/ubuntu/${{ env.ubuntu_codename }}/*.deb
44 PACKAGECLOUD-USERNAME: libtom
45 PACKAGECLOUD-REPONAME: packages
46 PACKAGECLOUD-DISTRO: ubuntu/${{ env.ubuntu_codename }}
47 PACKAGECLOUD-TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}