Skip to content

Commit

Permalink
ci: fix debian python version (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
Heiko Nickerl authored Aug 5, 2021
1 parent a1aaa7c commit fbf4cd0
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 30 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check
name: check
on:
pull_request:
branches: [ master ]
Expand All @@ -7,40 +7,40 @@ jobs:
name: run checks
runs-on: ubuntu-latest
steps:
- name: Checkout code
- name: checkout code
uses: actions/checkout@v2

- name: Set up python
uses: actions/setup-python@v2
with:
python-version: '3.9.2'

- name: Restore dependencies from cache
- name: restore dependencies from cache
id: cache
uses: actions/cache@v2
with:
path: venv
key: ${{ runner.os }}-venv-${{ hashFiles('setup.py') }}

- name: Install dependencies
- name: install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: make deps

- name: Lint
- name: lint code
run: make lint

- name: Type-Check
- name: type-check
id: type-check
run: |
make type-check
export TYPE_COVERAGE=$(make type-coverage)
echo "::set-output name=TYPE_COVERAGE::$TYPE_COVERAGE"
- name: Run tests
- name: run tests
run: make test

# see https://github.com/marketplace/actions/dynamic-badges
- name: Create type coverage badge
- name: create type coverage badge
uses: schneegans/dynamic-badges-action@v1.0.0
with:
auth: ${{ secrets.GIST_SECRET }}
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/downstream.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: Downstream Packaging
name: downstream packaging

on:
pull_request:
branches: [ master ]
push:
tags:
- 'v*'

jobs:
aur-publish:
name: update aur package
if: "false"
runs-on: ubuntu-latest
steps:
- name: Checkout code
- name: checkout code
uses: actions/checkout@v2

- name: Validate & update checksums
Expand All @@ -18,7 +22,7 @@ jobs:
path: packaging/aur
updpkgsums: true

- name: Publish
- name: publish
uses: KSXGitHub/github-actions-deploy-aur@v2.2.5
with:
pkgname: sodalite
Expand All @@ -29,23 +33,22 @@ jobs:
commit_message: Update AUR package

debian-package:
# disabled for now
if: "false"
name: build debian package
runs-on: ubuntu-latest
steps:
- name: Checkout code
- name: checkout code
uses: actions/checkout@v2

- name: Prepare package
- name: prepare package
run: ./packaging/deb/assemble

- name: Build debian package
- name: build debian package
uses: dawidd6/action-debian-package@v1
with:
source_directory: packaging/deb/pkg
artifacts_directory: packaging/deb/build

- name: Archive debian package
- name: archive debian package
uses: actions/upload-artifact@v2
with:
name: debian-package
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: release
on:
push:
branches: [ master ]
Expand All @@ -7,25 +7,25 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, 'chore(release):')
runs-on: ubuntu-latest
steps:
- name: Checkout code
- name: checkout code
uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Restore dependencies from cache
- name: restore dependencies from cache
id: cache
uses: actions/cache@v2
with:
path: venv
key: ${{ runner.os }}-venv-${{ hashFiles('setup.py') }}

- name: Install dependencies
- name: install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: make deps

- name: Semantic Release
- name: release new version (if necessary)
run: |
git config user.name github-actions
git config user.email github-actions@github.com
Expand Down
8 changes: 5 additions & 3 deletions packaging/deb/pkg/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ Source: sodalite
Section: utils
Priority: optional
Maintainer: Heiko Nickerl <dev@hnicke.de>
Build-Depends: debhelper (>=11), dh-python, python3, python3-setuptools, python3-pytest
Build-Depends: debhelper (>=11), dh-python, python3.9, python3-setuptools, python3-pytest
X-Python3-Version: >= 3.9
Standards-Version: 4.1.4
Homepage: https://www.github.com/hnicke/sodalite
Vcs-Browser: https://github.com/hnicke/sodalite
Vcs-Git: https://github.com/hnicke/sodalite.git

Package: sodalite
Architecture: all
X-Python3-Version: >= 3.9
Depends: ${misc:Depends}, ${python3:Depends}
Depends: python3-binaryornot, python3-blinker, python3-click, python3-pygments, python3-pyperclip, python3-urwid, python3-watchdog, python3-yaml, python3.9, ${misc:Depends}
# can not make this work -- will always include python3.8
#Depends: ${misc:Depends}, ${python3:Depends}
Description: Keyboard-driven terminal file navigator and launcher
Sodalite is a keyboard-driven terminal file navigator and launcher.
It's designed to be the missing glue for those who use the shell
Expand Down
7 changes: 2 additions & 5 deletions packaging/deb/pkg/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@ export DH_VERBOSE = 1
export PYBUILD_NAME = sodalite
export PYBUILD_DISABLE=test
export PYBUILD_TEST_PYTEST = 1
export DEBPYTHON3_SUPPORTED=3.9
export PYBUILD_INTERPRETERS=python3.9
export PYBUILD_VERSIONS=3.9

%:
dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_install:
dh_auto_install
make install-misc root=${CURDIR}/debian/sodalite

override_dh_python3:
dh_python3 --shebang=/usr/bin/python3.9
# fix shebang
sed -i 's|^#!/usr/bin/python3|#!/usr/bin/python3.9|' ${CURDIR}/debian/sodalite/usr/bin/sodalite

0 comments on commit fbf4cd0

Please sign in to comment.