Skip to content

Commit

Permalink
Add opensuse tumbleweed package workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasper Peeters committed Aug 10, 2024
1 parent 2277a1f commit 6795cfd
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 3 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/opensuse-tumbleweed-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Create a OpenSUSE Tumbleweed package on a github release event.
# This assumes that the cadabra version is the same as the
# release name, and it will attempt to add the .rpm file
# to the release assets.

name: OpenSUSE-Tumbleweed package

on: [push]

jobs:
build:

runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

# - name: Exit if not on devel branch
# if: github.ref != 'refs/heads/devel'
# run: exit 1

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

- name: Pull OpenSUSE image
run: docker pull opensuse/tumbleweed:latest

- name: Set up GitHub CLI
run: |
sudo apt-get update
sudo apt-get install -y gh
- name: Authenticate GitHub CLI
run: gh auth setup-git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build RPM
run: |
docker run --rm \
-v ${{ github.workspace }}:/workspace \
-w /workspace \
opensuse/tumbleweed:latest \
bash -c "
zypper -n install --no-recommends git cmake python311-devel gcc-c++ \
gmp-devel libuuid-devel \
gtkmm3-devel \
python311-matplotlib \
libboost_system1_71_0-devel libboost_filesystem1_71_0-devel \
libboost_date_time1_71_0-devel libboost_program_options1_71_0-devel
git config --global --add safe.directory /workspace
mkdir build
cd build
cmake -DPACKAGING_MODE=ON -DENABLE_MATHEMATICA=OFF -DCMAKE_INSTALL_PREFIX=/usr ..
make
cpack
"
- name: Set version variables from output of cmake
run: |
VER=$(cat ${{ github.workspace }}/build/VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Upload Release Assets
run: |
gh release upload "${{ env.VERSION }}" build/cadabra2-${{ env.VERSION }}-tumbleweed.rpm --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ include(GNUInstallDirs)
set(PYTHON_POSTFIX "3")
# message(STATUS "Building for use with Python 3 (good!)")

#set(PYBIND11_FINDPYTHON ON)
find_package(Python COMPONENTS Interpreter Development)
add_subdirectory(libs/pybind11)

Expand Down
2 changes: 1 addition & 1 deletion cmake/packaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ else()
set(CPACK_SYSTEM_NAME "tumbleweed")
set(CPACK_GENERATOR "RPM")
message("-- This is an openSUSE Tumbleweed system")
set(CPACK_RPM_PACKAGE_REQUIRES "libpython3_7m1_0, libgmp10, libuuid1, libsqlite3-0, libgtkmm-3_0-1, libboost_system1_71_0, libboost_filesystem1_71_0, libboost_program_options1_71_0, libboost_regex1_71_0, libstdc++6, python3-matplotlib, python3-sympy, texlive-dvipng, texlive, texlive-ytableau")
set(CPACK_RPM_PACKAGE_REQUIRES "libpython3_7m1_0, libgmp10, libuuid1, libsqlite3-0, libgtkmm-3_0-1, libboost_system1_71_0, libboost_filesystem1_71_0, libboost_program_options1_71_0, libboost_regex1_71_0, libstdc++6, python3-matplotlib, python3-sympy")
endif()
endif()
if(EXISTS "/etc/issue")
Expand Down
2 changes: 1 addition & 1 deletion config/install_script.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Cadabra2"
#define MyAppVersion "2.5.3"
#define MyAppVersion "2.5.4"
#define MyAppPublisher "Kasper Peeters"
#define MyAppURL "https://www.cadabra.science/"
#define MyAppExeName "cadabra2-gtk.exe"
Expand Down
2 changes: 1 addition & 1 deletion config/science.cadabra.cadabra2-gtk.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Terminal=false
Keywords="Computer Algebra";Physics;Mathematics
MimeType=application/cadabra;application/x-cadabra;
X-AppImage-Name="Cadabra 2"
X-AppImage-Version=2.5.3
X-AppImage-Version=2.5.4

0 comments on commit 6795cfd

Please sign in to comment.