Skip to content

Commit

Permalink
Fixed versioning/arch specification throughout
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettbyrd committed Jul 1, 2024
1 parent c736810 commit a1bb54b
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/release-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,34 +38,28 @@ jobs:
cd build
FC=${{ matrix.fcompiler }} CC=${{ matrix.ccompiler }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ../
make VERBOSE=1
- name: Get version and architecture
run: |
TAG=${GITHUB_REF#refs/*/}
echo "RELEASE_VERSION=${TAG:1}" >> $GITHUB_ENV
echo "ARCH=amd64" >> $GITHUB_ENV
# change above line if not building for amd64
- name: Build release directory
run: |
cd build
mkdir feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}
cd feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}
mkdir feq-parse_${{ github.ref_name }}_${{ matrix.arch }}
cd feq-parse_${{ github.ref_name }}_${{ matrix.arch }}
mkdir DEBIAN usr usr/local usr/local/include usr/local/lib
cp ../include/*.mod usr/local/include/
cp ../src/*.so usr/local/lib/
cp ../src/*.a usr/local/lib/
cat << EOF > DEBIAN/control
Package: feq-parse
Version: ${{ env.RELEASE_VERSION }}
Version: ${{ github.ref_name }}
Section: libs
Priority: optional
Architecture: ${{ env.ARCH }}
Architecture: ${{ matrix.arch }}
Maintainer: Fluid Numerics LLC [email protected]
Description: An equation parser Fortran class that is used to interpret and evaluate functions provided as strings.
EOF
- name: Build .deb
run: |
cd build
dpkg --build feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}
dpkg --build feq-parse_${{ github.ref_name }}_${{ matrix.arch }}
- name: Create Release
id: create_release
Expand All @@ -74,7 +68,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release v${{ env.RELEASE_VERSION }}
release_name: Release v${{ github.ref_name }}
draft: false
prerelease: false

Expand All @@ -85,14 +79,14 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}.deb
asset_name: feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}.deb
asset_path: ./build/feq-parse_${{ github.ref_name }}_${{ matrix.arch }}.deb
asset_name: feq-parse_${{ github.ref_name }}_${{ matrix.arch }}.deb
asset_content_type: application/vnd.debian.binary-package

- name: Test Install
run: |
cd build
sudo apt-get install ./feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}.deb
sudo apt-get install ./feq-parse_${{ github.ref_name }}_${{ github.ref_name }}.deb
cd ../test
mkdir ../output
for file in *.f90; do gfortran "$file" -I /usr/local/include -L /usr/local/lib -l feqparse -o "../output/${file%.f90}"; done
Expand Down

0 comments on commit a1bb54b

Please sign in to comment.