Compare commits
27 commits
master
...
build-test
Author | SHA1 | Date | |
---|---|---|---|
|
3ab9db95e0 | ||
|
beb7066cb0 | ||
|
ea51e4911a | ||
|
b718985293 | ||
|
cf8586aa7b | ||
|
8cb3626138 | ||
|
c224411279 | ||
|
aa39f44f71 | ||
|
f29c78514a | ||
|
71bb71587a | ||
|
d9c504c4da | ||
|
eb411a33b8 | ||
|
e2349c237d | ||
|
a4e5c73940 | ||
|
cdb1a9aae0 | ||
|
57c7596718 | ||
|
e8497b94e1 | ||
|
24bae797b2 | ||
|
7b6b46ab05 | ||
|
2152d6ac89 | ||
|
c65016f135 | ||
|
531c3286dc | ||
|
2c0bb51748 | ||
|
dc85519fa3 | ||
|
680a168435 | ||
|
646bddf303 | ||
|
0cfd021ef2 |
5 changed files with 97 additions and 8 deletions
60
.github/workflows/complib-package.yml
vendored
Normal file
60
.github/workflows/complib-package.yml
vendored
Normal 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
10
build.sh
Normal 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
|
|
@ -1,8 +1,17 @@
|
|||
##!/usr/bin/zsh
|
||||
export PYTHONDONTWRITEBYTECODE=1
|
||||
export VERSION="1.0.0-0"
|
||||
#!/usr/bin/bash
|
||||
|
||||
# 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!
|
||||
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" \
|
||||
-v $VERSION -t deb setup.py
|
||||
|
||||
mkdir build_extract
|
||||
mv python3-complib_"$VERSION"_all.deb build_extract
|
||||
cd build_extract
|
||||
ar -xv python3-complib_"$VERSION"_all.deb
|
||||
if [ "$EXTRACT_PKG" == "1" ]; then
|
||||
echo "Exracting deb package"
|
||||
mkdir build_extract
|
||||
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-upstream-changelog changelog \
|
||||
|
|
|
@ -11,6 +11,10 @@ fpm \
|
|||
--name compsrv \
|
||||
--version 1.0.0-0 \
|
||||
--architecture all \
|
||||
-d "libprotobuf23" \
|
||||
-d "protobuf-compiler" \
|
||||
-d "python3-protobuf" \
|
||||
-d "pigpio" \
|
||||
./test_bin/compsrv=/usr/bin/compsrv
|
||||
|
||||
# MUST BE RUN IN BASH, zsh has 'ar' as an alias to 'apt'
|
||||
|
|
BIN
server_v2/compsrv_1.0.0-0_all.deb
Normal file
BIN
server_v2/compsrv_1.0.0-0_all.deb
Normal file
Binary file not shown.
Reference in a new issue