Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release actions #42

Merged
merged 26 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
87878ce
Added release-deb.yml
garrettbyrd Jun 27, 2024
969ec60
Updated release-deb to run for branch 'release-actions'
garrettbyrd Jun 27, 2024
dccbc4f
Changed to GCC toolchain 11 for ubuntu-20.04
garrettbyrd Jun 27, 2024
426a104
Changed PACKAGE_VERSION to RELEASE_VERSION
garrettbyrd Jun 27, 2024
1ad02d2
Changed directory changes
garrettbyrd Jun 27, 2024
3a720e9
Added `pwd` for testing
garrettbyrd Jun 27, 2024
c51b084
Changed to GCC toolchain 10 for ubuntu-20.04
garrettbyrd Jun 27, 2024
e25ccb9
Fixed error in copy commands
garrettbyrd Jun 27, 2024
1dfd689
Changed `lib` to `src` in copy command
garrettbyrd Jun 27, 2024
deeb602
Added `cd build` to appropriate lines
garrettbyrd Jun 27, 2024
1018aff
Small changes to `Get version and architecture`
garrettbyrd Jun 27, 2024
8824095
Attempt to grab release tag
garrettbyrd Jun 27, 2024
38ac781
Fixed grabbing tag name
garrettbyrd Jun 27, 2024
6f8fb99
Added TAG string
garrettbyrd Jun 27, 2024
b46a3de
Build only with ubuntu-20.04 and gfortran/gcc-10
garrettbyrd Jun 27, 2024
3d8e5f6
Added `Run ctests` in release-deb.yml
garrettbyrd Jun 27, 2024
f23223b
Minor changes to release-deb.yml
garrettbyrd Jun 28, 2024
b9f8513
Updated README
garrettbyrd Jun 28, 2024
0aba14b
Fixed typo in README
garrettbyrd Jun 28, 2024
12f8671
Added Test Install step
garrettbyrd Jun 28, 2024
c4a5724
Removed unecessary conditions in `on` block
garrettbyrd Jul 1, 2024
c736810
Cleaned up matrix
garrettbyrd Jul 1, 2024
a1bb54b
Fixed versioning/arch specification throughout
garrettbyrd Jul 1, 2024
4ad5e33
Updated README and versioning schema
garrettbyrd Jul 1, 2024
0a5b45a
Fixed typo
garrettbyrd Jul 1, 2024
7f0a237
Updated README
garrettbyrd Jul 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions .github/workflows/release-deb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: release-deb

on:
push:
tags:
- '*.*.*'

jobs:
build:
timeout-minutes: 60
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: ${{ matrix.os }} - ${{ matrix.fcompiler }} - ${{ matrix.build_type }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
fluidnumerics-joe marked this conversation as resolved.
Show resolved Hide resolved
arch: amd64
fcompiler: gfortran-10
ccompiler: gcc-10
shell: bash
build_type: release
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Show version information
run: |
${{ matrix.fcompiler }} --version
${{ matrix.ccompiler }} --version
- name: Build with Cmake
run: |
mkdir build
cd build
FC=${{ matrix.fcompiler }} CC=${{ matrix.ccompiler }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ../
make VERBOSE=1
- name: Build release directory
fluidnumerics-joe marked this conversation as resolved.
Show resolved Hide resolved
run: |
cd build
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: ${{ github.ref_name }}
Section: libs
Priority: optional
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_${{ github.ref_name }}_${{ matrix.arch }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release v${{ github.ref_name }}
draft: false
prerelease: false

- name: Upload Release (.deb)
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
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
fluidnumerics-joe marked this conversation as resolved.
Show resolved Hide resolved
run: |
cd build
sudo apt-get install ./feq-parse_${{ github.ref_name }}_${{ matrix.arch }}.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
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
cd ../output
for file in *; do ./*; done

27 changes: 22 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Copyright 2020 Fluid Numerics LLC
[**API Documentation**](https://feqparse.fluidnumerics.com/ford)

## Installation
`feq-parse` can be installed using either CMake, [Fortran Package Manager (fpm)](https://github.com/fortran-lang/fpm), or with [Spack](https://spack.io).
`feq-parse` can be installed using either CMake, [Fortran Package Manager (fpm)](https://github.com/fortran-lang/fpm), [Spack](https://spack.io), or with [`apt-get`](https://wiki.debian.org/apt-get) on Debian-based distributions.

### Prerequisites
All you need is a Fortran compiler that is compliant with the Fortran 2008 standard and supports C interoperability. You can see which compilers are regularly tested on the [Github actions page](https://github.com/FluidNumerics/feq-parse/actions/workflows/ci.yml). Additionally, the table below lists the [supported compilers](#supported-compilers)
Expand Down Expand Up @@ -52,9 +52,12 @@ ctest .

The above steps install
```
/opt/feqparse/lib/libfeqparse-static.a
/opt/feqparse/lib/libfeqparse.so
/opt/feqparse/include/FEQParse.mod
/usr/local/lib/libfeqparse-static.a
/usr/local/lib/libfeqparse.so
/usr/local/include/feqparse_floatstacks.mod
/usr/local/include/feqparse_functions.mod
/usr/local/include/feqparse_tokenstack.mod
/usr/local/include/feqparse.mod
```

### Fortran Package Manager
Expand Down Expand Up @@ -101,17 +104,31 @@ spack install feq-parse

To install a specific version of feq-parse with spack, e.g.
```
spack install feq-parse@1.1.0
spack install feq-parse@2.2.2
```

Refer to the [spack documentation](https://spack.readthedocs.io/en/latest/) for further guidance on using Spack.

### `apt-get`
A `.deb` file is provided for each release. If you are using a Debian-based linux distribution (e.g., Debian, Ubuntu, Pop_OS!) and an `x86_64/amd64` architecture, simply download the `.deb` via the [github interface](), or with
```
wget https://github.com/FluidNumerics/feq-parse/releases/download/<version-number>/feq-parse_<version-number>_amd64.deb -P /tmp
```
and then run
```
sudo apt-get install ./feq-parse_<version-number>-1_amd64.deb
garrettbyrd marked this conversation as resolved.
Show resolved Hide resolved
garrettbyrd marked this conversation as resolved.
Show resolved Hide resolved
```
in the directory in which it was downloaded.

All `.deb` releases are built using **Ubuntu 20.04.06 LTS** with **GNU Fortran 10**.

## Supported Compilers

The following combinations are tested on the main branch of feq-parse:

Name | Version | Platform | Build System | Architecture
--- | --- | --- | --- | --- |
GNU Fortran | 10 | Ubuntu 20.04.6 LTS | `cmake` | x86_64
GNU Fortran | 9, 10, 11, 12 | Ubuntu 22.04.2 LTS | `fpm`, `cmake` | x86_64
GNU Fortran | 13.2.0 | Windows Server 2022 (10.0.20348 Build 1547) (MSYS2) | `fpm`, `cmake` | x86_64
Intel oneAPI (`ifx`)| 2023.2 | Ubuntu 22.04.2 LTS | `fpm`, `cmake` | x86_64
Expand Down
Loading