Skip to content

Commit

Permalink
Add tests to fedora package CI too. Fix deps for ubuntu 24.04.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasper Peeters committed Dec 21, 2024
1 parent 56f84d8 commit fd58464
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 8 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/fedora-40-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@

name: Fedora-40 package

on:
release:
types: [created]
on: [push]

# on:
# release:
# types: [created]

jobs:
build:
Expand Down Expand Up @@ -91,7 +93,7 @@ jobs:
printf 'import sys\nprint(sys.path)\nimport cdb.main\nex:=(A+B) (C+D);\ndistribute(ex);\nquit()\n' > tst.cdb
cadabra2 tst.cdb
xvfg-run -a cadabra2-gtk &
xvfb-run -a cadabra2-gtk &
APP_PID=$!
sleep 10
if kill -0 $APP_PID 2>/dev/null; then
Expand Down
46 changes: 43 additions & 3 deletions .github/workflows/fedora-41-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@

name: Fedora-41 package

on:
release:
types: [created]
on: [push]

# on:
# release:
# types: [created]

jobs:
build:
Expand Down Expand Up @@ -65,3 +67,41 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

test:

runs-on: ubuntu-22.04

steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@master

- name: Pull Fedora image
run: docker pull fedora:41

- name: Download package and run inside Fedora container
run: |
docker run --rm \
-v ${{ github.workspace }}:/workspace \
-w /workspace \
fedora:41 \
bash -c "
dnf install -y xorg-x11-server-Xvfb wget curl
export VERSION=$(curl -s https://api.github.com/repos/kpeeters/cadabra2/releases|& jq .[0].tag_name -r)
export RPMNAME=cadabra2-${VERSION}-fedora41.rpm
wget https://github.com/kpeeters/cadabra2/releases/download/${VERSION}/${RPMNAME}
dnf install ${RPMNAME}
printf 'import sys\nprint(sys.path)\nimport cdb.main\nex:=(A+B) (C+D);\ndistribute(ex);\nquit()\n' > tst.cdb
cadabra2 tst.cdb
xvfb-run -a cadabra2-gtk &
APP_PID=$!
sleep 10
if kill -0 $APP_PID 2>/dev/null; then
echo 'cadabra2-gtk started successfully'
kill $APP_PID
exit 0
else
echo 'cadabra2-gtk failed to start'
exit 1
fi
"
2 changes: 1 addition & 1 deletion cmake/packaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ else()
endif()
if(LINUX_ISSUE MATCHES "24.04")
set(CPACK_SYSTEM_NAME "ubuntu-24.04-noble")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "python3, libgmpxx4ldbl, libssl3, libboost-system1.83.0, libboost-filesystem1.83.0, libboost-program-options1.83.0, libboost-regex1.83.0, libstdc++6, uuid-runtime, libgtkmm-3.0-1, python3-matplotlib, python3-mpmath, python3-sympy, python3-gmpy2")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "python3, libgmpxx4ldbl, libssl3, libboost-system1.83.0, libboost-filesystem1.83.0, libboost-program-options1.83.0, libboost-regex1.83.0, libstdc++6, uuid-runtime, libgtkmm-3.0-1t64, python3-matplotlib, python3-mpmath, python3-sympy, python3-gmpy2")
message("-- This is an Ubuntu 24.04 system")
endif()
endif()
Expand Down

0 comments on commit fd58464

Please sign in to comment.