Skip to content

Commit

Permalink
Add package building for Fedora 40.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasper Peeters committed Aug 10, 2024
1 parent c2d673c commit a97d0bd
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/fedora-40-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Create an Ubuntu 22.04 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 .deb file
# to the release assets.

name: Fedora-40 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 Fedora image
run: docker pull fedora:40

- 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 in Fedora container
run: |
docker run --rm \
-v ${{ github.workspace }}:/workspace \
-w /workspace \
fedora:40 \
bash -c "
dnf install -y rpm-build make gcc-c++ git python3-devel cmake gmp-devel libuuid-devel sqlite-devel gtkmm30-devel boost-devel python3-matplotlib python3-pip
pip3 install sympy
cd cadabra2
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 /workspace/cadabra2/build/VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Upload Release Assets
run: |
gh release upload "${{ env.VERSION }}" build/cadabra2-${{ env.VERSION }}-fedora-40.deb --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit a97d0bd

Please sign in to comment.