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

Improve tooling #11

Merged
merged 4 commits into from
Nov 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


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

on:
pull_request:
types:
- opened
- reopened
- synchronize

jobs:
flatpak:
name: Flatpak
runs-on: ubuntu-latest

strategy:
matrix:
arch: [x86_64, aarch64]
# Don't fail the whole workflow if one architecture fails
fail-fast: false

container:
image: ghcr.io/elementary/flatpak-platform/runtime:6-${{ matrix.arch }}
options: --privileged

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up QEMU for aarch64 emulation
if: ${{ matrix.arch != 'x86_64' }}
uses: docker/setup-qemu-action@v1
with:
platforms: arm64

- name: Build
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v4
with:
bundle: com.github.manexim.insomnia.flatpak
manifest-path: com.github.manexim.insomnia.yml
run-tests: true
repository-name: appcenter
repository-url: https://flatpak.elementary.io/repo.flatpakrepo
cache-key: "flatpak-builder-${{ github.sha }}"
arch: ${{ matrix.arch }}

lint:
name: Lint
runs-on: ubuntu-latest

container:
image: valalang/lint

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Lint
run: io.elementary.vala-lint -d .
30 changes: 0 additions & 30 deletions .github/workflows/main.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
build
build-dir
.flatpak-builder
repo
*.flatpak
17 changes: 17 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build & Run",
"type": "shell",
"command": "./app build && ./app install && ./app run",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
19 changes: 19 additions & 0 deletions app
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# fail on first error
set -e

APP=com.github.manexim.insomnia

case "$1" in
build)
flatpak-builder --repo=repo build ${APP}.yml --force-clean
flatpak build-bundle repo ${APP}.flatpak --runtime-repo=https://flatpak.elementary.io/repo.flatpakrepo ${APP} master
;;
install)
flatpak install --user -y ${APP}.flatpak
;;
run)
flatpak run ${APP}
;;
esac