Skip to content

Commit 3c0c20e

Browse files
committed
Run deploy job also for ARM.
1. Also run tests before packaging the library. 2. Use different packagecloud GH action, since official one doesn't support running on ARM. 3. Update `PACKAGE_RELEASE_VERSION` on each deploy run. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
1 parent 839ae9e commit 3c0c20e

2 files changed

Lines changed: 20 additions & 10 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ${{ matrix.os }}
1616
strategy:
1717
matrix:
18-
os: [ ubuntu-22.04, ubuntu-24.04 ]
18+
os: [ ubuntu-22.04, ubuntu-24.04, ubuntu-22.04-arm, ubuntu-24.04-arm ]
1919
steps:
2020
- uses: actions/checkout@v2
2121
- name: set Ubuntu codename
@@ -29,19 +29,29 @@ jobs:
2929
sudo apt-get install -y cmake gcc
3030
- name: build packages
3131
run: |
32-
mkdir -p build
32+
mkdir -p build demo/build
3333
cd build
34-
cmake -DBUILD_SHARED_LIBS=Off -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="/usr" ..
34+
cmake -DBUILD_SHARED_LIBS=Off -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="/usr" -DPACKAGE_RELEASE_VERSION="$GITHUB_RUN_NUMBER" ..
3535
make -j$(nproc)
36-
cpack -G DEB
37-
cmake -DBUILD_SHARED_LIBS=On -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="/usr" ..
36+
pushd ../demo/build
37+
cmake ..
3838
make -j$(nproc)
39-
cpack -G DEB
39+
ctest
40+
popd
41+
cpack -DPACKAGE_RELEASE_VERSION="$GITHUB_RUN_NUMBER" -G DEB
42+
cmake -DBUILD_SHARED_LIBS=On -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="/usr" -DPACKAGE_RELEASE_VERSION="$GITHUB_RUN_NUMBER" ..
43+
make -j$(nproc)
44+
pushd ../demo/build
45+
cmake ..
46+
make -j$(nproc)
47+
ctest
48+
popd
49+
cpack -DPACKAGE_RELEASE_VERSION="$GITHUB_RUN_NUMBER" -G DEB
4050
- name: push deb packages to packagecloud.io
41-
uses: computology/packagecloud-github-action@v0.6
51+
uses: danielmundi/upload-packagecloud@v1
4252
with:
4353
PACKAGE-NAME: build/packages/ubuntu/${{ env.ubuntu_codename }}/*.deb
4454
PACKAGECLOUD-USERNAME: libtom
45-
PACKAGECLOUD-REPONAME: packages
46-
PACKAGECLOUD-DISTRO: ubuntu/${{ env.ubuntu_codename }}
55+
PACKAGECLOUD-REPO: packages
56+
PACKAGECLOUD-DISTRIB: ubuntu/${{ env.ubuntu_codename }}
4757
PACKAGECLOUD-TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ project(libtommath
1515
# package release version
1616
# bump if re-releasing the same VERSION + patches
1717
# set to 1 if releasing a new VERSION
18-
set(PACKAGE_RELEASE_VERSION 1)
18+
set(PACKAGE_RELEASE_VERSION "1" CACHE STRING "")
1919

2020
#-----------------------------------------------------------------------------
2121
# Include cmake modules

0 commit comments

Comments
 (0)