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

Working Snap Created and Published #1087

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
25 changes: 25 additions & 0 deletions .github/workflows/test-snap-can-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 🧪 Snap Builds

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: snapcore/action-build@v1
id: build

- uses: diddlesnaps/snapcraft-review-action@v1
with:
snap: ${{ steps.build.outputs.snap }}
isClassic: 'false'
# Plugs and Slots declarations to override default denial (requires store assertion to publish)
#plugs: ./plug-declaration.json
#slots: ./slot-declaration.json
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ webpage for a list of **[All Supported Installations](https://fpm.fortran-lang.o

The easiest installation routes are shown below.

### [Snap](https://snapcraft.io/fortran-fpm)

[![fortran-fpm](https://snapcraft.io/fortran-fpm/badge.svg)](https://snapcraft.io/fortran-fpm)

[![🧪 Snap Builds](https://github.com/kz6fittycent/fpm/actions/workflows/test-snap-can-build.yml/badge.svg?branch=main)](https://github.com/kz6fittycent/fpm/actions/workflows/test-snap-can-build.yml)

**Note:** Linux only

```
sudo snap install fortran-fpm
```

### [Binary](https://github.com/fortran-lang/fpm/releases)

Binaries for the latest stable release are available [to download](https://github.com/fortran-lang/fpm/releases/latest) for Windows, MacOS, and Linux.
Expand Down
Binary file added snap/local/fpm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: fortran-fpm
adopt-info: fortran-fpm
summary: Fortran Package Manager
description: |
Fortran Package Manager (fpm) is a package manager and build system for Fortran.
Its key goal is to improve the user experience of Fortran programmers.
It does so by making it easier to build your Fortran program or library,
run the executables, tests, and examples, and distribute it as a dependency
to other Fortran projects. Fpm's user interface is modeled after Rust's Cargo,
so if you're familiar with that tool, you will feel at home with fpm.
Fpm's long term vision is to nurture and grow the ecosystem of modern Fortran
applications and libraries.

Fpm is an early prototype and is evolving rapidly. You can use it to build and
package your Fortran projects, as well as to use existing fpm packages as dependencies.
Fpm's behavior and user interface may change as it evolves, however as fpm matures
and we enter production, we will aim to stay backwards compatible. Please follow
the issues to contribute and/or stay up to date with the development.
Before opening a bug report or a feature suggestion, please read our Contributor Guide.
You can also discuss your ideas and queries with the community in fpm discussions,
or more broadly on Fortran-Lang Discourse.

Fortran Package Manager is not to be confused with Jordan Sissel's fpm, a more general,
non-Fortran related package manager.

Website: https://fpm.fortran-lang.org/

license: MIT
source-code: https://github.com/fortran-lang/fpm
issues: https://github.com/kz6fittycent/fpm/issues
contact: https://github.com/kz6fittycent/fpm
icon: snap/local/fpm.png

base: core24
grade: stable
confinement: strict
compression: lzo

platforms:
amd64:
build-on: [amd64]
build-for: [amd64]

apps:
fortran-fpm:
command: usr/bin/fpm
plugs:
- home

parts:
fortran-fpm:
source: https://github.com/fortran-lang/fpm
source-type: git
plugin: dump
build-packages:
- wget
- curl

override-build: |
#VARS
################################
LATEST=$(curl -s https://api.github.com/repos/fortran-lang/fpm/releases/latest | grep '"tag_name":' | cut -d ":" -f2 | sed -E 's/.*"([^"]+)".*/\1/' | sed -E 's/^v//')
################################

mkdir -p $CRAFT_PART_INSTALL/usr/bin/
cd $CRAFT_PART_INSTALL/usr/bin/
wget -O fpm "https://github.com/fortran-lang/fpm/releases/download/v${LATEST}/fpm-${LATEST}-linux-x86_64"
chmod a+x fpm

override-pull: |
craftctl default
craftctl set version="$(curl -s https://api.github.com/repos/fortran-lang/fpm/releases/latest | grep '"tag_name":' | cut -d ":" -f2 | sed -E 's/.*"([^"]+)".*/\1/' | sed -E 's/^v//')"

Loading