-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed versioning/arch specification throughout
- Loading branch information
1 parent
c736810
commit a1bb54b
Showing
1 changed file
with
9 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 | ||
|
||
|
@@ -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 | ||
|