Compare commits

...
This repository has been archived on 2025-06-01. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.

27 commits

Author SHA1 Message Date
Joel Klimont
3ab9db95e0 small changes 2022-10-06 19:52:00 +02:00
Joel Klimont
beb7066cb0 changed version numbering to conform with .deb package policy 2022-10-06 19:46:22 +02:00
Joel Klimont
ea51e4911a more work on build 2022-10-06 18:33:27 +02:00
Joel Klimont
b718985293 more work on build 2022-10-06 18:24:19 +02:00
Joel Klimont
cf8586aa7b more work on build 2022-10-06 18:20:22 +02:00
Joel Klimont
8cb3626138 more work on build 2022-10-06 18:18:57 +02:00
Joel Klimont
c224411279 more work on build 2022-10-06 18:16:49 +02:00
Joel Klimont
aa39f44f71 added dependencies to server package build 2022-10-05 23:25:05 +02:00
Joel Klimont
f29c78514a (MINOR) something 2022-10-05 23:20:00 +02:00
Joel Klimont
71bb71587a MAJOR very important change 2022-10-05 23:11:30 +02:00
Joel Klimont
d9c504c4da (MAJOR) very important change 2022-10-05 23:05:51 +02:00
Joel Klimont
eb411a33b8 very unimportant change 2022-10-05 23:04:29 +02:00
Joel Klimont
e2349c237d test6 2022-10-05 23:03:43 +02:00
Joel Klimont
a4e5c73940 test5 2022-10-05 23:01:28 +02:00
Joel Klimont
cdb1a9aae0 (MINOR) test4 2022-10-05 22:59:47 +02:00
Joel Klimont
57c7596718 (MINOR) test3 2022-10-05 22:54:56 +02:00
Joel Klimont
e8497b94e1 (MINOR) test2 2022-10-05 22:50:36 +02:00
Joel Klimont
24bae797b2 (MINOR) test 2022-10-05 22:48:45 +02:00
Joel Klimont
7b6b46ab05 (MINOR) test 2022-10-05 22:45:45 +02:00
Joel Klimont
2152d6ac89 (minor) test 2022-10-05 22:44:32 +02:00
Joel Klimont
c65016f135 (minor) test 2022-10-05 22:39:45 +02:00
Joel Klimont
531c3286dc (minor) test 2022-10-05 22:36:44 +02:00
Joel Klimont
2c0bb51748 (minor) test 2022-10-05 22:30:23 +02:00
Joel Klimont
dc85519fa3 (minor) test 2022-10-05 22:28:49 +02:00
Joel Klimont
680a168435 (minor) test 2022-10-05 22:26:15 +02:00
Joel Klimont
646bddf303 (minor) test 2022-10-05 22:21:11 +02:00
Joel Klimont
0cfd021ef2 started working on automatic build of complib deb package 2022-10-05 22:16:13 +02:00
5 changed files with 97 additions and 8 deletions

60
.github/workflows/complib-package.yml vendored Normal file
View file

@ -0,0 +1,60 @@
name: Build comlib.deb package
on:
push:
branches:
- build-test
jobs:
build-complib-deb:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Bump version number
uses: paulhatch/semantic-version@v4.0.2
id: next_semantic_version
with:
branch: "build-test"
tag_prefix: ""
major_pattern: "(MAJOR)"
minor_pattern: "(MINOR)"
format: "${major}.${minor}.${patch}-${increment}"
bump_each_commit: true
- name: Print Version Numbers
run: |
echo ${{join(steps.next_semantic_version.outputs.*, ' - ')}}
echo "Next version: ${{steps.next_semantic_version.outputs.version}}"
echo "Next version tag: ${{steps.next_semantic_version.outputs.version_tag}}"
- name: Tag Commit
uses: actions/github-script@v5
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{steps.next_semantic_version.outputs.version}}',
sha: context.sha
})
- name: Install fpm
run: sudo apt install ruby -y && sudo gem install fpm
- name: Build complib deb Package
env:
VERSION: ${{steps.next_semantic_version.outputs.version}}
run: bash ./build.sh # creates packages in "output" directory
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: 'output'
target-directory: 'debs/complib/'
destination-github-username: 'F-WuTS'
destination-repository-name: 'compREP-dev'
user-email: joel.klimont@comp-air.at
target-branch: master

10
build.sh Normal file
View file

@ -0,0 +1,10 @@
#!/usr/bin/bash
mkdir output
DEB="empty"
cd client_s2
source build_deb.sh
echo "Ran build deb, created: $DEB"
mv $DEB ../output

View file

@ -1,8 +1,17 @@
##!/usr/bin/zsh #!/usr/bin/bash
export PYTHONDONTWRITEBYTECODE=1
export VERSION="1.0.0-0"
# BE CAREFUL TO NOT BUILD IN A PYTHON VENV! export PYTHONDONTWRITEBYTECODE=1
# set to 1 for debugging
export EXTRACT_PKG="0"
if [[ -z $VERSION ]]; then
echo "Warning, setting VERSION env var to default value v1.0.0-1"
export VERSION="v1.0.0-0"
fi
echo "Building Package version: $VERSION"
# BE CAREFUL TO NOT BUILD IN A PYTHON VENV! wasd
# be sure to change version if needed! # be sure to change version if needed!
fpm -s python --python-bin python3 --python-pip pip3 --python-package-name-prefix python3 \ fpm -s python --python-bin python3 --python-pip pip3 --python-package-name-prefix python3 \
@ -35,10 +44,16 @@ fpm -s python --python-bin python3 --python-pip pip3 --python-package-name-prefi
-d "ffmpeg" \ -d "ffmpeg" \
-v $VERSION -t deb setup.py -v $VERSION -t deb setup.py
mkdir build_extract if [ "$EXTRACT_PKG" == "1" ]; then
mv python3-complib_"$VERSION"_all.deb build_extract echo "Exracting deb package"
cd build_extract mkdir build_extract
ar -xv python3-complib_"$VERSION"_all.deb mv python3-complib_"$VERSION"_all.deb build_extract
cd build_extract
ar -xv python3-complib_"$VERSION"_all.deb
fi
export DEB=python3-complib_"$VERSION"_all.deb
echo "Created: $DEB"
# --deb-changelog changelog \ # --deb-changelog changelog \
# --deb-upstream-changelog changelog \ # --deb-upstream-changelog changelog \

View file

@ -11,6 +11,10 @@ fpm \
--name compsrv \ --name compsrv \
--version 1.0.0-0 \ --version 1.0.0-0 \
--architecture all \ --architecture all \
-d "libprotobuf23" \
-d "protobuf-compiler" \
-d "python3-protobuf" \
-d "pigpio" \
./test_bin/compsrv=/usr/bin/compsrv ./test_bin/compsrv=/usr/bin/compsrv
# MUST BE RUN IN BASH, zsh has 'ar' as an alias to 'apt' # MUST BE RUN IN BASH, zsh has 'ar' as an alias to 'apt'

Binary file not shown.